Skip to content

Commit 1704f1c

Browse files
python3kgaeXiang Li
andauthored
Enable 1D tensor support for enableMakeGatherScatterTensorPtr (#321)
This will allow the sized mask be collect on tts.load/tts.store for later pass. Without the change, tts.gather/tts.scatter will be generated with a bool tensor mask. --------- Co-authored-by: Xiang Li <[email protected]>
1 parent da086eb commit 1704f1c

File tree

5 files changed

+281
-170
lines changed

5 files changed

+281
-170
lines changed

lib/AnalysisStructured/PtrAnalysis.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,10 +1217,6 @@ LogicalResult PtrAnalysis::rewriteAddptrOp(triton::AddPtrOp op) {
12171217
auto maketptrOp = state.createTTSMakeTensorPtrOp(builder, op.getLoc());
12181218
ptrMap.map(op.getResult(), maketptrOp.getResult());
12191219
} else if (enableMakeGatherScatterTensorPtr) {
1220-
// If there is only one dimension, return failure since there are no
1221-
// continuous dimensions.
1222-
if (state.getRank() == 1)
1223-
return failure();
12241220
PtrState unstructuredState;
12251221
// Switch to unstructured state analysis to create offsets and strides
12261222
// for the non-structured dimension.

0 commit comments

Comments
 (0)