|
MLIR 22.0.0git
|
A pass that lowers tensor ops to memref ops, regardless of whether they are dense or sparse. More...
Public Member Functions | |
| SparsificationAndBufferizationPass (const bufferization::OneShotBufferizationOptions &bufferizationOptions, const SparsificationOptions &sparsificationOptions, bool createSparseDeallocs, bool enableRuntimeLibrary, bool enableBufferInitialization) | |
| SparsificationAndBufferizationPass (const bufferization::OneShotBufferizationOptions &bufferizationOptions, const SparsificationOptions &sparsificationOptions, bool createSparseDeallocs, bool enableRuntimeLibrary, bool enableBufferInitialization, unsigned vl, bool vla, bool index32, bool gpu, SparseEmitStrategy emitStrategy, SparseParallelizationStrategy parallelizationStrategy) | |
| LogicalResult | runDenseBufferization () |
| Bufferize all dense ops. | |
| void | runOnOperation () override |
A pass that lowers tensor ops to memref ops, regardless of whether they are dense or sparse.
One-Shot Analysis is used to detect RaW conflicts and to insert buffer copies of the tensor level (insertTensorCopies). Afterwards, the lowering of tensor ops to memref ops follows a different code path depending on whether the op is sparse or dense:
Definition at line 58 of file SparsificationAndBufferizationPass.cpp.
|
inline |
Definition at line 63 of file SparsificationAndBufferizationPass.cpp.
|
inline |
Definition at line 74 of file SparsificationAndBufferizationPass.cpp.
|
inline |
Bufferize all dense ops.
This assumes that no further analysis is needed and that all required buffer copies were already inserted by insertTensorCopies in the form of bufferization.alloc_tensor ops.
Definition at line 98 of file SparsificationAndBufferizationPass.cpp.
References mlir::bufferization::bufferizeModuleOp(), mlir::sparse_tensor::containsSparseTensor(), mlir::Operation::getOperands(), mlir::Operation::getResults(), mlir::bufferization::removeBufferizationAttributesInModule(), success(), and TypeRange.
Referenced by runOnOperation().
|
inlineoverride |
Definition at line 125 of file SparsificationAndBufferizationPass.cpp.
References mlir::OpPassManager::addNestedPass(), mlir::OpPassManager::addPass(), mlir::createLoopInvariantCodeMotionPass(), mlir::createLowerForeachToSCFPass(), mlir::createLowerSparseIterationToSCFPass(), mlir::createLowerSparseOpsToForeachPass(), mlir::createPreSparsificationRewritePass(), mlir::createSparseBufferRewritePass(), mlir::createSparseGPUCodegenPass(), mlir::createSparseReinterpretMapPass(), mlir::createSparseSpaceCollapsePass(), mlir::createSparseTensorCodegenPass(), mlir::createSparseTensorConversionPass(), mlir::createSparseVectorizationPass(), mlir::createSparsificationPass(), mlir::createStageSparseOperationsPass(), mlir::bufferization::insertTensorCopies(), mlir::kAll, mlir::kExceptGeneric, mlir::kSparseIterator, and runDenseBufferization().