From 7b1128e81d5ed9aa02c5173852fdb8a4ec9f1147 Mon Sep 17 00:00:00 2001 From: nicolo-lucchesi Date: Wed, 4 Oct 2023 10:47:40 +0200 Subject: [PATCH] fixed comparison types errors --- onnxruntime/core/providers/coreml/model/model.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/onnxruntime/core/providers/coreml/model/model.mm b/onnxruntime/core/providers/coreml/model/model.mm index cbee7975b2525..87b438e8c30ee 100644 --- a/onnxruntime/core/providers/coreml/model/model.mm +++ b/onnxruntime/core/providers/coreml/model/model.mm @@ -174,7 +174,7 @@ bool IsArrayContiguous(MLMultiArray* array) { int64_t batch_stride = [array.strides[0] longLongValue]; const auto* shape = array.shape; int64_t batch_elems = 1; - for (int i = 1; i < [shape count]; i++) batch_elems *= [shape[i] longLongValue]; + for (unsigned long i = 1; i < shape.count; i++) batch_elems *= [shape[i] longLongValue]; return batch_stride == batch_elems; } } // namespace @@ -335,7 +335,7 @@ - (Status)predict:(const std::unordered_map&)inputs ORT_RETURN_IF_NOT(IsArrayContiguous(data), "Non-contiguous output MLMultiArray is not currently supported"); __block const void* model_output_buffer = nil; - __block int64_t coreml_buffer_size = 0; + __block unsigned long coreml_buffer_size = 0; [data getBytesWithHandler:^(const void* bytes, NSInteger size) { model_output_buffer = bytes; coreml_buffer_size = size;