While debugging this error, I met another problem while trying to print intermediate lowering from Linalg to LLVM.
I am trying to optimize a single
This is the sequence of passes I am using:
funcPM.addPass(mlir::createCanonicalizerPass()); funcPM.addPass(createLinalgCodegenPass(options)); // Run the passes and print the intermediate MLIR module funcPM.addPass(mlir::createConvertVectorToSCFPass()); funcPM.addPass(mlir::createLowerAffinePass()); funcPM.addPass(mlir::createConvertLinalgToLoopsPass());
Now, I would like to print the intermediate IR after
createLinalgCodegenPass, which is a pass I created (following mmperf) that basically tiles/promotes/vectorizes the operation.
However, when I run the pass manager after
createLinalgCodegenPass (as shown in the snippet) I get this error:
LLVM ERROR: Building op `vector.transfer_read` but it isn't registered in this MLIRContext
I have registered the
Vector dialect and I am also allowing unregistered ops. If I run the passes after the
createLowerAffinePass, everything works, but I am not able to see the intermediate IR. Why is it raising this error?
Thanks for any hint,