We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f022977 commit 65171ccCopy full SHA for 65171cc
backends/apple/coreml/runtime/delegate/coreml_backend_delegate.mm
@@ -241,6 +241,12 @@ ModelLoggingOptions get_logging_options(BackendExecutionContext& context) {
241
std::array<SizesType, kTensorDimensionLimit> new_shape;
242
for (size_t i = nInputs; i < nInputs + nOutputs; i++) {
243
Tensor& t = args[i]->toTensor();
244
+ // If t has rank 0, do not resize. delegate_args[i] will have rank 1
245
+ // because we resized it in get_multi_array
246
+ if (t.dim() == 0) {
247
+ continue;
248
+ }
249
+
250
int rank = delegate_args[i].layout().rank();
251
assert (rank <= new_shape.size());
252
for (int d = 0; d < rank; d++) {
0 commit comments