Skip to content

Commit

Permalink
Initial commit to support multiple tranlation targets.
Browse files Browse the repository at this point in the history
  • Loading branch information
whchung committed Jun 6, 2020
1 parent 3ac107a commit 7cc5ed8
Show file tree
Hide file tree
Showing 5 changed files with 1,470 additions and 693 deletions.
9 changes: 7 additions & 2 deletions mlir/include/mlir/Dialect/MIOpenOps/MIOpenCPP.h
Expand Up @@ -40,10 +40,15 @@ std::unique_ptr<llvm::StringRef> translateModuleToMIOpenCpp(ModuleOp m);
/// the MLIR module), and return `nullptr`.
std::unique_ptr<llvm::StringRef> translateModuleToMIOpenHeader(ModuleOp m);

/// Convert the given MLIR module into MIOpen C++ Solver. In case of error, report it
/// Convert the given MLIR module into MIOpen C++ . In case of error, report it
/// to the error handler registered with the MLIR context, if any (obtained from
/// the MLIR module), and return `nullptr`.
std::unique_ptr<llvm::StringRef> translateModuleToMIOpenCppXDLOPS(ModuleOp m);

/// Convert the given MLIR module into MIOpen C++ Header. In case of error, report it
/// to the error handler registered with the MLIR context, if any (obtained from
/// the MLIR module), and return `nullptr`.
std::unique_ptr<llvm::StringRef> translateModuleToMIOpenSolver(ModuleOp m);
std::unique_ptr<llvm::StringRef> translateModuleToMIOpenHeaderXDLOPS(ModuleOp m);

} // namespace mlir

Expand Down
2 changes: 2 additions & 0 deletions mlir/lib/Dialect/MIOpenOps/CppOutput/CMakeLists.txt
@@ -1,5 +1,7 @@
add_llvm_library(MLIRMIOpenCpp
ConvertToMIOpenCPP.cpp
gridwise_convolution_implicit_gemm_v4r4.cpp
gridwise_convolution_implicit_gemm_v4r4_gen_xdlops.cpp

ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/MIOpenOps
Expand Down

0 comments on commit 7cc5ed8

Please sign in to comment.