-
Notifications
You must be signed in to change notification settings - Fork 514
CoreML macOS xcode15.3 b2
Alex Soto edited this page May 22, 2024
·
2 revisions
#CoreML.framework https://github.com/xamarin/xamarin-macios/pull/20097
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/CoreML.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/CoreML.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/CoreML.h 2024-01-10 00:55:48
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/CoreML.h 2024-01-27 18:17:35
@@ -82,6 +82,6 @@
#import <CoreML/MLModelStructureProgramValue.h>
#import <CoreML/MLModelStructureProgramValueType.h>
-#import <CoreML/MLEvaluationPlan.h>
-#import <CoreML/MLEvaluationPlanComputeDevice.h>
-#import <CoreML/MLEvaluationPlanCost.h>
+#import <CoreML/MLComputePlan.h>
+#import <CoreML/MLComputePlanCost.h>
+#import <CoreML/MLComputePlanDeviceUsage.h>
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLComputePlan.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLComputePlan.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLComputePlan.h 1969-12-31 19:00:00
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLComputePlan.h 2024-01-27 13:51:52
@@ -0,0 +1,106 @@
+//
+// MLComputePlan.h
+// CoreML_framework
+//
+// Copyright © 2023 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <CoreML/MLExport.h>
+
+@class MLComputePlanCost;
+@class MLComputePlanDeviceUsage;
+@class MLModelAsset;
+@class MLModelConfiguration;
+@class MLModelStructure;
+@class MLModelStructureNeuralNetworkLayer;
+@class MLModelStructureProgramOperation;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/// A class describing the plan for executing a model.
+///
+/// The application can use the plan to estimate the necessary cost and
+/// resources of the model before running the predictions.
+///
+///```
+/// // Load the compute plan of an ML Program model.
+/// [MLComputePlan loadContentsOfURL:modelURL configuration:configuration completionHandler:^(MLComputePlan * _Nullable computePlan, NSError * _Nullable error) {
+/// if (!computePlan) {
+/// // Handle error.
+/// return;
+/// }
+/// MLModelStructureProgram *program = computePlan.modelStructure.program;
+/// if (!program) {
+/// [NSException raise:NSInternalInconsistencyException format:@"Unexpected model type."];
+/// }
+///
+/// MLModelStructureFunction *mainFunction = program.functions["main"];
+/// if (!mainFunction) {
+/// [NSException raise:NSInternalInconsistencyException format:@"Missing main function."];
+/// }
+///
+/// NSArray<MLModelStructureProgramOperation *> *operations = mainFunction.block.operations;
+/// for (MLModelStructureProgramOperation *operation in operations) {
+/// // Get the compute device usage for the operation.
+/// MLComputeDeviceUsage *computeDeviceUsage = [computePlan computeDeviceUsageForMLProgramOperation:operation];
+/// // Get the estimated cost of executing the operation.
+/// MLComputePlanCost *estimatedCost = [computePlan estimatedCostOfMLProgramOperation:operation];
+///
+/// }
+/// }];
+///```
+///
+__attribute__((objc_subclassing_restricted))
+ML_EXPORT NS_REFINED_FOR_SWIFT
+API_AVAILABLE(macos(14.4), ios(17.4), watchos(10.4), tvos(17.4))
+@interface MLComputePlan : NSObject
+
+- (instancetype)init NS_UNAVAILABLE;
+
++ (instancetype)new NS_UNAVAILABLE;
+
+
+/// Construct the compute plan of a model asynchronously given the location of its on-disk representation.
+///
+/// @param url The location of its on-disk representation (.mlmodelc directory).
+/// @param configuration The model configuration.
+/// @param handler When the compute plan is constructed successfully or unsuccessfully, the completion handler is invoked with a valid MLComputePlan instance or NSError object.
++ (void)loadContentsOfURL:(NSURL *)url
+ configuration:(MLModelConfiguration *)configuration
+ completionHandler:(void (^)(MLComputePlan * _Nullable computePlan, NSError * _Nullable error))handler NS_SWIFT_ASYNC_NAME(load(contentsOf:configuration:));
+
+/// Construct the compute plan of a model asynchronously given the model asset.
+///
+/// @param asset The model asset.
+/// @param configuration The model configuration.
+/// @param handler When the compute plan is constructed successfully or unsuccessfully, the completion handler is invoked with a valid MLComputePlan instance or NSError object.
++ (void)loadModelAsset:(MLModelAsset *)asset
+ configuration:(MLModelConfiguration *)configuration
+ completionHandler:(void (^)(MLComputePlan * _Nullable computePlan, NSError * _Nullable error))handler NS_SWIFT_ASYNC_NAME(load(asset:configuration:));
+
+/// Returns the estimated cost of executing an ML Program operation.
+///
+/// @param operation An ML Program operation.
+/// @returns The estimated cost of executing the operation or nil if the cost couldn't be estimated.
+- (nullable MLComputePlanCost *)estimatedCostOfMLProgramOperation:(MLModelStructureProgramOperation *)operation NS_SWIFT_NAME(cost(of:));
+
+/// Returns the anticipated compute devices that would be used for executing a NeuralNetwork layer.
+///
+/// @param layer A NeuralNetwork layer.
+/// @returns The anticipated compute devices that would be used for executing the layer or `nil` if the usage couldn't be determined.
+- (nullable MLComputePlanDeviceUsage *)computeDeviceUsageForNeuralNetworkLayer:(MLModelStructureNeuralNetworkLayer *)layer NS_SWIFT_NAME(computeDeviceUsage(for:));
+
+/// Returns The anticipated compute devices that would be used for executing an ML Program operation.
+///
+/// @param operation An ML Program operation.
+/// @returns The anticipated compute devices that would be used for evaluating the operation or `nil`if the usage couldn't be determined.
+- (nullable MLComputePlanDeviceUsage *)computeDeviceUsageForMLProgramOperation:(MLModelStructureProgramOperation *)operation NS_SWIFT_NAME(computeDeviceUsage(for:));
+
+/// The model structure.
+@property (readonly, strong, nonatomic) MLModelStructure *modelStructure;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLComputePlanCost.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLComputePlanCost.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLComputePlanCost.h 1969-12-31 19:00:00
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLComputePlanCost.h 2024-01-27 18:17:38
@@ -0,0 +1,29 @@
+//
+// MLComputePlanCost.h
+// CoreML_framework
+//
+// Copyright © 2023 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <CoreML/MLExport.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/// A class representing the estimated cost of executing a layer/operation.
+__attribute__((objc_subclassing_restricted))
+ML_EXPORT NS_REFINED_FOR_SWIFT NS_SWIFT_SENDABLE
+API_AVAILABLE(macos(14.4), ios(17.4), watchos(10.4), tvos(17.4))
+@interface MLComputePlanCost : NSObject
+
+- (instancetype)init NS_UNAVAILABLE;
+
++ (instancetype)new NS_UNAVAILABLE;
+
+/// The estimated workload of executing the operation over the total model execution. The value is between [0.0, 1.0].
+@property (readonly, assign, nonatomic) double weight;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLComputePlanDeviceUsage.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLComputePlanDeviceUsage.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLComputePlanDeviceUsage.h 1969-12-31 19:00:00
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLComputePlanDeviceUsage.h 2024-01-27 18:17:38
@@ -0,0 +1,29 @@
+//
+// MLComputePlanDeviceUsage.h
+// CoreML_framework
+//
+// Copyright © 2023 Apple Inc. All rights reserved.
+//
+
+#import <CoreML/CoreML.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/// The anticipated compute devices that would be used for executing a layer/operation.
+__attribute__((objc_subclassing_restricted))
+ML_EXPORT NS_REFINED_FOR_SWIFT NS_SWIFT_SENDABLE
+API_AVAILABLE(macos(14.4), ios(17.4), watchos(10.4), tvos(17.4))
+@interface MLComputePlanDeviceUsage : NSObject
+
+- (instancetype)init NS_UNAVAILABLE;
+
++ (instancetype)new NS_UNAVAILABLE;
+
+/// The compute devices that can execute the layer/operation.
+@property (readonly, copy, nonatomic) NSArray<id<MLComputeDeviceProtocol>> *supportedComputeDevices NS_SWIFT_NAME(supported);
+/// The compute device that the framework prefers to execute the layer/operation.
+@property (readonly, strong, nonatomic) id<MLComputeDeviceProtocol> preferredComputeDevice NS_SWIFT_NAME(preferred);
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLEvaluationPlan.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLEvaluationPlan.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLEvaluationPlan.h 2024-01-10 00:55:49
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLEvaluationPlan.h 1969-12-31 19:00:00
@@ -1,67 +0,0 @@
-//
-// MLEvaluationPlan.h
-// CoreML_framework
-//
-// Copyright © 2023 Apple Inc. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-#import <CoreML/MLExport.h>
-
-@class MLModelStructure;
-@class MLModelConfiguration;
-
-@class MLEvaluationPlanComputeDevice;
-@class MLEvaluationPlanCost;
-
-@class MLModelStructureNeuralNetworkLayer;
-@class MLModelStructureProgramOperation;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/// A class representing the evaluation plan of a model.
-///
-/// The application can use the evaluation plan to estimate the necessary cost
-/// and resources of the model before running the predictions.
-__attribute__((objc_subclassing_restricted))
-ML_EXPORT NS_REFINED_FOR_SWIFT
-@interface MLEvaluationPlan : NSObject
-
-- (instancetype)init NS_UNAVAILABLE;
-
-+ (instancetype)new NS_UNAVAILABLE;
-
-/// Construct an evaluation plan from a model structure and the model configuration.
-///
-/// @param modelStructure The structure of a model.
-/// @param configuration The model configuration.
-/// @param error A pointer to receive error information on failure.
-+ (nullable instancetype)evaluationPlanOfModelStructure:(MLModelStructure *)modelStructure
- configuration:(MLModelConfiguration *)configuration
- error:(NSError * _Nullable __autoreleasing *)error NS_SWIFT_NAME(init(of:configuration:));
-
-/// Returns the estimated cost of evaluating a MLProgram operation.
-///
-/// @param operation A MLProgram operation.
-/// @returns The estimated cost of evaluating an operation or nil if the cost couldn't be estimated.
-- (nullable MLEvaluationPlanCost *)estimatedCostOfMLProgramOperation:(MLModelStructureProgramOperation *)operation NS_SWIFT_NAME(cost(of:));
-
-/// Returns The anticipated compute devices that would be used for evaluating a NeuralNetwork layer.
-///
-/// @param layer A NeuralNetwork layer.
-/// @returns The anticipated compute devices that would be used for evaluating the layer or `nil` if the information couldn't be determined.
-- (nullable MLEvaluationPlanComputeDevice *)computeDeviceForNeuralNetworkLayer:(MLModelStructureNeuralNetworkLayer *)layer NS_SWIFT_NAME(computeDevice(for:));
-
-/// Returns The anticipated compute devices that would be used for evaluating a MLProgram operation.
-///
-/// @param operation A MLProgram operation.
-/// @returns The anticipated compute devices that would be used for evaluating the operation or `nil` if the information couldn't be determined.
-- (nullable MLEvaluationPlanComputeDevice *)computeDeviceForMLProgramOperation:(MLModelStructureProgramOperation *)operation NS_SWIFT_NAME(computeDevice(for:));
-
-/// The model structure.
-@property (readonly, strong, nonatomic) MLModelStructure *modelStructure;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLEvaluationPlanComputeDevice.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLEvaluationPlanComputeDevice.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLEvaluationPlanComputeDevice.h 2024-01-10 00:55:48
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLEvaluationPlanComputeDevice.h 1969-12-31 19:00:00
@@ -1,28 +0,0 @@
-//
-// MLEvaluationPlanComputeDevice.h
-// CoreML_framework
-//
-// Copyright © 2023 Apple Inc. All rights reserved.
-//
-
-#import <CoreML/CoreML.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-/// The anticipated compute devices that would be used for evaluating a layer/operation.
-__attribute__((objc_subclassing_restricted))
-ML_EXPORT NS_REFINED_FOR_SWIFT NS_SWIFT_SENDABLE
-@interface MLEvaluationPlanComputeDevice : NSObject
-
-- (instancetype)init NS_UNAVAILABLE;
-
-+ (instancetype)new NS_UNAVAILABLE;
-
-/// The compute devices that can evaluate the layer/operation.
-@property (readonly, copy, nonatomic) NSArray<id<MLComputeDeviceProtocol>> *supportedComputeDevices NS_SWIFT_NAME(supported);
-/// The preferred compute device that would evaluate the layer/operation.
-@property (readonly, strong, nonatomic) id<MLComputeDeviceProtocol> preferredComputeDevice NS_SWIFT_NAME(preferred);
-
-@end
-
-NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLEvaluationPlanCost.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLEvaluationPlanCost.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLEvaluationPlanCost.h 2024-01-10 00:55:48
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLEvaluationPlanCost.h 1969-12-31 19:00:00
@@ -1,28 +0,0 @@
-//
-// MLEvaluationPlanCost.h
-// CoreML_framework
-//
-// Copyright © 2023 Apple Inc. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-#import <CoreML/MLExport.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-/// A class representing the estimated cost of evaluating a layer/operation.
-__attribute__((objc_subclassing_restricted))
-ML_EXPORT NS_REFINED_FOR_SWIFT NS_SWIFT_SENDABLE
-@interface MLEvaluationPlanCost : NSObject
-
-- (instancetype)init NS_UNAVAILABLE;
-
-+ (instancetype)new NS_UNAVAILABLE;
-
-/// The estimated time of the operation over the total model evaluation. The value is always between [0.0, 1.0].
-@property (readonly, assign, nonatomic) double weight;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelCollection.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelCollection.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelCollection.h 2024-01-10 02:45:31
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelCollection.h 2024-01-27 18:17:38
@@ -16,18 +16,18 @@
*
* A collection of models managed as part of Core ML Model Deployment.
*/
-MODELCOLLECTION_SUNSET("Use Background Assets or NSURLSession instead.", macos(11.0, API_TO_BE_DEPRECATED), ios(14.0, API_TO_BE_DEPRECATED))API_UNAVAILABLE(tvos, watchos)
+API_DEPRECATED("Use Background Assets or NSURLSession instead.", macos(11.0, 14.4), ios(14.0, 17.4))API_UNAVAILABLE(tvos, watchos)
ML_EXPORT
@interface MLModelCollection : NSObject
/// The identifier of the model collection you want to access, as configured in the Core ML Model Deployment dashboard.
-@property (readonly, nonatomic, copy) NSString *identifier MODELCOLLECTION_SUNSET("Use Background Assets or NSURLSession instead.", macos(11.0, API_TO_BE_DEPRECATED), ios(14.0, API_TO_BE_DEPRECATED));
+@property (readonly, nonatomic, copy) NSString *identifier API_DEPRECATED("Use Background Assets or NSURLSession instead.", macos(11.0, 14.4), ios(14.0, 17.4));
/// Information about the models downloaded in the collection, or an empty dictionary if the collection has not been downloaded.
-@property (readonly, nonatomic, copy) NSDictionary<NSString *, MLModelCollectionEntry *> *entries MODELCOLLECTION_SUNSET("Use Background Assets or NSURLSession instead.", macos(11.0, API_TO_BE_DEPRECATED), ios(14.0, API_TO_BE_DEPRECATED));
+@property (readonly, nonatomic, copy) NSDictionary<NSString *, MLModelCollectionEntry *> *entries API_DEPRECATED("Use Background Assets or NSURLSession instead.", macos(11.0, 14.4), ios(14.0, 17.4));
/// The identifier for the currently downloaded deployment, corresponding to a recent deployment on the Core ML Model Deployment dashboard.
-@property (readonly, nonatomic, copy) NSString *deploymentID MODELCOLLECTION_SUNSET("Use Background Assets or NSURLSession instead.", macos(11.0, API_TO_BE_DEPRECATED), ios(14.0, API_TO_BE_DEPRECATED));
+@property (readonly, nonatomic, copy) NSString *deploymentID API_DEPRECATED("Use Background Assets or NSURLSession instead.", macos(11.0, 14.4), ios(14.0, 17.4));
/*!
Request access to a model collection. If the collection is not downloaded on the device, it is requested
@@ -42,7 +42,7 @@
*/
+ (NSProgress *)beginAccessingModelCollectionWithIdentifier:(NSString *)identifier
completionHandler:(void (^)(MLModelCollection *_Nullable modelCollection, NSError *_Nullable error))completionHandler NS_REFINED_FOR_SWIFT
- MODELCOLLECTION_SUNSET("Use Background Assets or NSURLSession instead.", macos(11.0, API_TO_BE_DEPRECATED), ios(14.0, API_TO_BE_DEPRECATED));
+ API_DEPRECATED("Use Background Assets or NSURLSession instead.", macos(11.0, 14.4), ios(14.0, 17.4));
/*!
End access to a model collection. This informs the system you have finished accessing the models within the collection.
@@ -54,7 +54,7 @@
*/
+ (void)endAccessingModelCollectionWithIdentifier:(NSString *)identifier
completionHandler:(void (^)(BOOL success, NSError *_Nullable error))completionHandler NS_REFINED_FOR_SWIFT NS_SWIFT_ASYNC_NAME(endAccessing(identifier:))
- MODELCOLLECTION_SUNSET("Use Background Assets or NSURLSession instead.", macos(11.0, API_TO_BE_DEPRECATED), ios(14.0, API_TO_BE_DEPRECATED));
+ API_DEPRECATED("Use Background Assets or NSURLSession instead.", macos(11.0, 14.4), ios(14.0, 17.4));
- (instancetype)init NS_UNAVAILABLE;
@@ -63,9 +63,9 @@
@end
/// Notification posted when the model collection has changed.
-MODELCOLLECTION_SUNSET("Use Background Assets or NSURLSession instead.", macos(11.0, API_TO_BE_DEPRECATED), ios(14.0, API_TO_BE_DEPRECATED))API_UNAVAILABLE(tvos, watchos)
+API_DEPRECATED("Use Background Assets or NSURLSession instead.", macos(11.0, 14.4), ios(14.0, 17.4))API_UNAVAILABLE(tvos, watchos)
API_UNAVAILABLE(tvos, watchos)
ML_EXPORT
-NSNotificationName const MLModelCollectionDidChangeNotification MODELCOLLECTION_SUNSET("Use Background Assets or NSURLSession instead.", macos(11.0, API_TO_BE_DEPRECATED), ios(14.0, API_TO_BE_DEPRECATED));
+NSNotificationName const MLModelCollectionDidChangeNotification API_DEPRECATED("Use Background Assets or NSURLSession instead.", macos(11.0, 14.4), ios(14.0, 17.4));
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelCollectionEntry.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelCollectionEntry.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelCollectionEntry.h 2024-01-10 00:55:52
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelCollectionEntry.h 2024-01-27 18:17:39
@@ -8,38 +8,22 @@
#import <Foundation/Foundation.h>
#import <CoreML/MLExport.h>
-#import <Availability.h>
-#import <AvailabilityMacros.h>
-#import <AvailabilityVersions.h>
-
-#if TARGET_OS_OSX && defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && (__MAC_OS_X_VERSION_MIN_REQUIRED >= 140400 /* __MAC_14_4 */)
- #define MODELCOLLECTION_SUNSET(...) API_UNAVAILABLE(macos)
-#elif TARGET_OS_IOS && defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (__IPHONE_OS_VERSION_MIN_REQUIRED >= 170400 /* __IPHONE_17_4 */)
- #define MODELCOLLECTION_SUNSET(...) API_UNAVAILABLE(ios)
-#elif TARGET_OS_WATCH && defined(__WATCH_OS_VERSION_MIN_REQUIRED) && (__WATCH_OS_VERSION_MIN_REQUIRED >= 100400 /* __WATCHOS_10_4 */)
- #define MODELCOLLECTION_SUNSET(...) API_UNAVAILABLE(watchos)
-#elif TARGET_OS_TV && defined(__TV_OS_VERSION_MIN_REQUIRED) && (__TV_OS_VERSION_MIN_REQUIRED >= 170400 /* __TVOS_17_4 */)
- #define MODELCOLLECTION_SUNSET(...) API_UNAVAILABLE(tvos)
-#else
- #define MODELCOLLECTION_SUNSET API_DEPRECATED
-#endif
-
NS_ASSUME_NONNULL_BEGIN
/*!
* MLModelCollectionEntry
* Information about a model in a model collection.
*/
-MODELCOLLECTION_SUNSET("Use Background Assets or NSURLSession instead.", macos(11.0, API_TO_BE_DEPRECATED), ios(14.0, API_TO_BE_DEPRECATED))
+API_DEPRECATED("Use Background Assets or NSURLSession instead.", macos(11.0, 14.4), ios(14.0, 17.4))
API_UNAVAILABLE(tvos, watchos)
ML_EXPORT
@interface MLModelCollectionEntry : NSObject
-@property (readonly, nonatomic) NSString *modelIdentifier MODELCOLLECTION_SUNSET("Use Background Assets or NSURLSession instead.", macos(11.0, API_TO_BE_DEPRECATED), ios(14.0, API_TO_BE_DEPRECATED));
+@property (readonly, nonatomic) NSString *modelIdentifier API_DEPRECATED("Use Background Assets or NSURLSession instead.", macos(11.0, 14.4), ios(14.0, 17.4));
-@property (readonly, nonatomic) NSURL *modelURL MODELCOLLECTION_SUNSET("Use Background Assets or NSURLSession instead.", macos(11.0, API_TO_BE_DEPRECATED), ios(14.0, API_TO_BE_DEPRECATED));
+@property (readonly, nonatomic) NSURL *modelURL API_DEPRECATED("Use Background Assets or NSURLSession instead.", macos(11.0, 14.4), ios(14.0, 17.4));
-- (BOOL)isEqualToModelCollectionEntry:(MLModelCollectionEntry *)entry MODELCOLLECTION_SUNSET("Use Background Assets or NSURLSession instead.", macos(11.0, API_TO_BE_DEPRECATED), ios(14.0, API_TO_BE_DEPRECATED));
+- (BOOL)isEqualToModelCollectionEntry:(MLModelCollectionEntry *)entry API_DEPRECATED("Use Background Assets or NSURLSession instead.", macos(11.0, 14.4), ios(14.0, 17.4));
- (instancetype)init NS_UNAVAILABLE;
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructure.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructure.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructure.h 2024-01-10 00:55:51
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructure.h 2024-01-27 18:17:38
@@ -9,8 +9,7 @@
#import <CoreML/MLExport.h>
-@class MLModelDescription;
-
+@class MLModelAsset;
@class MLModelStructureNeuralNetwork;
@class MLModelStructureProgram;
@class MLModelStructurePipeline;
@@ -18,6 +17,25 @@
NS_ASSUME_NONNULL_BEGIN
/// A class representing the structure of a model.
+///
+/// ```
+/// // Load the model structure.
+/// [MLModelStructure loadContentsOfURL:modelURL completionHandler:^(MLModelStructure * _Nullable modelStructure, NSError * _Nullable error) {
+/// if (!modelStructure) {
+/// // Handle error.
+/// return;
+/// }
+/// if (modelStructure.neuralNetwork) {
+/// // Examine Neural network model.
+/// } else if (modelStructure.program) {
+/// // Examine ML Program model.
+/// } else if (modelStructure.pipeline) {
+/// // Examine Pipeline model.
+/// } else {
+/// // The model type is something else.
+/// }
+/// }];
+/// ```
ML_EXPORT NS_REFINED_FOR_SWIFT NS_SWIFT_SENDABLE
API_AVAILABLE(macos(14.4), ios(17.4), watchos(10.4), tvos(17.4))
@interface MLModelStructure : NSObject
@@ -26,18 +44,25 @@
+ (instancetype)new NS_UNAVAILABLE;
-/// Construct an structure of a compiled model given the location of its on-disk representation.
+/// Construct the model structure asynchronously given the location of its on-disk representation.
///
-/// @param compiledModelURL The on-disk location of the compiled model.
-/// @param error A pointer to receive error information on failure.
-+ (nullable instancetype)modelStructureOfModelAtURL:(NSURL *)compiledModelURL
- error:(NSError * _Nullable __autoreleasing *)error NS_SWIFT_NAME(init(of:));
+/// @param url The location of its on-disk representation (.mlmodelc directory).
+/// @param handler When the model structure is constructed successfully or unsuccessfully, the completion handler is invoked with a valid MLModelStructure instance or NSError object.
++ (void)loadContentsOfURL:(NSURL *)url
+ completionHandler:(void (^)(MLModelStructure * _Nullable modelStructure, NSError * _Nullable error))handler NS_SWIFT_ASYNC_NAME(load(contentsOf:));
-/// If the model is a NeuralNetwork type then it is the structure of the NeuralNetwork otherwise `nil`.
+/// Construct the model structure asynchronously given the model asset.
+///
+/// @param asset The model asset.
+/// @param handler When the model structure is constructed successfully or unsuccessfully, the completion handler is invoked with a valid MLModelStructure instance or NSError object.
++ (void)loadModelAsset:(MLModelAsset *)asset
+ completionHandler:(void (^)(MLModelStructure * _Nullable modelStructure, NSError * _Nullable error))handler NS_SWIFT_ASYNC_NAME(load(asset:));
+
+/// If the model is of NeuralNetwork type then it is the structure of the NeuralNetwork otherwise `nil`.
@property (readonly, strong, nonatomic, nullable) MLModelStructureNeuralNetwork *neuralNetwork;
-/// If the model is a MLProgram then it is the structure of the MLProgram otherwise `nil`.
+/// If the model is of ML Program type then it is the structure of the ML Program otherwise `nil`.
@property (readonly, strong, nonatomic, nullable) MLModelStructureProgram *program;
-/// If the model is a Pipeline then it is the structure of the Pipeline otherwise `nil`.
+/// If the model is of Pipeline type then it is the structure of the Pipeline otherwise `nil`.
@property (readonly, strong, nonatomic, nullable) MLModelStructurePipeline *pipeline;
@end
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureNeuralNetwork.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureNeuralNetwork.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureNeuralNetwork.h 2024-01-10 00:55:51
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureNeuralNetwork.h 2024-01-27 18:17:38
@@ -7,7 +7,7 @@
#import <Foundation/Foundation.h>
-#import "MLModelStructure.h"
+#import <CoreML/MLExport.h>
@class MLModelStructureNeuralNetworkLayer;
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureNeuralNetworkLayer.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureNeuralNetworkLayer.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureNeuralNetworkLayer.h 2024-01-10 00:55:52
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureNeuralNetworkLayer.h 2024-01-27 18:17:39
@@ -11,7 +11,8 @@
NS_ASSUME_NONNULL_BEGIN
-/// A class representing a layer in a NeuralNetwork..
+/// A class representing a layer in a NeuralNetwork.
+__attribute__((objc_subclassing_restricted))
ML_EXPORT NS_REFINED_FOR_SWIFT NS_SWIFT_SENDABLE
API_AVAILABLE(macos(14.4), ios(17.4), watchos(10.4), tvos(17.4))
@interface MLModelStructureNeuralNetworkLayer : NSObject
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructurePipeline.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructurePipeline.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructurePipeline.h 2024-01-10 00:55:52
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructurePipeline.h 2024-01-27 18:17:39
@@ -7,7 +7,7 @@
#import <Foundation/Foundation.h>
-#import "MLModelStructure.h"
+#import <CoreML/MLModelStructure.h>
NS_ASSUME_NONNULL_BEGIN
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgram.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgram.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgram.h 2024-01-10 00:55:52
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgram.h 2024-01-27 18:17:38
@@ -7,13 +7,13 @@
#import <Foundation/Foundation.h>
-#import <CoreML/MLModelStructure.h>
+#import <CoreML/MLExport.h>
@class MLModelStructureProgramFunction;
NS_ASSUME_NONNULL_BEGIN
-/// A class representing the structure of a MLProgram model.
+/// A class representing the structure of an ML Program model.
__attribute__((objc_subclassing_restricted))
ML_EXPORT NS_REFINED_FOR_SWIFT NS_SWIFT_SENDABLE
API_AVAILABLE(macos(14.4), ios(17.4), watchos(10.4), tvos(17.4))
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramArgument.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramArgument.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramArgument.h 2024-01-10 00:55:51
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramArgument.h 2024-01-27 18:17:38
@@ -13,7 +13,7 @@
NS_ASSUME_NONNULL_BEGIN
-/// A class representing an argument in a Program.
+/// A class representing an argument in the Program.
__attribute__((objc_subclassing_restricted))
ML_EXPORT NS_REFINED_FOR_SWIFT NS_SWIFT_SENDABLE
API_AVAILABLE(macos(14.4), ios(17.4), watchos(10.4), tvos(17.4))
@@ -23,7 +23,7 @@
+ (instancetype)new NS_UNAVAILABLE;
-/// The list of bindings.
+/// The array of bindings.
@property (readonly, copy, nonatomic) NSArray<MLModelStructureProgramBinding *> *bindings;
@end
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramBinding.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramBinding.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramBinding.h 2024-01-10 00:55:51
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramBinding.h 2024-01-27 18:17:37
@@ -13,9 +13,9 @@
NS_ASSUME_NONNULL_BEGIN
-/// A class representing a binding in a Program
+/// A class representing a binding in the Program
///
-/// A Binding is either a previously defined name of a variable in the Program or a compile time constant value.
+/// A Binding is either a previously defined name of a variable or a constant value in the Program.
__attribute__((objc_subclassing_restricted))
ML_EXPORT NS_REFINED_FOR_SWIFT NS_SWIFT_SENDABLE
API_AVAILABLE(macos(14.4), ios(17.4), watchos(10.4), tvos(17.4))
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramBlock.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramBlock.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramBlock.h 2024-01-10 00:55:52
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramBlock.h 2024-01-27 18:17:39
@@ -14,7 +14,7 @@
NS_ASSUME_NONNULL_BEGIN
-/// A class representing a block in a Program.
+/// A class representing a block in the Program.
__attribute__((objc_subclassing_restricted))
ML_EXPORT NS_REFINED_FOR_SWIFT NS_SWIFT_SENDABLE
API_AVAILABLE(macos(14.4), ios(17.4), watchos(10.4), tvos(17.4))
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramFunction.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramFunction.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramFunction.h 2024-01-10 00:55:52
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramFunction.h 2024-01-27 18:17:39
@@ -14,7 +14,7 @@
NS_ASSUME_NONNULL_BEGIN
-/// A class representing a function in a Program.
+/// A class representing a function in the Program.
__attribute__((objc_subclassing_restricted))
ML_EXPORT NS_REFINED_FOR_SWIFT NS_SWIFT_SENDABLE
API_AVAILABLE(macos(14.4), ios(17.4), watchos(10.4), tvos(17.4))
@@ -28,7 +28,6 @@
@property (readonly, copy, nonatomic) NSArray<MLModelStructureProgramNamedValueType *> *inputs;
/// The active block in the function.
@property (readonly, strong, nonatomic) MLModelStructureProgramBlock *block;
-
@end
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramValue.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramValue.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramValue.h 2024-01-10 00:55:51
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramValue.h 2024-01-27 18:17:38
@@ -11,7 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
-/// A class representing a constant value in a Program.
+/// A class representing a constant value in the Program.
__attribute__((objc_subclassing_restricted))
ML_EXPORT NS_REFINED_FOR_SWIFT NS_SWIFT_SENDABLE
API_AVAILABLE(macos(14.4), ios(17.4), watchos(10.4), tvos(17.4))
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramValueType.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramValueType.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramValueType.h 2024-01-10 00:55:50
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLModelStructureProgramValueType.h 2024-01-27 18:17:37
@@ -11,6 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
+/// A class representing the type of a value or a variable in the Program.
__attribute__((objc_subclassing_restricted))
ML_EXPORT NS_REFINED_FOR_SWIFT NS_SWIFT_SENDABLE
API_AVAILABLE(macos(14.4), ios(17.4), watchos(10.4), tvos(17.4))
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLOptimizationHints.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLOptimizationHints.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLOptimizationHints.h 2024-01-10 00:55:52
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLOptimizationHints.h 2024-01-27 18:17:38
@@ -17,7 +17,7 @@
* An object to hold hints that CoreML could use for further optimization
*/
API_AVAILABLE(macos(14.4), ios(17.4), watchos(10.4), tvos(17.4))
-ML_EXPORT
+ML_EXPORT NS_REFINED_FOR_SWIFT
@interface MLOptimizationHints : NSObject <NSCopying, NSSecureCoding>
/// The anticipated reshape frequency
diff -ruN /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLReshapeFrequencyHint.h /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLReshapeFrequencyHint.h
--- /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLReshapeFrequencyHint.h 2024-01-10 00:55:50
+++ /Applications/Xcode_15.3.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreML.framework/Headers/MLReshapeFrequencyHint.h 2024-01-27 18:17:37
@@ -9,6 +9,10 @@
/// The anticipated frequency of changing input shapes
typedef NS_ENUM(NSInteger, MLReshapeFrequencyHint) {
+ /// The input shape is expected to change frequently on each prediction sent to this loaded model instance. Core ML will try to minimize the latency associated with shape changes and avoid expensive shape-specific optimizations prior to prediction computation. While prediction computation may be slower for each specific shape, switching between shapes should be faster.
+ /// This is the default.
MLReshapeFrequencyHintFrequent = 0,
+
+ /// The input shape is expected to be stable and many/all predictions sent to this loaded model instance would use the same input shapes repeatedly. On the shape change, Core ML re-optimizes the internal engine for the new shape if possible. The re-optimization takes some time, but the subsequent predictions for the shape should run faster.
MLReshapeFrequencyHintInfrequent = 1,
-} API_AVAILABLE(macos(14.4), ios(17.4), watchos(10.4), tvos(17.4));
+} API_AVAILABLE(macos(14.4), ios(17.4), watchos(10.4), tvos(17.4)) NS_REFINED_FOR_SWIFT;
- README
- xcode13.0 Binding Status
- xcode13.1 Binding Status
- xcode13.2 Binding Status
- xcode13.3 Binding Status
- xcode13.4 Binding Status
- xcode14.0 Binding Status
- xcode14.1 Binding Status
- xcode14.2 Binding Status
- xcode14.3 Binding Status
- xcode15.0 Binding Status
- xcode15.1 Binding Status
- xcode15.3 Binding Status
- xcode15.4 Binding Status
- xcode16.0 Binding Status
- xcode16.1 Binding Status
- xcode16.2 Binding Status