Skip to content

Commit aec73ea

Browse files
authored
[mlir][sparse] allow unknown ops in one-shot bufferization in mini-pipeline (llvm#77688)
Rationale: Since this mini-pipeline may be used in alternative pipelines (viz. different from the default "sparsifier" pipeline) where unknown ops are handled by alternative bufferization methods that are downstream of this mini-pipeline, we allow unknown ops by default (failure to bufferize is eventually apparent by failing to convert to LLVM IR). This is part of enabling e2e testing for TORCH-MLIR tests using a sparsifier backend
1 parent a08506e commit aec73ea

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,12 @@ mlir::getBufferizationOptionsForSparsification(bool analysisOnly) {
201201
options.testAnalysisOnly = true;
202202
options.printConflicts = true;
203203
}
204+
// Since this mini-pipeline may be used in alternative pipelines (viz.
205+
// different from the default "sparsifier" pipeline) where unknown ops
206+
// are handled by alternative bufferization methods that are downstream
207+
// of this mini-pipeline, we allow unknown ops by default (failure to
208+
// bufferize is eventually apparent by failing to convert to LLVM IR).
209+
options.allowUnknownOps = true;
204210
return options;
205211
}
206212

0 commit comments

Comments
 (0)