HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
coreml_provider_factory.h
Go to the documentation of this file.
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // Licensed under the MIT License.
3 #pragma once
4 
5 #include "onnxruntime_c_api.h"
6 
7 // COREMLFlags are bool options we want to set for CoreML EP
8 // This enum is defined as bit flags, and cannot have negative value
9 // To generate an uint32_t coreml_flags for using with OrtSessionOptionsAppendExecutionProvider_CoreML below,
10 // uint32_t coreml_flags = 0;
11 // coreml_flags |= COREML_FLAG_USE_CPU_ONLY;
14 
15  // Using CPU only in CoreML EP, this may decrease the perf but will provide
16  // reference output value without precision loss, which is useful for validation
18 
19  // Enable CoreML EP on subgraph
21 
22  // By default CoreML Execution provider will be enabled for all compatible Apple devices
23  // Enable this option will only enable CoreML EP for Apple devices with ANE (Apple Neural Engine)
24  // Please note, enable this option does not guarantee the entire model to be executed using ANE only
26 
27  // Keep COREML_FLAG_MAX at the end of the enum definition
28  // And assign the last COREMLFlag to it
30 };
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 ORT_EXPORT ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_CoreML,
37  _In_ OrtSessionOptions* options, uint32_t coreml_flags);
38 
39 #ifdef __cplusplus
40 }
41 #endif
#define _In_
#define ORT_EXPORT
ORT_EXPORT ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_CoreML, _In_ OrtSessionOptions *options, uint32_t coreml_flags)