Skip to content

Commit

Permalink
Fix verifyLinalgCompatibleTypes which currently doesn't successfull…
Browse files Browse the repository at this point in the history
…y catch `torch.tensor`. (llvm#947)
  • Loading branch information
makslevental authored Jun 15, 2022
1 parent 77ab316 commit a34dad2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Conversion/Utils/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ LogicalResult verifyLinalgCompatibleTypes(Operation *op,
// TODO: Remove this check but use a separate verification pass to verify the
// invariants expected by later passes.
auto isValidLinalgType = [](Type type) {
if (type.isa<NonValueTensorType>())
return false;
auto tensor = type.dyn_cast<ValueTensorType>();
return !tensor ||
tensor.toBuiltinTensor().dyn_cast_or_null<RankedTensorType>();
Expand Down

0 comments on commit a34dad2

Please sign in to comment.