Skip to content

Commit 21f1f4f

Browse files
committed
Add check
1 parent a7b780d commit 21f1f4f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mlir/lib/Dialect/XeGPU/Transforms/XeGPUWgToSgDistribute.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,9 @@ struct WgToSgLoadGatherOpWithOffset
776776
return failure();
777777

778778
Location loc = op.getLoc();
779-
VectorType resultType = op.getResult().getType();
779+
VectorType resultType = dyn_cast<VectorType>(op.getResult().getType());
780+
if (!resultType)
781+
return failure();
780782
ArrayRef<int64_t> wgShape = resultType.getShape();
781783

782784
xegpu::LayoutAttr layout = xegpu::getLayoutAttr(op.getResult());

0 commit comments

Comments
 (0)