Skip to content

Commit 742eba0

Browse files
committed
do not try to convert tensor of pointer loads
1 parent 7a7ed0e commit 742eba0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

third_party/intel/lib/TritonIntelGPUTransforms/OptimizeBlockIOEncoding.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,14 @@ class TritonIntelGPUOptimizeBlockIOEncodingPass
234234

235235
// get the MakeTensorPtr Op for the load
236236
Value ptr = loadOp.getPtr();
237-
assert(isTensorPointerType(ptr.getType()) && "expecting pointer to tensor");
237+
if (!isTensorPointerType(ptr.getType())) {
238+
// TODO: support tensor of pointer loads
239+
LLVM_DEBUG(DBGS() << "Ptr\n"
240+
<< ptr << " for Load Op:\n"
241+
<< loadOp
242+
<< "\nincompatible with Subgroup 2D Block Layout.\n");
243+
return;
244+
}
238245
MakeTensorPtrOp makeTensorPtrOp = getMakeTensorPtrOp(ptr);
239246
assert(makeTensorPtrOp &&
240247
"expecting a tensor pointer parent to block io load "

0 commit comments

Comments
 (0)