Skip to content

Commit 0d84566

Browse files
committed
[mlir] Fix asan errors in gpu transform dialect
1 parent e62681e commit 0d84566

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mlir/lib/Dialect/GPU/TransformOps/GPUTransformOps.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ DiagnosedSilenceableFailure mlir::transform::gpu::mapForeachToBlocksImpl(
169169
SmallVector<int64_t> mapping;
170170
if (!foreachThreadOp.getMapping().has_value())
171171
return transformOp.emitSilenceableError() << "mapping must be present";
172-
for (DeviceMappingAttrInterface map : *foreachThreadOp.getMapping()) {
172+
for (DeviceMappingAttrInterface map :
173+
foreachThreadOp.getMapping()->getValue()) {
173174
if (auto blockMap = map.dyn_cast<GPUBlockMappingAttr>()) {
174175
mapping.push_back((int64_t)blockMap.getBlock());
175176
} else {
@@ -351,7 +352,8 @@ static DiagnosedSilenceableFailure rewriteOneForeachThreadToGpuThreads(
351352
SmallVector<int64_t> mapping;
352353
if (!foreachThreadOp.getMapping().has_value())
353354
return failureHelper("mapping must be present");
354-
for (DeviceMappingAttrInterface map : *foreachThreadOp.getMapping()) {
355+
for (DeviceMappingAttrInterface map :
356+
foreachThreadOp.getMapping()->getValue()) {
355357
if (auto threadMap = map.dyn_cast<GPUThreadMappingAttr>()) {
356358
mapping.push_back((int64_t)threadMap.getThread());
357359
} else {

0 commit comments

Comments
 (0)