Skip to content

Commit 8c5adbe

Browse files
authored
[PrefetchBlock] Do not use location from an erased loop (#3345)
Closes #3314 The creation of barriers in this pass uses a location obtained from the `loop` entity that [was erased earlier](https://github.com/intel/intel-xpu-backend-for-triton/blob/cc1774086e9ec75567b3d0b6ab4d54de3e4fba6e/third_party/intel/lib/TritonIntelGPUTransforms/PrefetchBlock.cpp#L404). Surprisingly, it works on Linux but fails on Windows. Replaced the erased `loop` with `newLoop`. Windows CI with `TritonIntelGPU/prefetch-block.mlir` test passing: https://github.com/intel/intel-xpu-backend-for-triton/actions/runs/13138880536/job/36660853060#step:13:789 Signed-off-by: Dmitry Chigarev <[email protected]>
1 parent cc17740 commit 8c5adbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

third_party/intel/lib/TritonIntelGPUTransforms/PrefetchBlock.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ void PrefetchBlockPass::injectPrefetchOpsInBody(
454454

455455
// FIXME: try to use a named barrier to increase performance.
456456
if (injectSplitBarriers) {
457-
Location loc = loop.getLoc();
457+
Location loc = newLoop.getLoc();
458458
b.setInsertionPoint(yield);
459459
b.create<spirv::INTELControlBarrierWaitOp>(loc, spirv::Scope::Workgroup,
460460
spirv::Scope::Workgroup,

0 commit comments

Comments
 (0)