Skip to content

Commit cabb6f2

Browse files
lialanclaude
andcommitted
[GPU] Fix CI: always verify DMA ops are lowered, not just in debug builds.
* Move the unlowered-DMA verification walk out of #ifndef NDEBUG so it runs in both debug and release builds. * Use notifyMatchFailure (silent) in the pattern guard instead of emitOpError, letting the post-pattern walk produce the single error. * Remove the extra expected-error that only fired in debug builds. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f563608 commit cabb6f2

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

compiler/src/iree/compiler/Codegen/Common/GPU/AMDGPULowerCoalescedDMAToGatherLDS.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ struct LowerCoalescedGatherDMAPattern final
294294
if (!hasAMDGPUFatRawBufferAddressSpace(srcType)) {
295295
for (Attribute attr : *inBounds) {
296296
if (!cast<BoolAttr>(attr).getValue()) {
297-
dmaOp.emitOpError("in_bounds with OOB dimensions requires "
298-
"fat_raw_buffer address space on source");
299-
return failure();
297+
return rewriter.notifyMatchFailure(
298+
dmaOp, "in_bounds with OOB dimensions requires "
299+
"fat_raw_buffer address space on source");
300300
}
301301
}
302302
}
@@ -503,7 +503,6 @@ struct AMDGPULowerCoalescedDMAToGatherLDSPass final
503503

504504
walkAndApplyPatterns(funcOp, std::move(patterns));
505505

506-
#ifndef NDEBUG
507506
// Verify all CoalescedGatherDMAOps were lowered. Currently, we require all
508507
// ops to be successfully lowered. In the future, a fallback lowering path
509508
// (e.g., using global_load) could handle ops that don't match the pattern.
@@ -514,7 +513,6 @@ struct AMDGPULowerCoalescedDMAToGatherLDSPass final
514513
if (result.wasInterrupted()) {
515514
return signalPassFailure();
516515
}
517-
#endif // NDEBUG
518516
}
519517
};
520518
} // namespace

compiler/src/iree/compiler/Codegen/Common/GPU/test/amdgpu_lower_coalesced_dma_to_gather_lds.mlir

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,6 @@ func.func @no_lower_oob_without_fat_raw_buffer(
12911291
attributes {hal.executable.target = #executable_target_rocm_hsaco_fb,
12921292
translation_info = #translation_64} {
12931293
scf.forall (%arg6) in (64) {
1294-
// expected-error @+2 {{in_bounds with OOB dimensions requires fat_raw_buffer address space on source}}
12951294
// expected-error @+1 {{failed to lower coalesced_gather_dma op}}
12961295
iree_gpu.coalesced_gather_dma %source into %dest lane(%arg6) in_bounds [false, true] :
12971296
memref<2x128xf32>,

0 commit comments

Comments
 (0)