[PATCH] D78951: [mlir][spirv] Enable serialization to SPIR-V binary.
Denis Khalikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 27 12:22:49 PDT 2020
denis13 created this revision.
denis13 added reviewers: antiagainst, mravishankar.
Herald added subscribers: llvm-commits, Kayjukh, frgossen, grosul1, bader, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, shauheen, jpienaar, rriddle, mehdi_amini.
Herald added a project: LLVM.
Enable serialization to SPIR-V binary and fix typo
after D77515 <https://reviews.llvm.org/D77515>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D78951
Files:
mlir/include/mlir/InitAllTranslations.h
mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp
Index: mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp
===================================================================
--- mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp
+++ mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp
@@ -61,7 +61,7 @@
}
namespace mlir {
-void registerToSPIRVTranslation() {
+void registerFromSPIRVTranslation() {
TranslateToMLIRRegistration fromBinary(
"deserialize-spirv",
[](llvm::SourceMgr &sourceMgr, MLIRContext *context) {
@@ -101,7 +101,7 @@
}
namespace mlir {
-void registerFromSPIRVTranslation() {
+void registerToSPIRVTranslation() {
TranslateFromMLIRRegistration toBinary(
"serialize-spirv", [](ModuleOp module, raw_ostream &output) {
return serializeModule(module, output);
Index: mlir/include/mlir/InitAllTranslations.h
===================================================================
--- mlir/include/mlir/InitAllTranslations.h
+++ mlir/include/mlir/InitAllTranslations.h
@@ -18,6 +18,7 @@
void registerFromLLVMIRTranslation();
void registerToLLVMIRTranslation();
+void registerFromSPIRVTranslation();
void registerToSPIRVTranslation();
void registerToNVVMIRTranslation();
void registerToROCLDIRTranslation();
@@ -30,6 +31,7 @@
static bool init_once = []() {
registerFromLLVMIRTranslation();
registerToLLVMIRTranslation();
+ registerFromSPIRVTranslation();
registerToSPIRVTranslation();
registerToNVVMIRTranslation();
registerToROCLDIRTranslation();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78951.260399.patch
Type: text/x-patch
Size: 1521 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200427/50c680db/attachment.bin>
More information about the llvm-commits
mailing list