Skip to content

Commit e8b4bf9

Browse files
agron911meta-codesync[bot]
authored andcommitted
[Cherry-pick] Change: uint -> size_t to make RewriteTensorPointer.cpp crossplatform (#8048) (#567)
Summary: Cherry-picked from upstream OAI repository. Original Commit: 8af2b7b Original Author: Anatoly Myachev Original Date: 2025-09-03 15:52:27 +0200 Original commit message: ``` Change: `uint -> size_t` to make `RewriteTensorPointer.cpp` crossplatform (#8048) Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com> ``` This PR was automatically cherry-picked from the upstream triton-lang/triton repository. Pull Request resolved: #567 Reviewed By: dshi7 Differential Revision: D85985262 Pulled By: agron911 fbshipit-source-id: b6d388f5ca910ac815764bdf4c9dce152e8fb03a
1 parent 93447ba commit e8b4bf9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Dialect/Triton/Transforms/RewriteTensorPointer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ struct RewritedInfo {
8181
// Expand dimensions
8282
Value expandedResult =
8383
builder.create<arith::AddIOp>(loc, splatOffset, i64Range);
84-
for (uint j = 0; j < tensorShape.size(); ++j) {
84+
for (size_t j = 0; j < tensorShape.size(); ++j) {
8585
if (j == i)
8686
continue;
8787
expandedResult =
@@ -259,7 +259,7 @@ class RewriteTensorPointerPass
259259
// Calculate new offsets
260260
assert(info.length() == op.getOffsets().size());
261261
SmallVector<Value> newOffsets;
262-
for (uint i = 0; i < info.length(); ++i) {
262+
for (size_t i = 0; i < info.length(); ++i) {
263263
Value i64Offset = builder.create<arith::ExtSIOp>(
264264
op.getLoc(), builder.getI64Type(), op.getOffsets()[i]);
265265
Value newOffset = builder.create<arith::AddIOp>(

0 commit comments

Comments
 (0)