Skip to content

Commit

Permalink
Lint runner
Browse files Browse the repository at this point in the history
  • Loading branch information
sushraja-msft committed Feb 19, 2025
1 parent f8038a4 commit 92db1cf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions onnxruntime/core/providers/coreml/model/model.mm
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ Status CreateInputFeatureProvider(const std::unordered_map<std::string, OnnxTens
break;
}
case ONNX_NAMESPACE::TensorProto_DataType_FLOAT16: {
if (@available(macOS 12.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *))
{
if (@available(macOS 12.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)) {
data_type = MLMultiArrayDataTypeFloat16;
} else {
return ORT_MAKE_STATUS(ONNXRUNTIME, FAIL, "Output data type is not supported, actual type: ",
Expand Down Expand Up @@ -543,8 +542,7 @@ Status Predict(const std::unordered_map<std::string, OnnxTensorData>& inputs,
} else if (coreml_compute_unit & COREML_FLAG_USE_CPU_AND_GPU) {
config.computeUnits = MLComputeUnitsCPUAndGPU;
} else if (coreml_compute_unit & COREML_FLAG_ONLY_ENABLE_DEVICE_WITH_ANE) {
if (@available(macOS 13.0, *))
{
if (@available(macOS 13.0, *)) {
config.computeUnits = MLComputeUnitsCPUAndNeuralEngine; // Apple Neural Engine
} else {
LOGS(logger_, WARNING) << "macOS 13.0+ is required for ANE, using CPU instead.";
Expand Down

0 comments on commit 92db1cf

Please sign in to comment.