diff --git a/lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp b/lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp index 46b218535..804683ac2 100644 --- a/lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp +++ b/lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp @@ -1352,7 +1352,7 @@ class DecomposeAtenSplitWithSizesOp auto sliceTy = dyn_cast_or_null(resultTy.getContainedType()); - if (!isa(sliceTy)) + if (!sliceTy || !sliceTy.hasSizes()) return rewriter.notifyMatchFailure(op, "Slice type is unknown"); int64_t dimInt = 0;