Skip to content

Commit 4241e84

Browse files
authored
[mlir][sparse] minor comment edits in sparsifier pipeline (#77000)
1 parent cb7fe9a commit 4241e84

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
void mlir::sparse_tensor::buildSparsifier(OpPassManager &pm,
3333
const SparsifierOptions &options) {
3434
// Rewrite named linalg ops into generic ops.
35-
3635
pm.addNestedPass<func::FuncOp>(createLinalgGeneralizationPass());
3736

3837
// Sparsification and bufferization mini-pipeline.
@@ -65,6 +64,8 @@ void mlir::sparse_tensor::buildSparsifier(OpPassManager &pm,
6564
pm.addNestedPass<gpu::GPUModuleOp>(createConvertGpuOpsToNVVMOps());
6665
}
6766

67+
// Progressively lower to LLVM. Note that the convert-vector-to-llvm
68+
// pass is repeated on purpose.
6869
// TODO(springerm): Add sparse support to the BufferDeallocation pass and add
6970
// it to this pipeline.
7071
pm.addNestedPass<func::FuncOp>(createConvertLinalgToLoopsPass());
@@ -80,10 +81,7 @@ void mlir::sparse_tensor::buildSparsifier(OpPassManager &pm,
8081
pm.addNestedPass<func::FuncOp>(createConvertMathToLLVMPass());
8182
pm.addPass(createConvertMathToLibmPass());
8283
pm.addPass(createConvertComplexToLibmPass());
83-
84-
// Repeat convert-vector-to-llvm.
8584
pm.addPass(createConvertVectorToLLVMPass(options.lowerVectorToLLVMOptions()));
86-
8785
pm.addPass(createConvertComplexToLLVMPass());
8886
pm.addPass(createConvertVectorToLLVMPass(options.lowerVectorToLLVMOptions()));
8987
pm.addPass(createConvertFuncToLLVMPass());
@@ -101,6 +99,7 @@ void mlir::sparse_tensor::buildSparsifier(OpPassManager &pm,
10199
pm.addPass(createGpuModuleToBinaryPass(gpuModuleToBinaryPassOptions));
102100
}
103101

102+
// Ensure all casts are realized.
104103
pm.addPass(createReconcileUnrealizedCastsPass());
105104
}
106105

0 commit comments

Comments
 (0)