Skip to content

Commit

Permalink
Disable MLOptimizationHints
Browse files Browse the repository at this point in the history
  • Loading branch information
pacowong authored Feb 3, 2025
1 parent bcf186e commit c8be7de
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions onnxruntime/core/providers/coreml/model/model.mm
Original file line number Diff line number Diff line change
Expand Up @@ -547,10 +547,12 @@ Status Predict(const std::unordered_map<std::string, OnnxTensorData>& inputs,
}

// Set the specialization strategy to FastPrediction for macOS 10.15+
if (HAS_COREML8_OR_LATER) {
ConfigureOptimizationHints(config, coreml_options_);
} else {
LOGS(logger_, WARNING) << "iOS 17.4+/macOS 14.4+ or later is required to ConfigureOptimizationHints";
if (@available(macOS 14.4, iOS 17.4, *)) {
if (HAS_COREML8_OR_LATER) {
ConfigureOptimizationHints(config, coreml_options_);
} else {
LOGS(logger_, WARNING) << "iOS 17.4+/macOS 14.4+ or later is required to ConfigureOptimizationHints";
}
}

if (coreml_options_.ProfileComputePlan()) {
Expand Down

0 comments on commit c8be7de

Please sign in to comment.