Works as StandAlone and Backend and also Perf is Good

This is a combination of 4 commits.

Works as StandAlone and Backend

Works as StandAlone and Backend

This is a combination of 13 commits.

Works StandAlone and as Backend

This is a combination of 7 commits.

backend set default dir with flag

move bitcode to backend dir

copy backend

save

empty test work in backendmode

enable backend mode when copying to upstream

clean up

fix failure

minimize diff

add skip function

fix bug with corrupted dwarf exp

match num_wraps

fix multi threaded test issue

move bitcode file out of lib

move backend to python/triton/third_party/hip

move libhsa

backend works again

restart ci

clean upstream location first before copy

match scripts

fix new error

memoize backend stuff

fix bug
This commit is contained in:
Michael Melesse
2023-10-16 15:57:19 -05:00
parent 09ba348f87
commit 1fd9b40f2f
196 changed files with 827 additions and 189 deletions

View File

@@ -26,18 +26,51 @@
#include <memory>
#include <string>
#include <tuple>
#include <vector>
namespace mlir {
class ModuleOp;
}
namespace llvm {
class Module;
class LLVMContext;
} // namespace llvm
namespace mlir {
namespace triton {
// Translate TritonGPU IR to HSACO code.
// add external libs to modules
void addExternalLibsROCM(mlir::ModuleOp &module,
const std::vector<std::string> &names,
const std::vector<std::string> &paths);
// Translate Triton dialect to TritonGPU, return null if failed.
void translateTritonToTritonGPUROCM(mlir::ModuleOp &module, int computeCapability,
int numWarps, int numStages);
// Translate Triton GPU to mlir LLVM dialect, return null if failed.
void translateTritonGPUROCMToLLVMDialect(mlir::ModuleOp &module,
int computeCapability, bool isROCM);
// Translate mlir LLVM dialect to LLVMIR, return null if failed.
std::unique_ptr<llvm::Module>
translateLLVMDialectToLLVMIR(llvm::LLVMContext *llvmContext,
mlir::ModuleOp module, bool isROCM);
// Translate LLVMIR to HSACO code.
std::tuple<std::string, std::string>
translateLLVMIRToHSACO(llvm::Module &module, std::string gfx_arch,
std::string gfx_triple, std::string gfx_features);
std::tuple<std::string, std::string>
translateTritonIRToHSACO(mlir::ModuleOp module, std::string gfx_arch,
std::string gfx_triple, std::string gfx_features,
int numWarps, int numStages,
const std::vector<std::string> &names,
const std::vector<std::string> &paths);
} // namespace triton
} // namespace mlir
#endif