Handle memref.copy/subview ops & Add compiler pass pipeline#266
Handle memref.copy/subview ops & Add compiler pass pipeline#266ShangkunLi merged 4 commits intocoredac:mainfrom
Conversation
|
Plz elaborate on "handle the memref.copy and memref.subview ops". How are they handled?
I thought at least two passes/stages needed for affine -> taskflow -> neura, why single pass can perform this? |
I have updated the description of how we handle As for // This pass pipeline can convert affine dialect into taskflow dialect with neura.kernel op.
void mlir::taskflow::registerTaskflowConversionPassPipeline() {
PassPipelineRegistration<>(
"taskflow-conversion",
"Converts affine dialects to taskflow dialect with neura.kernel ops.",
[](OpPassManager &pm) {
pm.addPass(mlir::createConvertAffineToTaskflowPass());
pm.addPass(mlir::taskflow::createConstructHyperblockFromTaskPass());
pm.addPass(mlir::taskflow::createClassifyCountersPass());
pm.addPass(mlir::createConvertTaskflowToNeuraPass());
});
} |
|
affine.load/store will later be lowered to what? |
They will be handled by the neura lowering process. They can be either lowered to |
In this pr:
memref.copyandmemref.subviewopsFor
memref.subviewops, we transform such ops intoaffine.load/storedirectly, like:For
memref.copyops, we transform it toaffine.forwithaffine.load/store, like:--tosa-to-affine-conversion: lowers fromtosadialect toaffinedialect--taskflow-conversion: converts affine dialects totaskflow.task+neura.kernel