[Mlir-commits] [mlir] [mlir][sparse] minor comment edits in sparsifier pipeline (PR #77000)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Jan 4 12:41:09 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Aart Bik (aartbik)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/77000.diff
1 Files Affected:
- (modified) mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp (+3-4)
``````````diff
diff --git a/mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp b/mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp
index ec74c1c2d54af5..66362d5be4f19c 100644
--- a/mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp
@@ -32,7 +32,6 @@
void mlir::sparse_tensor::buildSparsifier(OpPassManager &pm,
const SparsifierOptions &options) {
// Rewrite named linalg ops into generic ops.
-
pm.addNestedPass<func::FuncOp>(createLinalgGeneralizationPass());
// Sparsification and bufferization mini-pipeline.
@@ -65,6 +64,8 @@ void mlir::sparse_tensor::buildSparsifier(OpPassManager &pm,
pm.addNestedPass<gpu::GPUModuleOp>(createConvertGpuOpsToNVVMOps());
}
+ // Progressively lower to LLVM. Note that the convert-vector-to-llvm
+ // pass is repeated on purpose.
// TODO(springerm): Add sparse support to the BufferDeallocation pass and add
// it to this pipeline.
pm.addNestedPass<func::FuncOp>(createConvertLinalgToLoopsPass());
@@ -80,10 +81,7 @@ void mlir::sparse_tensor::buildSparsifier(OpPassManager &pm,
pm.addNestedPass<func::FuncOp>(createConvertMathToLLVMPass());
pm.addPass(createConvertMathToLibmPass());
pm.addPass(createConvertComplexToLibmPass());
-
- // Repeat convert-vector-to-llvm.
pm.addPass(createConvertVectorToLLVMPass(options.lowerVectorToLLVMOptions()));
-
pm.addPass(createConvertComplexToLLVMPass());
pm.addPass(createConvertVectorToLLVMPass(options.lowerVectorToLLVMOptions()));
pm.addPass(createConvertFuncToLLVMPass());
@@ -101,6 +99,7 @@ void mlir::sparse_tensor::buildSparsifier(OpPassManager &pm,
pm.addPass(createGpuModuleToBinaryPass(gpuModuleToBinaryPassOptions));
}
+ // Ensure all casts are realized.
pm.addPass(createReconcileUnrealizedCastsPass());
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/77000
More information about the Mlir-commits
mailing list