Skip to content

Commit 73fa083

Browse files
committed
up
1 parent 3f2c226 commit 73fa083

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

backends/apple/coreml/runtime/delegate/coreml_backend_delegate.mm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,12 @@
8888
ET_LOG(Error, "%s: DataType=%d is not supported", ETCoreMLStrings.delegateIdentifier.UTF8String, (int)tensor.scalar_type());
8989
return std::nullopt;
9090
}
91-
9291
std::vector<ssize_t> strides(tensor.strides().begin(), tensor.strides().end());
9392
std::vector<size_t> shape(tensor.sizes().begin(), tensor.sizes().end());
9493

9594
// If tensor is rank 0, wrap in rank 1
9695
// See https://github.com/apple/coremltools/blob/8.2/coremltools/converters/mil/frontend/torch/exir_utils.py#L73
97-
if (strides.size() == 0) {
96+
if (shape.size() == 0) {
9897
shape.push_back(1);
9998
strides.push_back(1);
10099
}

0 commit comments

Comments
 (0)