mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-10 17:37:14 +00:00
Adding preprocessor define for checking CAN_USE_COREML8_OR_LATER
This commit is contained in:
parent
e6e3747197
commit
2eb900a267
1 changed files with 1 additions and 4 deletions
|
|
@ -369,10 +369,8 @@ void ProfileComputePlan(NSURL* compileUrl, MLModelConfiguration* config) {
|
|||
#define HAS_COREMLOPTIMIZATIONHINT 0
|
||||
#endif
|
||||
|
||||
|
||||
void ConfigureOptimizationHints(MLModelConfiguration* config, const CoreMLOptions& coreml_options) {
|
||||
if (HAS_COREML8_OR_LATER) {
|
||||
#if HAS_COREMLOPTIMIZATIONHINT
|
||||
#if HAS_COREMLOPTIMIZATIONHINT && CAN_USE_COREML8_OR_LATER
|
||||
MLOptimizationHints* optimizationHints = [[MLOptimizationHints alloc] init];
|
||||
if (coreml_options.UseStrategy("FastPrediction")) {
|
||||
optimizationHints.specializationStrategy = MLSpecializationStrategyFastPrediction;
|
||||
|
|
@ -384,7 +382,6 @@ void ConfigureOptimizationHints(MLModelConfiguration* config, const CoreMLOption
|
|||
// not set
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Status CompileOrReadCachedModel(NSURL* modelUrl, const CoreMLOptions& coreml_options,
|
||||
|
|
|
|||
Loading…
Reference in a new issue