Skip to content

Commit 19cf4ec

Browse files
mshahneogithub-actions[bot]
authored andcommitted
Automerge: Reland: [GPUToXeVMPipeline][Pipeline] Modify pipeline to add convert-vector-to-llvm. (#169573)
`convert-vector-to-llvm` pass applies a set of vector transformation patterns that are not included in the standard `convert-to-llvm` pass interface. These additional transformations are required to properly lower MLIR vector operations. Since not all vector ops have direct `llvm` dialect lowering, many of them must first be progressively rewritten into simpler or more canonical vector ops, which are then lowered to `llvm`. Therefore, running `convert-vector-to-llvm` is necessary to ensure a complete and correct lowering of vector operations to the `llvm` dialect. Original PR: llvm/llvm-project#166204 + post-commit failure fixes.
2 parents 951ee30 + 23f9030 commit 19cf4ec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,11 @@ void buildPostGPUCommonPassPipeline(
111111
pm.addPass(createGpuToLLVMConversionPass(gpuToLLVMOptions));
112112
}
113113
pm.addPass(createLowerAffinePass());
114+
pm.addPass(createConvertVectorToLLVMPass());
114115
pm.addPass(createConvertToLLVMPass());
115116
pm.addPass(createReconcileUnrealizedCastsPass());
117+
pm.addNestedPass<gpu::GPUModuleOp>(createCanonicalizerPass());
118+
pm.addNestedPass<gpu::GPUModuleOp>(createCSEPass());
116119
// gpu-module-to-binary
117120
{
118121
GpuModuleToBinaryPassOptions gpuToModuleBinOptions;

0 commit comments

Comments
 (0)