diff --git a/lib/E2E/E2E.cpp b/lib/E2E/E2E.cpp index 6cb0373e9..9de486f64 100644 --- a/lib/E2E/E2E.cpp +++ b/lib/E2E/E2E.cpp @@ -183,7 +183,11 @@ public: namespace { class ResolveTensorLoadStoreOps : public ResolveTensorLoadStoreOpsBase { - void runOnOperation() { + void getDependentDialects(DialectRegistry ®istry) const override { + registry.insert(); + } + + void runOnOperation() override { auto func = getOperation(); auto *context = &getContext(); @@ -291,7 +295,11 @@ public: namespace { class LowerAllocMemRefOps : public LowerAllocMemRefOpsBase { - void runOnOperation() { + void getDependentDialects(DialectRegistry ®istry) const override { + registry.insert(); + } + + void runOnOperation() override { auto func = getOperation(); auto *context = &getContext(); OwningRewritePatternList patterns; diff --git a/lib/E2E/LowerRankedShapes.cpp b/lib/E2E/LowerRankedShapes.cpp index 1ce014cc3..2c0f64c31 100644 --- a/lib/E2E/LowerRankedShapes.cpp +++ b/lib/E2E/LowerRankedShapes.cpp @@ -12,6 +12,7 @@ #include "mlir/Dialect/Shape/IR/Shape.h" #include "mlir/Dialect/StandardOps/IR/Ops.h" #include "mlir/Transforms/DialectConversion.h" +#include "npcomp/Dialect/Npcomprt/IR/NpcomprtDialect.h" #include "npcomp/Dialect/Npcomprt/IR/NpcomprtOps.h" #include "npcomp/Dialect/TCP/IR/TCPOps.h" @@ -219,7 +220,11 @@ public: // step. namespace { class LowerRankedShapes : public LowerRankedShapesBase { - void runOnOperation() { + void getDependentDialects(DialectRegistry ®istry) const override { + registry.insert(); + } + + void runOnOperation() override { auto func = getOperation(); auto *context = &getContext(); diff --git a/lib/E2E/LowerToHybridTensorMemRef.cpp b/lib/E2E/LowerToHybridTensorMemRef.cpp index 2bda0eafc..5dafe51f4 100644 --- a/lib/E2E/LowerToHybridTensorMemRef.cpp +++ b/lib/E2E/LowerToHybridTensorMemRef.cpp @@ -139,7 +139,11 @@ public: namespace { class LowerBroadcastToToLoops : public LowerBroadcastToToLoopsBase { - void runOnOperation() { + void getDependentDialects(DialectRegistry ®istry) const override { + registry.insert(); + } + + void runOnOperation() override { auto func = getOperation(); MLIRContext *context = &getContext(); ConversionTarget target(*context); @@ -257,7 +261,11 @@ namespace { class LowerLinalgOnTensorToLinalgOnMemref : public LowerLinalgOnTensorToLinalgOnMemrefBase< LowerLinalgOnTensorToLinalgOnMemref> { - void runOnOperation() { + void getDependentDialects(DialectRegistry ®istry) const override { + registry.insert(); + } + + void runOnOperation() override { auto func = getOperation(); auto *context = &getContext(); @@ -351,7 +359,11 @@ GlobalCreator::GlobalCreator(ModuleOp module) { namespace { class LowerConstantTensorsToMemrefs : public LowerConstantTensorsToMemrefsBase { - void runOnOperation() { + void getDependentDialects(DialectRegistry ®istry) const override { + registry.insert(); + } + + void runOnOperation() override { auto module = getOperation(); GlobalCreator globals(module); diff --git a/lib/E2E/LowerToLLVM.cpp b/lib/E2E/LowerToLLVM.cpp index c5e022862..f968fd66f 100644 --- a/lib/E2E/LowerToLLVM.cpp +++ b/lib/E2E/LowerToLLVM.cpp @@ -637,7 +637,11 @@ static LLVMFuncOp createWrapperFunc(LLVMFuncOp func) { namespace { class LowerToLLVM : public LowerToLLVMBase { - void runOnOperation() { + void getDependentDialects(DialectRegistry ®istry) const override { + registry.insert(); + } + + void runOnOperation() override { auto module = getOperation(); auto *context = &getContext(); diff --git a/lib/E2E/LowerToNpcomprtABI.cpp b/lib/E2E/LowerToNpcomprtABI.cpp index 1691642d9..945a408a0 100644 --- a/lib/E2E/LowerToNpcomprtABI.cpp +++ b/lib/E2E/LowerToNpcomprtABI.cpp @@ -227,7 +227,11 @@ namespace { // This pass lowers the public ABI of the module to the primitives exposed by // the npcomprt dialect. class LowerToNpcomprtABI : public LowerToNpcomprtABIBase { - void runOnOperation() { + void getDependentDialects(DialectRegistry ®istry) const override { + registry.insert(); + } + + void runOnOperation() override { ModuleOp module = getOperation(); // Before we lower anything, capture any needed metadata about the argument