Skip to content

Commit c10dad4

Browse files
[mlir][SparseTensor] Add missing dependent dialect to pass
This commit fixes the following error when stopping the sparse compiler pipeline after bufferization (e.g., with `test-analysis-only`): ``` LLVM ERROR: Building op `vector.print` but it isn't known in this MLIRContext: the dialect may not be loaded or this operation hasn't been added by the dialect. See also https://mlir.llvm.org/getting_started/Faq/#registered-loaded-dependent-whats-up-with-dialects-management ```
1 parent 37b7207 commit c10dad4

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

mlir/include/mlir/Dialect/SparseTensor/Transforms/Passes.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ def SparsificationAndBufferization : Pass<"sparsification-and-bufferization", "M
460460
"memref::MemRefDialect",
461461
"scf::SCFDialect",
462462
"sparse_tensor::SparseTensorDialect",
463+
"vector::VectorDialect"
463464
];
464465
}
465466

mlir/lib/Dialect/SparseTensor/Transforms/SparsificationAndBufferizationPass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "mlir/Dialect/SCF/IR/SCF.h"
2525
#include "mlir/Dialect/SparseTensor/IR/SparseTensor.h"
2626
#include "mlir/Dialect/SparseTensor/Transforms/Passes.h"
27+
#include "mlir/Dialect/Vector/IR/VectorOps.h"
2728
#include "mlir/Pass/PassManager.h"
2829
#include "mlir/Transforms/Passes.h"
2930

0 commit comments

Comments
 (0)