diff --git a/lib/Conversion/TorchToTosa/TorchToTosa.cpp b/lib/Conversion/TorchToTosa/TorchToTosa.cpp index 066126fb0906..0caddd0677dd 100644 --- a/lib/Conversion/TorchToTosa/TorchToTosa.cpp +++ b/lib/Conversion/TorchToTosa/TorchToTosa.cpp @@ -4019,7 +4019,7 @@ LogicalResult ConvertAtenOp::matchAndRewrite( auto index = adaptor.getIndex(); auto indexType = dyn_cast(index.getType()); - auto indexShape = indexType.getShape(); + auto indexShape = SmallVector(indexType.getShape()); if (!indexType) return rewriter.notifyMatchFailure(