Skip to content

Commit 50bb045

Browse files
committed
Add convert-vector-to-llvm pass to the pipeline.
`convert-vector-to-llvm` pass uses some `vector` transform passes that is not added by `convert-to-llvm`, hence this pass is necessary for proper lowering of vector ops. As not all vector ops are directly converted to llvm, some ops are gradually lowered to other vector ops and those ops are in turn covnerted to llvm.
1 parent 1f8c24b commit 50bb045

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Dialect/GPU/Pipelines/GPUToXeVMPipeline.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ void buildGPUPassPipeline(OpPassManager &pm,
8585
pm.addNestedPass<gpu::GPUModuleOp>(
8686
createConvertGpuOpsToLLVMSPVOps(gpuToLLVMSPVOptions));
8787
}
88-
pm.addNestedPass<gpu::GPUModuleOp>(createConvertToLLVMPass());
8988
pm.addNestedPass<gpu::GPUModuleOp>(createCSEPass());
9089
pm.addNestedPass<gpu::GPUModuleOp>(createReconcileUnrealizedCastsPass());
9190
}
@@ -105,6 +104,7 @@ void buildPostGPUCommonPassPipeline(
105104
pm.addPass(createGpuToLLVMConversionPass(gpuToLLVMOptions));
106105
}
107106
pm.addPass(createLowerAffinePass());
107+
pm.addPass(createConvertVectorToLLVMPass());
108108
pm.addPass(createConvertToLLVMPass());
109109
pm.addPass(createReconcileUnrealizedCastsPass());
110110
pm.addNestedPass<gpu::GPUModuleOp>(createCanonicalizerPass());

0 commit comments

Comments
 (0)