Skip to content

Commit a0f5d92

Browse files
committed
Address PR comments
1 parent 4b9a69f commit a0f5d92

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

mlir/lib/Dialect/Rock/Transforms/BlockwiseLoadTileToThreadwise.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,9 @@ class LoweringBlockwiseLoadTileOp final
270270
indicesNext[0] =
271271
arith::AddIOp::create(b, loc, indicesNext[0], one).getResult();
272272

273-
// it's ok if the indices are out of bounds because we use
274-
// GLOBAL_PREFETCH_B8 with Speculative Prefetch
273+
// it's acceptable if the indices are out of bounds because we use
274+
// GLOBAL_PREFETCH_B8 with Speculative Prefetch. See llvm.prefetch
275+
// documentation in AMDGPUUsage.rst
275276
rock::ThreadwisePrefetchOp::create(b, loc, wrappedSource,
276277
/*extraViews=*/b.getArrayAttr({}),
277278
/*extraIndices=*/indicesNext,

mlir/lib/Dialect/Rock/Transforms/SugarToLoops.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,11 @@ struct GlobalPrefetchRewritePattern
11721172
Value source = op.getSource();
11731173

11741174
source = asGlobal(b, source);
1175+
1176+
// it's acceptable if the indices are out of bounds because we use
1177+
// GLOBAL_PREFETCH_B8 with Speculative Prefetch. See llvm.prefetch
1178+
// documentation in AMDGPUUsage.rst localityHint=3 is translated to memory
1179+
// scope SCOPE_SE.
11751180
b.replaceOpWithNewOp<memref::PrefetchOp>(
11761181
op, source, op.getSourceCoord(), /*isWrite=*/false, /*localityHint=*/3,
11771182
/*isDataCache=*/true);

0 commit comments

Comments
 (0)