[CoreML] Add support for xcode 14 beta 1, 2 & 3 (#15527)
Co-authored-by: Alex Soto <alex@alexsoto.me>
This commit is contained in:
Родитель
d38b374b29
Коммит
2ece28e758
|
@ -100,6 +100,7 @@ namespace CoreML {
|
|||
CpuOnly = 0,
|
||||
CpuAndGpu = 1,
|
||||
All = 2,
|
||||
CPUAndNeuralEngine = 3,
|
||||
}
|
||||
|
||||
[Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)]
|
||||
|
@ -418,12 +419,28 @@ namespace CoreML {
|
|||
[Export ("loadContentsOfURL:configuration:completionHandler:")]
|
||||
void LoadContents (NSUrl url, MLModelConfiguration configuration, Action<MLModel, NSError> handler);
|
||||
|
||||
[Async (ResultTypeName="MLModelCompilationLoadResult")]
|
||||
[Watch (9,0), TV (16,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
|
||||
[Static]
|
||||
[Export ("loadModelAsset:configuration:completionHandler:")]
|
||||
void Load (MLModelAsset asset, MLModelConfiguration configuration, Action<MLModel, NSError> handler);
|
||||
|
||||
// Category MLModel (MLModelCompilation)
|
||||
|
||||
[Deprecated (PlatformName.MacOSX, 13, 0, message: "Use 'CompileModel (NSUrl, Action<NSUrl, NSError>)' overload or 'CompileModelAsync' instead.")]
|
||||
[Deprecated (PlatformName.iOS, 16, 0, message: "Use 'CompileModel (NSUrl, Action<NSUrl, NSError>)' overload or 'CompileModelAsync' instead.")]
|
||||
[Deprecated (PlatformName.TvOS, 16, 0, message: "Use 'CompileModel (NSUrl, Action<NSUrl, NSError>)' overload or 'CompileModelAsync' instead.")]
|
||||
[Deprecated (PlatformName.MacCatalyst, 16, 0, message: "Use 'CompileModel (NSUrl, Action<NSUrl, NSError>)' overload or 'CompileModelAsync' instead.")]
|
||||
[Static]
|
||||
[Export ("compileModelAtURL:error:")]
|
||||
[return: NullAllowed]
|
||||
NSUrl CompileModel (NSUrl modelUrl, out NSError error);
|
||||
|
||||
[Async (ResultTypeName="MLModelCompilationResult")]
|
||||
[TV (16,0), NoWatch, Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
|
||||
[Static]
|
||||
[Export ("compileModelAtURL:completionHandler:")]
|
||||
void CompileModel (NSUrl modelUrl, Action<NSUrl, NSError> handler);
|
||||
}
|
||||
|
||||
[Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)]
|
||||
|
@ -507,6 +524,11 @@ namespace CoreML {
|
|||
[BaseType (typeof (NSObject))]
|
||||
interface MLMultiArray : NSSecureCoding {
|
||||
|
||||
[Deprecated (PlatformName.MacOSX, 13, 0, message: "Use 'GetBytes (Action<IntPtr, nint>)' or 'GetMutableBytes' async methods instead.")]
|
||||
[Deprecated (PlatformName.iOS, 16, 0, message: "Use 'GetBytes (Action<IntPtr, nint>)' or 'GetMutableBytes' async methods instead.")]
|
||||
[Deprecated (PlatformName.TvOS, 16, 0, message: "Use 'GetBytes (Action<IntPtr, nint>)' or 'GetMutableBytes' async methods instead.")]
|
||||
[Deprecated (PlatformName.WatchOS, 9, 0, message: "Use 'GetBytes (Action<IntPtr, nint>)' or 'GetMutableBytes' async methods instead.")]
|
||||
[Deprecated (PlatformName.MacCatalyst, 16, 0, message: "Use 'GetBytes (Action<IntPtr, nint>)' or 'GetMutableBytes' async methods instead.")]
|
||||
[Export ("dataPointer")]
|
||||
IntPtr DataPointer { get; }
|
||||
|
||||
|
@ -525,7 +547,7 @@ namespace CoreML {
|
|||
nint Count { get; }
|
||||
|
||||
[NullAllowed]
|
||||
[NoWatch, NoTV, NoiOS, Mac (12,0)]
|
||||
[Watch (9,0), TV (16,0), Mac (12,0), iOS (16,0), MacCatalyst (16,0)]
|
||||
[Export ("pixelBuffer")]
|
||||
CVPixelBuffer PixelBuffer { get; }
|
||||
|
||||
|
@ -537,7 +559,7 @@ namespace CoreML {
|
|||
[Export ("initWithDataPointer:shape:dataType:strides:deallocator:error:")]
|
||||
NativeHandle Constructor (IntPtr dataPointer, NSNumber [] shape, MLMultiArrayDataType dataType, NSNumber [] strides, [NullAllowed] Action<IntPtr> deallocator, out NSError error);
|
||||
|
||||
[NoWatch, NoTV, NoiOS, Mac (12,0)]
|
||||
[Watch (9,0), TV (16,0), Mac (12,0), iOS (16,0), MacCatalyst (16,0)]
|
||||
[Export ("initWithPixelBuffer:shape:")]
|
||||
IntPtr Constructor (CVPixelBuffer pixelBuffer, NSNumber [] shape);
|
||||
|
||||
|
@ -573,6 +595,16 @@ namespace CoreML {
|
|||
[Static]
|
||||
[Export ("multiArrayByConcatenatingMultiArrays:alongAxis:dataType:")]
|
||||
MLMultiArray Concat (MLMultiArray[] multiArrays, nint axis, MLMultiArrayDataType dataType);
|
||||
|
||||
[Async (ResultTypeName="MLMultiArrayDataPointer")]
|
||||
[Watch (8,5), TV (15,4), Mac (12,3), iOS (15,4), MacCatalyst (15,4)]
|
||||
[Export ("getBytesWithHandler:")]
|
||||
void GetBytes (Action<IntPtr, nint> handler);
|
||||
|
||||
[Async (ResultTypeName="MLMultiArrayMutableDataPointer")]
|
||||
[Watch (8,5), TV (15,4), Mac (12,3), iOS (15,4), MacCatalyst (15,4)]
|
||||
[Export ("getMutableBytesWithHandler:")]
|
||||
void GetMutableBytes (Action<IntPtr, nint, NSArray<NSNumber>> handler);
|
||||
}
|
||||
|
||||
[Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)]
|
||||
|
@ -633,7 +665,7 @@ namespace CoreML {
|
|||
bool UsesCpuOnly { get; set; }
|
||||
|
||||
// Leaving it intentionally as NSDictionary to make it easier to use the lowlevel apis.
|
||||
[NoWatch, NoTV, NoiOS, Mac (12,0)]
|
||||
[Watch (9,0), TV (16,0), Mac (12,0), iOS (16,0), MacCatalyst (16,0)]
|
||||
[Export ("outputBackings", ArgumentSemantic.Copy)]
|
||||
NSDictionary OutputBackings { get; set; }
|
||||
}
|
||||
|
@ -808,6 +840,10 @@ namespace CoreML {
|
|||
[Export ("computeUnits", ArgumentSemantic.Assign)]
|
||||
MLComputeUnits ComputeUnits { get; set; }
|
||||
|
||||
[Watch (9,0), TV (16,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
|
||||
[NullAllowed, Export ("modelDisplayName")]
|
||||
string ModelDisplayName { get; set; }
|
||||
|
||||
// From MLModelConfiguration (MLGPUConfigurationOptions)
|
||||
|
||||
[NoWatch, TV (13,0), Mac (10,15), iOS (13,0)]
|
||||
|
@ -1097,4 +1133,16 @@ namespace CoreML {
|
|||
[Export ("isEqualToModelCollectionEntry:")]
|
||||
bool IsEqual (MLModelCollectionEntry entry);
|
||||
}
|
||||
|
||||
[Watch (9,0), TV (16,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
|
||||
[BaseType (typeof (NSObject))]
|
||||
[DisableDefaultCtor]
|
||||
interface MLModelAsset
|
||||
{
|
||||
[TV (16,0), NoWatch, Mac (13,0), iOS (16,0)]
|
||||
[Static]
|
||||
[Export ("modelAssetWithSpecificationData:error:")]
|
||||
[return: NullAllowed]
|
||||
MLModelAsset Create (NSData specificationData, [NullAllowed] out NSError error);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
!missing-enum-value! MLMultiArrayDataType native value MLMultiArrayDataTypeFloat16 = 65552 not bound
|
||||
!deprecated-attribute-missing! MLMultiArray::dataPointer missing a [Deprecated] attribute
|
||||
!missing-enum-value! MLComputeUnits native value MLComputeUnitsCPUAndNeuralEngine = 3 not bound
|
||||
!missing-selector! +MLModel::compileModelAtURL:completionHandler: not bound
|
||||
!missing-selector! +MLModel::loadModelAsset:configuration:completionHandler: not bound
|
||||
!missing-selector! +MLModelAsset::modelAssetWithSpecificationData:error: not bound
|
||||
!missing-selector! MLModelConfiguration::modelDisplayName not bound
|
||||
!missing-selector! MLModelConfiguration::setModelDisplayName: not bound
|
||||
!missing-selector! MLMultiArray::getBytesWithHandler: not bound
|
||||
!missing-selector! MLMultiArray::getMutableBytesWithHandler: not bound
|
||||
!missing-selector! MLMultiArray::initWithPixelBuffer:shape: not bound
|
||||
!missing-selector! MLMultiArray::pixelBuffer not bound
|
||||
!missing-selector! MLPredictionOptions::outputBackings not bound
|
||||
!missing-selector! MLPredictionOptions::setOutputBackings: not bound
|
||||
!missing-type! MLModelAsset not bound
|
|
@ -1,14 +0,0 @@
|
|||
!deprecated-attribute-missing! MLMultiArray::dataPointer missing a [Deprecated] attribute
|
||||
!missing-enum-value! MLComputeUnits native value MLComputeUnitsCPUAndNeuralEngine = 3 not bound
|
||||
!missing-selector! +MLModel::compileModelAtURL:completionHandler: not bound
|
||||
!missing-selector! +MLModel::loadModelAsset:configuration:completionHandler: not bound
|
||||
!missing-selector! +MLModelAsset::modelAssetWithSpecificationData:error: not bound
|
||||
!missing-selector! MLModelConfiguration::modelDisplayName not bound
|
||||
!missing-selector! MLModelConfiguration::setModelDisplayName: not bound
|
||||
!missing-selector! MLMultiArray::getBytesWithHandler: not bound
|
||||
!missing-selector! MLMultiArray::getMutableBytesWithHandler: not bound
|
||||
!missing-selector! MLMultiArray::initWithPixelBuffer:shape: not bound
|
||||
!missing-selector! MLMultiArray::pixelBuffer not bound
|
||||
!missing-selector! MLPredictionOptions::outputBackings not bound
|
||||
!missing-selector! MLPredictionOptions::setOutputBackings: not bound
|
||||
!missing-type! MLModelAsset not bound
|
|
@ -1,10 +0,0 @@
|
|||
!deprecated-attribute-missing! MLMultiArray::dataPointer missing a [Deprecated] attribute
|
||||
!missing-enum-value! MLComputeUnits native value MLComputeUnitsCPUAndNeuralEngine = 3 not bound
|
||||
!missing-selector! +MLModel::compileModelAtURL:completionHandler: not bound
|
||||
!missing-selector! +MLModel::loadModelAsset:configuration:completionHandler: not bound
|
||||
!missing-selector! +MLModelAsset::modelAssetWithSpecificationData:error: not bound
|
||||
!missing-selector! MLModelConfiguration::modelDisplayName not bound
|
||||
!missing-selector! MLModelConfiguration::setModelDisplayName: not bound
|
||||
!missing-selector! MLMultiArray::getBytesWithHandler: not bound
|
||||
!missing-selector! MLMultiArray::getMutableBytesWithHandler: not bound
|
||||
!missing-type! MLModelAsset not bound
|
|
@ -1,14 +0,0 @@
|
|||
!deprecated-attribute-missing! MLMultiArray::dataPointer missing a [Deprecated] attribute
|
||||
!missing-enum-value! MLComputeUnits native value MLComputeUnitsCPUAndNeuralEngine = 3 not bound
|
||||
!missing-selector! +MLModel::compileModelAtURL:completionHandler: not bound
|
||||
!missing-selector! +MLModel::loadModelAsset:configuration:completionHandler: not bound
|
||||
!missing-selector! +MLModelAsset::modelAssetWithSpecificationData:error: not bound
|
||||
!missing-selector! MLModelConfiguration::modelDisplayName not bound
|
||||
!missing-selector! MLModelConfiguration::setModelDisplayName: not bound
|
||||
!missing-selector! MLMultiArray::getBytesWithHandler: not bound
|
||||
!missing-selector! MLMultiArray::getMutableBytesWithHandler: not bound
|
||||
!missing-selector! MLMultiArray::initWithPixelBuffer:shape: not bound
|
||||
!missing-selector! MLMultiArray::pixelBuffer not bound
|
||||
!missing-selector! MLPredictionOptions::outputBackings not bound
|
||||
!missing-selector! MLPredictionOptions::setOutputBackings: not bound
|
||||
!missing-type! MLModelAsset not bound
|
|
@ -1,14 +0,0 @@
|
|||
!deprecated-attribute-missing! MLMultiArray::dataPointer missing a [Deprecated] attribute
|
||||
!missing-enum-value! MLComputeUnits native value MLComputeUnitsCPUAndNeuralEngine = 3 not bound
|
||||
!missing-selector! +MLModel::compileModelAtURL:completionHandler: not bound
|
||||
!missing-selector! +MLModel::loadModelAsset:configuration:completionHandler: not bound
|
||||
!missing-selector! +MLModelAsset::modelAssetWithSpecificationData:error: not bound
|
||||
!missing-selector! MLModelConfiguration::modelDisplayName not bound
|
||||
!missing-selector! MLModelConfiguration::setModelDisplayName: not bound
|
||||
!missing-selector! MLMultiArray::getBytesWithHandler: not bound
|
||||
!missing-selector! MLMultiArray::getMutableBytesWithHandler: not bound
|
||||
!missing-selector! MLMultiArray::initWithPixelBuffer:shape: not bound
|
||||
!missing-selector! MLMultiArray::pixelBuffer not bound
|
||||
!missing-selector! MLPredictionOptions::outputBackings not bound
|
||||
!missing-selector! MLPredictionOptions::setOutputBackings: not bound
|
||||
!missing-type! MLModelAsset not bound
|
|
@ -1,10 +0,0 @@
|
|||
!deprecated-attribute-missing! MLMultiArray::dataPointer missing a [Deprecated] attribute
|
||||
!missing-enum-value! MLComputeUnits native value MLComputeUnitsCPUAndNeuralEngine = 3 not bound
|
||||
!missing-selector! +MLModel::compileModelAtURL:completionHandler: not bound
|
||||
!missing-selector! +MLModel::loadModelAsset:configuration:completionHandler: not bound
|
||||
!missing-selector! +MLModelAsset::modelAssetWithSpecificationData:error: not bound
|
||||
!missing-selector! MLModelConfiguration::modelDisplayName not bound
|
||||
!missing-selector! MLModelConfiguration::setModelDisplayName: not bound
|
||||
!missing-selector! MLMultiArray::getBytesWithHandler: not bound
|
||||
!missing-selector! MLMultiArray::getMutableBytesWithHandler: not bound
|
||||
!missing-type! MLModelAsset not bound
|
|
@ -1,14 +0,0 @@
|
|||
!deprecated-attribute-missing! MLMultiArray::dataPointer missing a [Deprecated] attribute
|
||||
!missing-enum-value! MLComputeUnits native value MLComputeUnitsCPUAndNeuralEngine = 3 not bound
|
||||
!missing-selector! +MLModel::compileModelAtURL:completionHandler: not bound
|
||||
!missing-selector! +MLModel::loadModelAsset:configuration:completionHandler: not bound
|
||||
!missing-selector! +MLModelAsset::modelAssetWithSpecificationData:error: not bound
|
||||
!missing-selector! MLModelConfiguration::modelDisplayName not bound
|
||||
!missing-selector! MLModelConfiguration::setModelDisplayName: not bound
|
||||
!missing-selector! MLMultiArray::getBytesWithHandler: not bound
|
||||
!missing-selector! MLMultiArray::getMutableBytesWithHandler: not bound
|
||||
!missing-selector! MLMultiArray::initWithPixelBuffer:shape: not bound
|
||||
!missing-selector! MLMultiArray::pixelBuffer not bound
|
||||
!missing-selector! MLPredictionOptions::outputBackings not bound
|
||||
!missing-selector! MLPredictionOptions::setOutputBackings: not bound
|
||||
!missing-type! MLModelAsset not bound
|
|
@ -1,12 +0,0 @@
|
|||
!deprecated-attribute-missing! MLMultiArray::dataPointer missing a [Deprecated] attribute
|
||||
!missing-enum-value! MLComputeUnits native value MLComputeUnitsCPUAndNeuralEngine = 3 not bound
|
||||
!missing-selector! +MLModel::loadModelAsset:configuration:completionHandler: not bound
|
||||
!missing-selector! MLModelConfiguration::modelDisplayName not bound
|
||||
!missing-selector! MLModelConfiguration::setModelDisplayName: not bound
|
||||
!missing-selector! MLMultiArray::getBytesWithHandler: not bound
|
||||
!missing-selector! MLMultiArray::getMutableBytesWithHandler: not bound
|
||||
!missing-selector! MLMultiArray::initWithPixelBuffer:shape: not bound
|
||||
!missing-selector! MLMultiArray::pixelBuffer not bound
|
||||
!missing-selector! MLPredictionOptions::outputBackings not bound
|
||||
!missing-selector! MLPredictionOptions::setOutputBackings: not bound
|
||||
!missing-type! MLModelAsset not bound
|
Загрузка…
Ссылка в новой задаче