Skip to content

Commit 4a54311

Browse files
authored
[BACKEND] Fix when trying to convert an mma<!tt.ptr<f32>> into blocked (#4980)
The bitwidth is unimplemented in LLVM for pointer types so it throws an exception when evaluating the condition `tensorTy.getElementType().getIntOrFloatBitWidth()`
1 parent 6ad95ee commit 4a54311

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Dialect/TritonGPU/IR/LinearLayoutConversions.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,6 +1016,8 @@ bool canUseStMatrix(RankedTensorType tensorTy, ArrayRef<unsigned> repShape,
10161016
mlir::dyn_cast<NvidiaMmaEncodingAttr>(tensorTy.getEncoding());
10171017
if (!mmaLayout || !mmaLayout.isHopper())
10181018
return false;
1019+
if (isa<PointerType>(tensorTy.getElementType()))
1020+
return false;
10191021
if (tensorTy.getElementType().getIntOrFloatBitWidth() != 16)
10201022
return false;
10211023
if (order[0] != 1)

0 commit comments

Comments
 (0)