Skip to content

Commit

Permalink
fixed comparison types errors
Browse files Browse the repository at this point in the history
  • Loading branch information
NickLucche committed Oct 4, 2023
1 parent 6dda63f commit 7b1128e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions onnxruntime/core/providers/coreml/model/model.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -335,7 +335,7 @@ - (Status)predict:(const std::unordered_map<std::string, OnnxTensorData>&)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;
Expand Down

0 comments on commit 7b1128e

Please sign in to comment.