xref: /aosp_15_r20/external/pytorch/torch/csrc/jit/backends/coreml/objc/PTMCoreMLCompiler.h (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1 #import <CoreML/CoreML.h>
2 
3 #include <string>
4 
5 NS_ASSUME_NONNULL_BEGIN
6 
7 @interface PTMCoreMLCompiler : NSObject
8 
9 + (void)setCacheDirectory:(const std::string&)dir;
10 
11 + (NSString*)cacheDirectory;
12 
13 + (BOOL)compileModel:(const std::string&)modelSpecs modelID:(const std::string&)modelID;
14 
15 + (nullable MLModel*)loadModel:(const std::string)modelID
16                        backend:(const std::string)backend
17              allowLowPrecision:(BOOL)allowLowPrecision
18                          error:(NSError**)error;
19 
20 @end
21 
22 NS_ASSUME_NONNULL_END
23