Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
2 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
 
#import <Foundation/Foundation.h>
 
#import "ort_session.h"
 
#ifdef __cplusplus
extern "C" {
#endif
 
/**
 * Gets whether the CoreML execution provider is available.
 */
BOOL ORTIsCoreMLExecutionProviderAvailable(void);
 
#ifdef __cplusplus
}
#endif
 
NS_ASSUME_NONNULL_BEGIN
 
/**
 * Options for configuring the CoreML execution provider.
 */
@interface ORTCoreMLExecutionProviderOptions : NSObject
 
/**
 * Whether the CoreML execution provider should run on CPU only.
 */
@property BOOL useCPUOnly;
/**
 * exclude ANE in CoreML.
 */
@property BOOL useCPUAndGPU;
/**
 * Whether the CoreML execution provider is enabled on subgraphs.
 */
@property BOOL enableOnSubgraphs;
 
/**
 * Whether the CoreML execution provider is only enabled for devices with Apple
 * Neural Engine (ANE).
 */
@property BOOL onlyEnableForDevicesWithANE;
 
/**
 * Only allow CoreML EP to take nodes with inputs with static shapes. By default it will also allow inputs with
 * dynamic shapes. However, the performance may be negatively impacted if inputs have dynamic shapes.
 */
@property BOOL onlyAllowStaticInputShapes;
 
/**
 * Create an MLProgram. By default it will create a NeuralNetwork model. Requires Core ML 5 or later.
 */
@property BOOL createMLProgram;
 
@end
 
@interface ORTSessionOptions (ORTSessionOptionsCoreMLEP)
 
/**
 * Enables the CoreML execution provider in the session configuration options.
 * It is appended to the execution provider list which is ordered by
 * decreasing priority.
 *
 * @param options The CoreML execution provider configuration options.
 * @param error Optional error information set if an error occurs.
 * @return Whether the provider was enabled successfully.
 */
- (BOOL)appendCoreMLExecutionProviderWithOptions:(ORTCoreMLExecutionProviderOptions*)options
                                           error:(NSError**)error;
/**
 * Enables the CoreML execution provider in the session configuration options.
 * It is appended to the execution provider list which is ordered by
 * decreasing priority.
 *
 * @param provider_options The CoreML execution provider options in dict.
 *  available keys-values: more detail in core/providers/coreml/coreml_execution_provider.h
 *      kCoremlProviderOption_MLComputeUnits: one of "CPUAndNeuralEngine", "CPUAndGPU", "CPUOnly", "All"
 *      kCoremlProviderOption_ModelFormat: one of "MLProgram", "NeuralNetwork"
 *      kCoremlProviderOption_RequireStaticInputShapes: "1" or "0"
 *      kCoremlProviderOption_EnableOnSubgraphs: "1" or "0"
 * @param error Optional error information set if an error occurs.
 * @return Whether the provider was enabled successfully.
 */
- (BOOL)appendCoreMLExecutionProviderWithOptionsV2:(NSDictionary*)provider_options
                                             error:(NSError**)error;
@end
 
NS_ASSUME_NONNULL_END