diff --git a/mlir/include/mlir/InitAllTranslations.h b/mlir/include/mlir/InitAllTranslations.h --- a/mlir/include/mlir/InitAllTranslations.h +++ b/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(); diff --git a/mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp b/mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp --- a/mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp +++ b/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);