Skip to content

Commit a34dad2

Browse files
authored
Fix verifyLinalgCompatibleTypes which currently doesn't successfully catch torch.tensor. (#947)
1 parent 77ab316 commit a34dad2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Conversion/Utils/Utils.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ LogicalResult verifyLinalgCompatibleTypes(Operation *op,
2626
// TODO: Remove this check but use a separate verification pass to verify the
2727
// invariants expected by later passes.
2828
auto isValidLinalgType = [](Type type) {
29+
if (type.isa<NonValueTensorType>())
30+
return false;
2931
auto tensor = type.dyn_cast<ValueTensorType>();
3032
return !tensor ||
3133
tensor.toBuiltinTensor().dyn_cast_or_null<RankedTensorType>();

0 commit comments

Comments
 (0)