[Torch] add constriants when decompose aten.split_with_sizes (#3555)

pull/3557/head
Yuanqiang Liu 2024-07-23 10:34:29 +08:00 committed by GitHub
parent 45c85c3b34
commit 78846425e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -1352,7 +1352,7 @@ class DecomposeAtenSplitWithSizesOp
auto sliceTy =
dyn_cast_or_null<Torch::BaseTensorType>(resultTy.getContainedType());
if (!isa<Torch::BaseTensorType>(sliceTy))
if (!sliceTy || !sliceTy.hasSizes())
return rewriter.notifyMatchFailure(op, "Slice type is unknown");
int64_t dimInt = 0;