forked from OSchip/llvm-project
[MLIR][SPIRV] Fixed dialect loading in deserialization
Fixed an error when deserializing the SPIR-V binary to MLIR SPIR-V. Before, the SPIR-V dialect was not loaded explicitly into the context, which resulted in unregistered operation error. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D88223
This commit is contained in:
parent
2625433e77
commit
8f72717ebe
|
@ -38,7 +38,7 @@ using namespace mlir;
|
|||
// `inputFilename` and returns a module containing the SPIR-V module.
|
||||
static OwningModuleRef deserializeModule(const llvm::MemoryBuffer *input,
|
||||
MLIRContext *context) {
|
||||
Builder builder(context);
|
||||
context->loadDialect<spirv::SPIRVDialect>();
|
||||
|
||||
// Make sure the input stream can be treated as a stream of SPIR-V words
|
||||
auto start = input->getBufferStart();
|
||||
|
|
Loading…
Reference in New Issue