-
Notifications
You must be signed in to change notification settings - Fork 511
MetalPerformanceShadersGraph iOS xcode16.0 b1
Rolf Bjarne Kvinge edited this page Jun 18, 2024
·
3 revisions
#MetalPerformanceShadersGraph.framework
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraph.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraph.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraph.h 2024-04-13 16:01:45
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraph.h 2024-05-30 04:43:28
@@ -32,7 +32,7 @@
MPSGraphOptionsDefault MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) = MPSGraphOptionsSynchronizeResults,
};
-/// Optimization levels to tradeoff compilation time for even more runtime performance by running more passes.
+/// The optimization levels to trade compilation time for even more runtime performance by running more passes.
typedef NS_ENUM(uint64_t, MPSGraphOptimization)
{
/// Graph performs core optimizations only.
@@ -41,7 +41,7 @@
MPSGraphOptimizationLevel1 MPS_ENUM_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4)) = 1L,
};
-/// Optimization profile used as heuristic as graph compiler optimizes network.
+/// The optimization profile used as a heuristic as the graph compiler optimizes the network.
typedef NS_ENUM(uint64_t, MPSGraphOptimizationProfile)
{
/// Default, graph optimized for performance.
@@ -57,15 +57,15 @@
MPSGraphExecutionStageCompleted MPS_ENUM_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0)) MPS_SWIFT_NAME(completed) = 0L,
};
-/// A dictionary of tensors and correspondiing tensorData for them.
+/// A dictionary of tensors and corresponding tensor data.
MPS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
typedef NSDictionary<MPSGraphTensor*, MPSGraphTensorData *> MPSGraphTensorDataDictionary;
-/// A dictionary of tensors and correspondiing shapes for them.
+/// A dictionary of tensors and corresponding shapes for them.
MPS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
typedef NSDictionary<MPSGraphTensor*, MPSGraphShapedType *> MPSGraphTensorShapedTypeDictionary;
-/// A notification when graph execution: has finished.
+/// A notification that appears when graph execution finishes.
///
/// - Parameters:
/// - resultsDictionary: If no error, the results dictionary produced by the graph operation.
@@ -73,15 +73,15 @@
typedef void (^MPSGraphCompletionHandler)(MPSGraphTensorDataDictionary * resultsDictionary,
NSError * _Nullable error);
-/// A notification when graph execution: has been scheduled.
+/// A notification that appears when graph execution schedules.
///
/// - Parameters:
-/// - resultsDictionary: If no error, the results dictionary produced by the graph operation. If Graph has not yet allocated the results will be NSNull.
+/// - resultsDictionary: If no error, the results dictionary produced by the graph operation. If Graph has not yet allocated, the results will be `NSNull`.
/// - error: If an error occurs, more information might be found here.
typedef void (^MPSGraphScheduledHandler)(MPSGraphTensorDataDictionary * resultsDictionary,
NSError * _Nullable error);
-/// A notification when compilation: has finished.
+/// A notification that appears when compilation finishes.
///
/// - Parameters:
/// - executable: If no error, the executable produced by the compilation.
@@ -89,7 +89,11 @@
typedef void (^MPSGraphCompilationCompletionHandler)(MPSGraphExecutable* executable,
NSError * _Nullable error);
-/// This is a class that consists of all the levers for compiling graphs.
+/// A dictionary of symbol names and the corresponding executables for them.
+MPS_AVAILABLE_STARTING(macos(14.1), ios(17.1), tvos(17.1))
+typedef NSDictionary<NSString *, MPSGraphExecutable *> MPSGraphCallableMap;
+
+/// A class that consists of all the levers for compiling graphs.
MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
@interface MPSGraphCompilationDescriptor : MPSGraphObject <NSCopying>
@@ -102,33 +106,50 @@
/// Flag that makes the compile or specialize call blocking till the entire compilation is complete, defaults to NO.
@property (readwrite, nonatomic) BOOL waitForCompilationCompletion MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// The graph calls this handler at the completion of the compilation, default value is nil.
+/// The handler that the graph calls when the compilation completes.
+///
+/// Default value is nil.
@property (readwrite, atomic) MPSGraphCompilationCompletionHandler compilationCompletionHandler MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// The dispatch queue used for the compilation, default value is nil.
+/// The dispatch queue used for the compilation.
+///
+/// Default value is nil.
@property (readwrite, atomic, retain) dispatch_queue_t dispatchQueue MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// The optimization profile for the graph optimization, default is MPSGraphOptimizationProfilePerformance.
+/// The optimization profile for the graph optimization.
+///
+/// Default is MPSGraphOptimizationProfilePerformance.
@property (readwrite, nonatomic) MPSGraphOptimizationProfile optimizationProfile
MPS_AVAILABLE_STARTING_BUT_DEPRECATED("MPSGraph will automatically provide the best performance and power efficiency with MPSGraphOptimizationLevel1.",
macos(12.3, 14.0), ios(15.4, 17.0), tvos(15.4, 17.0));
+/// The dictionary used during runtime to lookup the ``MPSGraphExecutable`` which correspond to the ``symbolName``.
+@property (readwrite, atomic, nullable) MPSGraphCallableMap *callables MPS_AVAILABLE_STARTING(macos(14.1), ios(17.1), tvos(17.1));
+
@end
-/// This is a class that consists of all the levers to synchronize and schedule graph execution.
+/// A class that consists of all the levers to synchronize and schedule graph execution.
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraphExecutionDescriptor : MPSGraphObject
-/// The graph calls this handler when it schedules the execution, default value is nil.
+/// The handler that graph calls when it schedules the execution.
+///
+/// Default value is nil.
@property (readwrite, atomic) MPSGraphScheduledHandler scheduledHandler;
-/// The graph calls this handler at the completion of the execution, default value is nil.
+/// The handler that graph calls at the completion of the execution.
+///
+/// Default value is nil.
@property (readwrite, atomic) MPSGraphCompletionHandler completionHandler;
-/// Flag that makes the execution call blocking till the entire compilation is complete, defaults to NO.
+/// The flag that blocks the execution call until the entire execution is complete.
+///
+/// Defaults to NO.
@property (readwrite, atomic) BOOL waitUntilCompleted;
-/// compilationDescriptor for the graph, default value is nil.
+/// The compilation descriptor for the graph.
+///
+/// Default value is nil.
@property (readwrite, atomic, copy, nullable) MPSGraphCompilationDescriptor *compilationDescriptor
MPS_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4));
@@ -154,16 +175,18 @@
@end
-/// Optimized representation of a compute graph of MPSGraphOperations and MPSGraphTensors.
+/// The optimized representation of a compute graph of operations and tensors.
///
/// An MPSGraph is a symbolic representation of operations to be utilized to execute compute graphs on a device.
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph : MPSGraphObject
-/// Options for the graph, the default value is MPSGraphOptionsDefault.
+/// Options for the graph.
+///
+/// The default value is `MPSGraphOptionsDefault`.
@property (readwrite, atomic) MPSGraphOptions options;
-/// Create a new MPSGraph to insert nodes in.
+/// Creates a new graph to insert nodes in.
+(instancetype) new;
/// Initialize an MPSGraph to insert nodes in.
@@ -172,9 +195,9 @@
/// Array of all the placeholder tensors.
@property (readonly, nonnull, nonatomic) NSArray<MPSGraphTensor *> *placeholderTensors;
-/// Compiles the graph for given feeds to return targetTensor values, ensuring all target operations would be executed.
+/// Compiles the graph for the given feeds to returns the target tensor values, ensuring all target operations would be executed.
///
-/// This call blocks till execution has completed. The compilation descriptor helps specialize the executable returned.
+/// This call blocks until execution has completed. The compilation descriptor helps specialize the executable returned.
///
/// - Parameters:
/// - device: MPSGraph device to optimize for.
@@ -188,10 +211,10 @@
targetTensors:(NSArray<MPSGraphTensor *> *) targetTensors
targetOperations:(NSArray<MPSGraphOperation *> * _Nullable) targetOperations
compilationDescriptor:(MPSGraphCompilationDescriptor * _Nullable) compilationDescriptor MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
-
-/// Runs the graph for given feeds to return targetTensor values, ensuring all target operations also executed.
+#if !MPSGRAPH_TOOLCHAIN_BUILD
+/// Runs the graph for the given feeds and returns the target tensor values, ensuring all target operations also executed.
///
-/// This call blocks till execution has completed.
+/// This call blocks until execution has completed.
///
/// - Parameters:
/// - feeds: Feeds dictionary for the placeholder tensors.
@@ -203,8 +226,10 @@
targetOperations:(NSArray<MPSGraphOperation *> * _Nullable) targetOperations
MPS_SWIFT_NAME( run(feeds:targetTensors:targetOperations:) );
-/// Runs the graph for given feeds to return targetTensor values, ensuring all target operations also executed. This call blocks till execution has completed.
+/// Runs the graph for the given feeds and returns the target tensor values, ensuring all target operations also executed.
///
+/// This call blocks until execution has completed.
+///
/// - Parameters:
/// - commandQueue: CommandQueue passed to exectute the graph on.
/// - feeds: Feeds dictionary for the placeholder tensors.
@@ -217,9 +242,9 @@
targetOperations:(NSArray<MPSGraphOperation *> * _Nullable) targetOperations
MPS_SWIFT_NAME( run(with:feeds:targetTensors:targetOperations:) );
-/// Runs the graph for given feeds to return targetTensor values in the resultsDictionary provided by the user.
+/// Runs the graph for the given feeds and returns the target tensor values in the results dictionary provided by the user.
///
-/// It also ensures all target operations also executed. This call blocks till execution has completed.
+/// It also ensures all target operations also executed. This call blocks until execution has completed.
///
/// - Parameters:
/// - commandQueue: CommandQueue passed to exectute the graph on.
@@ -235,7 +260,7 @@
// Async methods
-/// Runs the graph for given feeds to return targetTensor values, ensuring all target operations also executed.
+/// Runs the graph for the given feeds and returns the target tensor values, ensuring all target operations also executed.
///
/// This call is asynchronous and will return immediately if a completionHandler is set.
///
@@ -252,7 +277,7 @@
MPS_SWIFT_NAME( runAsync(feeds:targetTensors:targetOperations:executionDescriptor:) );
-/// Runs the graph for given feeds to return targetTensor values, ensuring all target operations also executed.
+/// Runs the graph for the given feeds and returns the target tensor values, ensuring all target operations also executed.
///
/// This call is asynchronous and will return immediately if a completionHandler is set.
///
@@ -270,7 +295,7 @@
executionDescriptor:(MPSGraphExecutionDescriptor * _Nullable) executionDescriptor
MPS_SWIFT_NAME( runAsync(with:feeds:targetTensors:targetOperations:executionDescriptor:) );
-/// Encodes the graph for given feeds to return targetTensor values in the resultsDictionary provided by the user.
+/// Encodes the graph for the given feeds to returns the target tensor values in the results dictionary provided by the user.
///
/// It ensures all target operations also executed. This call is asynchronous and will return immediately if a completionHandler is set.
///
@@ -287,7 +312,7 @@
executionDescriptor:(MPSGraphExecutionDescriptor * _Nullable) executionDescriptor
MPS_SWIFT_NAME( runAsync(with:feeds:targetOperations:resultsDictionary:executionDescriptor:) );
-/// Encodes graph for given feeds to return targetTensor values, ensuring all target operations also executed.
+/// Encodes the graph for the given feeds to returns the target tensor values, ensuring all target operations also executed.
///
/// This call is asynchronous and will return immediately if a completionHandler is set.
///
@@ -305,7 +330,7 @@
executionDescriptor:(MPSGraphExecutionDescriptor * _Nullable) executionDescriptor
MPS_SWIFT_NAME( encode(to:feeds:targetTensors:targetOperations:executionDescriptor:) );
-/// Encodes the graph for given feeds to return targetTensor values in the resultsDictionary provided by the user.
+/// Encodes the graph for the given feeds to returns the target tensor values in the results dictionary provided by the user.
///
/// It ensures all target operations also executed. This call is asynchronous and will return immediately if a completionHandler is set.
///
@@ -321,7 +346,7 @@
resultsDictionary:(MPSGraphTensorDataDictionary *) resultsDictionary
executionDescriptor:(MPSGraphExecutionDescriptor * _Nullable) executionDescriptor
MPS_SWIFT_NAME( encode(to:feeds:targetOperations:resultsDictionary:executionDescriptor:) );
-
+#endif
@end
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphActivationOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphActivationOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphActivationOps.h 2024-03-22 20:57:13
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphActivationOps.h 2024-05-30 04:58:35
@@ -75,14 +75,14 @@
/// - gradient: The incoming gradient tensor.
/// - source: The input tensor.
/// - axis: The axis along which softmax is computed.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid ``MPSGraphTensor`` object
-(MPSGraphTensor *) softMaxGradientWithIncomingGradient:(MPSGraphTensor *) gradient
sourceTensor:(MPSGraphTensor *) source
axis:(NSInteger) axis
name:(NSString * _Nullable) name;
-/// Computes the leaky ReLU (rectified linear unit activation) function on the input tensor.
+/// Computes the leaky rectified linear unit (ReLU) activation function on the input tensor.
///
/// The operation is: f(x) = max(x, alpha).
///
@@ -96,7 +96,7 @@
name:(NSString* _Nullable) name
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
-/// Computes the leaky ReLU (rectified linear unit activation) function on the input tensor.
+/// Computes the leaky rectified linear unit (ReLU) activation function on the input tensor.
///
/// The operation is: f(x) = max(x, alpha).
/// This operation supports broadcasting with the alpha tensor.
@@ -111,7 +111,7 @@
name:(NSString* _Nullable) name
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
-/// Computes the gradient of the leaky ReLU (rectified linear unit activation).
+/// Computes the gradient of the leaky rectified linear unit (ReLU) activation.
///
/// This operation supports broadcasting with the alpha tensor.
///
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphArithmeticOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphArithmeticOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphArithmeticOps.h 2024-03-22 20:46:16
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphArithmeticOps.h 2024-05-30 05:56:18
@@ -38,7 +38,7 @@
-(MPSGraphTensor *) exponentWithTensor:(MPSGraphTensor *) tensor
name:(NSString * _Nullable) name;
-/// Applies an exponent with base two to the input tensor elements.
+/// Applies an exponent with base 2 to the input tensor elements.
///
/// - Parameters:
/// - tensor: The input tensor.
@@ -47,7 +47,7 @@
-(MPSGraphTensor *) exponentBase2WithTensor:(MPSGraphTensor *) tensor
name:(NSString * _Nullable) name;
-/// Applies an exponent with base ten to the input tensor elements.
+/// Applies an exponent with base 10 to the input tensor elements.
///
/// - Parameters:
/// - tensor: The input tensor.
@@ -65,7 +65,7 @@
-(MPSGraphTensor *) logarithmWithTensor:(MPSGraphTensor *) tensor
name:(NSString * _Nullable) name;
-/// Computes the logarithm with base two to the input tensor elements.
+/// Computes the logarithm with base 2 to the input tensor elements.
///
/// - Parameters:
/// - tensor: The input tensor.
@@ -74,7 +74,7 @@
-(MPSGraphTensor *) logarithmBase2WithTensor:(MPSGraphTensor *) tensor
name:(NSString * _Nullable) name;
-/// Computes the logarithm with base ten to the input tensor elements.
+/// Computes the logarithm with base 10 to the input tensor elements.
///
/// - Parameters:
/// - tensor: The input tensor.
@@ -133,7 +133,7 @@
/// Returns the absolute square of the input tensor elements.
///
/// - Parameters:
-/// - tensor: The input tensor..
+/// - tensor: The input tensor.
/// - name: An optional string which serves as an identifier for the operation..
/// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
-(MPSGraphTensor *) absoluteSquareWithTensor:(MPSGraphTensor *) tensor
@@ -202,7 +202,7 @@
-(MPSGraphTensor *) roundWithTensor:(MPSGraphTensor *) tensor
name:(NSString * _Nullable) name;
-/// Rounds the input tensor elements using "round to nearest even" rounding mode.
+/// Rounds the input tensor elements by rounding to nearest even.
///
/// - Parameters:
/// - tensor: The input tensor.
@@ -319,7 +319,7 @@
-(MPSGraphTensor *) atanhWithTensor:(MPSGraphTensor *) tensor
name:(NSString * _Nullable) name;
-/// Applies the logical not operation to the input tensor elements.
+/// Applies the logical NOT operation to the input tensor elements.
///
/// - Parameters:
/// - tensor: The input tensor.
@@ -383,7 +383,7 @@
MPS_SWIFT_NAME( truncate(_:name:) )
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Applies the bitwise not operation to the input tensor element.
+/// Applies the bitwise NOT operation to the input tensor element.
///
/// This operation only accepts integer tensors.
///
@@ -424,7 +424,7 @@
/// Adds two input tensors.
///
-/// This operation creates an add op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates an add operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = primaryTensor + secondaryTensor
/// ```
@@ -443,7 +443,7 @@
/// Subtracts the second input tensor from the first.
///
-/// This operation creates a subtract op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a subtract operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = primaryTensor - secondaryTensor
/// ```
@@ -462,7 +462,7 @@
/// Multiplies two input tensors.
///
-/// This operation creates a multiply op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a multiply operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = primaryTensor * secondaryTensor
/// ```
@@ -479,7 +479,7 @@
/// Divides the first input tensor by the second.
///
-/// This operation creates a divide op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a divide operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = primaryTensor / secondaryTensor
/// ```
@@ -497,7 +497,7 @@
/// Returns the remainder obtained by dividing the first input tensor by the second.
///
-/// This operation creates a modulo op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a modulo operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = primaryTensor % secondaryTensor
/// ```
@@ -515,7 +515,7 @@
/// Returns the elementwise result of raising the first tensor to the power of the second tensor.
///
-/// This operation creates a power op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a power operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = pow(primaryTensor, secondaryTensor)
/// ```
@@ -533,7 +533,7 @@
/// Returns the elementwise minimum of the input tensors.
///
-/// This operation creates a minimum op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a minimum operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = min(primaryTensor, secondaryTensor)
/// ```
@@ -551,7 +551,7 @@
/// Returns the elementwise maximum of the input tensors.
///
-/// This operation creates a maximum op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a maximum operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = max(primaryTensor, secondaryTensor)
/// ```
@@ -568,7 +568,7 @@
/// Returns the elementwise minimum of the input tensors, while propagating `NaN` values.
///
-/// This operation creates a minimum with `NaN` propagation op and returns the result tensor. This means that
+/// This operation creates a minimum with `NaN` propagation operation and returns the result tensor. This means that
/// if any of the elementwise operands is `NaN`, the result is `NaN`.
/// It supports broadcasting as well.
/// ```md
@@ -588,7 +588,7 @@
/// Returns the elementwise maximum of the input tensors, while propagating `NaN` values.
///
-/// This operation creates a maximum with `NaN` propagation op and returns the result tensor. This means that
+/// This operation creates a maximum with `NaN` propagation operation and returns the result tensor. This means that
/// if any of the elementwise operands is `NaN`, the result is `NaN`.
/// It supports broadcasting as well.
/// ```md
@@ -608,7 +608,7 @@
/// Returns the elementwise equality check of the input tensors.
///
-/// This operation creates a equal op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a equal operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = primaryTensor == secondaryTensor
/// ```
@@ -626,7 +626,7 @@
/// Returns the elementwise inequality check of the input tensors.
///
-/// This operation creates a not equal op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a not equal operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = primaryTensor != secondaryTensor
/// ```
@@ -644,7 +644,7 @@
/// Checks in an elementwise manner if the first input tensor is less than the second.
///
-/// This operation creates a `lessThan` op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a `lessThan` operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = primaryTensor < secondaryTensor
/// ```
@@ -661,7 +661,7 @@
/// Checks in an elementwise manner if the first input tensor is less than or equal to the second.
///
-/// This operation creates a `lessThanOrEqualTo` op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a `lessThanOrEqualTo` operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = primaryTensor <= secondaryTensor
/// ```
@@ -679,7 +679,7 @@
/// Checks in an elementwise manner if the first input tensor is greater than the second.
///
-/// This operation creates a `greaterThan` op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a `greaterThan` operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = primaryTensor > secondaryTensor
/// ```
@@ -696,7 +696,7 @@
/// Checks in an elementwise manner if the first input tensor is greater than or equal to the second.
///
-/// This operation creates a `greaterThanOrEqual` op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a `greaterThanOrEqual` operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = primaryTensor < secondaryTensor
/// ```
@@ -713,7 +713,7 @@
/// Returns the elementwise logical AND of the input tensors.
///
-/// This operation creates a logical AND op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a logical AND operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = primaryTensor && secondaryTensor
/// ```
@@ -731,7 +731,7 @@
/// Returns the elementwise logical OR of the input tensors.
///
-/// This operation creates a logical OR op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a logical OR operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = primaryTensor || secondaryTensor
/// ```
@@ -749,7 +749,7 @@
/// Returns the elementwise logical NAND of the input tensors.
///
-/// This operation creates a logical NAND op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a logical NAND operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = !(primaryTensor && secondaryTensor)
/// ```
@@ -767,7 +767,7 @@
/// Returns the elementwise logical NOR of the input tensors.
///
-/// This operation creates a logical NOR op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a logical NOR operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = !(primaryTensor || secondaryTensor)
/// ```
@@ -785,7 +785,7 @@
/// Returns the elementwise logical XOR of the input tensors.
///
-/// This operation creates a logical XOR op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a logical XOR operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = XOR(primaryTensor, secondaryTensor)
/// ```
@@ -803,7 +803,7 @@
/// Returns the elementwise logical XNOR of the input tensors.
///
-/// This operation creates a logical XNOR op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a logical XNOR operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = XNOR(primaryTensor, secondaryTensor)
/// ```
@@ -818,9 +818,9 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( logicalXNOR(_:_:name:) );
-/// Returns the elementwise 2-argument arctangent of the input tensors.
+/// Returns the elementwise two-argument arctangent of the input tensors.
///
-/// This operation creates a `atan2` op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a `atan2` operation and returns the result tensor. It supports broadcasting as well.
/// Graph computes arc tangent of primaryTensor over secondaryTensor.
/// ```md
/// resultTensor = atan2(primaryTensor, secondaryTensor)
@@ -874,7 +874,7 @@
MPS_SWIFT_NAME( bitwiseXOR(_:_:name:) )
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.1), tvos(16.1));
-/// Returns the elementwise left shifted binary representations of the primary integer by the secondary tensor amount.
+/// Returns the elementwise left-shifted binary representations of the primary integer by the secondary tensor amount.
///
/// - Parameters:
/// - primaryTensor: The primary input tensor, must be of integer type.
@@ -887,7 +887,7 @@
MPS_SWIFT_NAME( bitwiseLeftShift(_:_:name:) )
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.1), tvos(16.1));
-/// Returns the elementwise right shifted binary representations of the primary integer by the secondary tensor amount.
+/// Returns the elementwise right-shifted binary representations of the primary integer by the secondary tensor amount.
///
/// - Parameters:
/// - primaryTensor: The primary input tensor, must be of integer type.
@@ -905,7 +905,7 @@
/// Selects values from either the true or false predicate tensor, depending on the values in the first input.
///
-/// This operation creates a select op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a select operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = select(predicateTensor, truePredicateTensor, falseSelectTensor)
/// ```
@@ -922,9 +922,9 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( select(predicate:trueTensor:falseTensor:name:) );
-/// Clamps the values in the first tensor between the corresponding values in the min and max value tensor.
+/// Clamps the values in the first tensor between the corresponding values in the minimum and maximum value tensor.
///
-/// This operation creates a clamp op and returns the result tensor. It supports broadcasting as well.
+/// This operation creates a clamp operation and returns the result tensor. It supports broadcasting as well.
/// ```md
/// resultTensor = clamp(tensor, minValueTensor, maxValueTensor)
/// ```
@@ -961,7 +961,8 @@
MPS_SWIFT_NAME( divisionNoNaN(_:_:name:) );
/// Returns the remainder of floor divison between the primary and secondary tensor.
-/// Create floorModulo op and return the result tensor, it supports broadcasting as well, returns 0 if divisor is 0
+///
+/// Creates a floorModulo operation and returns the result tensor, it supports broadcasting as well, returns 0 if divisor is 0.
/// ```md
/// resultTensor = primaryTensor - (floor(primaryTensor / secondaryTensor) * secondaryTensor)
/// ```
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphAutomaticDifferentiation.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphAutomaticDifferentiation.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphAutomaticDifferentiation.h 2024-04-13 16:03:05
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphAutomaticDifferentiation.h 2024-05-30 11:26:36
@@ -16,7 +16,7 @@
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(MPSGraphGradientOps)
-/// Calculates partial derivative of primaryTensor with respect to the tensors.
+/// Calculates a partial derivative of primaryTensor with respect to the tensors.
///
/// - Parameters:
/// - primaryTensor: Tensor to be differentiated (numerator).
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCallOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCallOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCallOps.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCallOps.h 2024-05-30 11:26:35
@@ -0,0 +1,36 @@
+//
+// MPSGraphCallOps.h
+// MPSGraph
+//
+// Created by George Pawelczak on 7/26/23.
+// Copyright © 2023 Apple Inc. All rights reserved.
+//
+
+#ifndef MPSGraphCallOps_h
+#define MPSGraphCallOps_h
+
+#import <MetalPerformanceShadersGraph/MPSGraph.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface MPSGraph(CallOp)
+
+/// Creates an operation which invokes another executable.
+///
+/// - Parameters:
+/// - symbolName: The unique identifier used to find the executable in the ``MPSGraphCompilationDescriptor.callables`` directory.
+/// - inputTensors: The tensors which are passed as inputs to the executable being invoked.
+/// - outputTypes: The expected return types of the executable being invoked.
+/// - name: name of operation.
+/// - Returns: An array of valid ``MPSGraphTensor`` objects representing the return tensors of the invoked executable.
+-(NSArray<MPSGraphTensor *> *) callSymbolName:(NSString *) symbolName
+ inputTensors:(NSArray<MPSGraphTensor *> *) inputTensors
+ outputTypes:(NSArray<MPSGraphType *> *) outputTypes
+ name:(NSString * _Nullable) name
+MPS_SWIFT_NAME( call(symbolName:inputTensors:outputTypes:name:) )
+MPS_AVAILABLE_STARTING(macos(15.0), ios(18.0), macCatalyst(18.0), tvos(18.0), xros(2.0));
+
+@end
+NS_ASSUME_NONNULL_END
+
+#endif /* MPSGraphCallOps_h */
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphControlFlowOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphControlFlowOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphControlFlowOps.h 2024-04-13 21:12:47
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphControlFlowOps.h 2024-05-30 11:41:32
@@ -16,13 +16,15 @@
MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
@interface MPSGraph(MPSGraphControlFlowOps)
-/// Defines a scope where all the ops defined in this block get controlDependency operations
+/// The scope where all the operations defined in this block get control-dependency operations.
///
-/// - Returns: A valid MPSGraphTensor array with results forwarded to return of controlDependency call
+/// - Returns: A valid tensor with the results forwarded to the return of `controlDependency` call.
typedef NSArray<MPSGraphTensor *> * _Nonnull(^MPSGraphControlFlowDependencyBlock)();
-/// Runs the graph for given feeds to return targetTensor values, ensuring all target operations also executed. This call blocks till execution has completed.
+/// Runs the graph for the given feeds and returns the target tensor values, ensuring all target operations also executed.
///
+/// This call blocks until execution has completed.
+///
/// - Parameters:
/// - operations: Operations maked as control dependency for all ops created inside the dependent block
/// - dependentBlock: MPSGraphControlFlowDependencyBlock which is provided by caller to create dependent ops
@@ -32,13 +34,13 @@
dependentBlock:(MPSGraphControlFlowDependencyBlock) dependentBlock
name:(NSString * _Nullable) name;
-/// A block to have if/else condition in it
+/// A block of operations executed under either the if or else condition.
///
-/// - Returns: results If no error, the tensors returned by user. If not empty, user must define both then/else block,
-/// both should have same number of arguments and each corresponding argument should have same elementTypes.
+/// - Returns: Tensors returned by user. If not empty, the user must define both the then and else blocks,
+/// both should have the same number of arguments, and each corresponding argument should have the same element types.
typedef NSArray<MPSGraphTensor *> * _Nonnull(^MPSGraphIfThenElseBlock)();
-/// Add an if/then/else op to the graph
+/// Adds an if-then-else operation to the graph.
///
/// - Parameters:
/// - predicateTensor: Tensor must have a single scalar value, used to decide between then/else branches
@@ -53,30 +55,30 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( if(_:then:else:name:) );
-/// While loop before block, this block executes before the condition is evaluated for each iteration
+/// The block that executes before the condition evaluates for each iteration.
///
/// - Parameters:
-/// - inputTensors: inputTensors to the whileConditionBlock, for the 1st iteration will be same as initialInputs passed to the whileLoop
-/// - resultTensors: A valid MPSGraphTensor array with results forwarded to after block or returned from the whileLoop depending on the predicateTensor. It will be empty and the caller block should fill it up before returning.
-/// - Returns: Tensor MUST be set and have a single scalar value, used to decide between executing the bodyBlock or returning from the whileLoop
+/// - inputTensors: Input tensors to the `whileConditionBlock`, for the first iteration will be same as initialInputs passed to the while loop.
+/// - resultTensors: A valid `MPSGraphTensor` array with results forwarded to after block or returned from the while loop depending on the predicate tensor. It will be empty and the caller block should fill it up before returning.
+/// - Returns: Tensor MUST be set and have a single scalar value, used to decide between executing the body block or returning from the while loop.
typedef MPSGraphTensor *_Nonnull(^MPSGraphWhileBeforeBlock)(NSArray<MPSGraphTensor *> *inputTensors,
NSMutableArray<MPSGraphTensor *> *_Nonnull resultTensors);
-/// While loop after block, this block executes after the condition is evaluated for each iteration
+/// The block that executes after the condition evaluates for each iteration.
///
/// - Parameters:
-/// - bodyBlockArguments: inputs to the body of the whileLoop passed by the conditionBlock return, should be the same element types as the return of the whileLoop
-/// - Returns: A valid MPSGraphTensor array with results forwarded to condition block
+/// - bodyBlockArguments: Inputs to the body of the while loop passed by the condition block return, and should be the same element types as the return of the while loop.
+/// - Returns: A valid `MPSGraphTensor` array with results forwarded to the condition block.
typedef NSArray<MPSGraphTensor *> * _Nonnull(^MPSGraphWhileAfterBlock)(NSArray<MPSGraphTensor *> *bodyBlockArguments);
-/// Adds a whileLoop operation
+/// Adds a while loop operation.
///
/// - Parameters:
-/// - initialInputs: inputTensors to the whileBeforeBlock, for the 1st iteration will be same as initialInputs passed to the whileLoop
-/// - before: beforeBlock, this will be run first and then call the afterBlock with results or return results from the loop
-/// - after: afterBlock, this will execute after the condition evaluation
-/// - name: name of operation
-/// - Returns: A valid MPSGraphTensor array with results returned from the conditionBlock depending on the predicateTensor
+/// - initialInputs: inputTensors to the `beforeBlock`, for the 1st iteration will be same as initialInputs passed to the while loop.
+/// - before: `beforeBlock`, this will be run first and then call the `afterBlock` with results or return results from the loop.
+/// - after: `afterBlock`, this will execute after the condition evaluation.
+/// - name: name of operation.
+/// - Returns: A valid MPSGraphTensor array with results returned from the conditionBlock depending on the predicate tensor.
-(NSArray<MPSGraphTensor *> *) whileWithInitialInputs:(NSArray<MPSGraphTensor *> *) initialInputs
before:(MPSGraphWhileBeforeBlock) before
after:(MPSGraphWhileAfterBlock) after
@@ -84,25 +86,25 @@
MPS_SWIFT_NAME( while(initialInputs:before:after:name:) );
-/// A block for the body in the for loop
+/// A block for the body in the for loop.
///
/// - Parameters:
-/// - index: loopIndex per iteration, it is a scalar tensor
-/// - iterationArguments: arguments for this iteration, same count and corresponding elementTypes as initialIterationArguments and return types of the forLoop
-/// - Returns: A valid MPSGraphTensor array with same count and corresponding elementTypes as initialIterationArguments and return types of the forLoop
+/// - index: The for loop index per iteration, it is a scalar tensor.
+/// - iterationArguments: Arguments for this iteration, with the same count and corresponding element types as `initialIterationArguments` and return types of the `for` loop.
+/// - Returns: A valid MPSGraphTensor array with same count and corresponding element types as `initialIterationArguments` and return types of the `for` loop.
typedef NSArray<MPSGraphTensor *> * _Nonnull(^MPSGraphForLoopBodyBlock)(MPSGraphTensor *index,
NSArray<MPSGraphTensor *> *iterationArguments);
-/// Adds a forLoop operation, The lower and upper bounds specify a half-open range: the range includes the lower bound but does not include the upper bound.
+/// Adds a for loop operation, The lower and upper bounds specify a half-open range: the range includes the lower bound but does not include the upper bound.
///
/// - Parameters:
-/// - lowerBound: lowerBound value of the loop, this is a scalar tensor, this is the index the loop will start with
-/// - upperBound: upperBound value of the loop, this is a scalar tensor
-/// - step: step value of the loop, this is a scalar tensor and must be positive
-/// - initialBodyArguments: initial set of iteration arguments passed to the bodyBlock of the for loop
-/// - body: bodyBlock, this will execute the body of the forLoop
-/// - name: name of operation
-/// - Returns: A valid MPSGraphTensor array with same count and corresponding elementTypes as initialIterationArguments and return types of the forLoop
+/// - lowerBound: Lower bound value of the loop, this is a scalar tensor, this is the index the loop will start with.
+/// - upperBound: Upper bound value of the loop, this is a scalar tensor.
+/// - step: Step value of the loop, this is a scalar tensor and must be positive.
+/// - initialBodyArguments: initial set of iteration arguments passed to the bodyBlock of the for loop.
+/// - body: This block will execute the body of the for loop.
+/// - name: name of operation.
+/// - Returns: A valid `MPSGraphTensor` array with same count and corresponding element types as `initialIterationArguments` and return types of the for loop.
-(NSArray<MPSGraphTensor *> *) forLoopWithLowerBound:(MPSGraphTensor *) lowerBound
upperBound:(MPSGraphTensor *) upperBound
step:(MPSGraphTensor *) step
@@ -111,14 +113,14 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( for(lowerBound:upperBound:step:initialBodyArguments:body:name:) );
-/// Adds a forLoop operation, with a specific number of iterations
+/// Adds a for loop operation, with a specific number of iterations.
///
/// - Parameters:
/// - numberOfIterations: tensor with number of iterations the loop will execute
/// - initialBodyArguments: initial set of iteration arguments passed to the bodyBlock of the for loop
-/// - body: bodyBlock, this will execute the body of the forLoop, index will go from 0 to numberOfIterations-1
+/// - body: bodyBlock, this will execute the body of the for loop, index will go from 0 to numberOfIterations-1
/// - name: name of operation
-/// - Returns: A valid MPSGraphTensor array with same count and corresponding elementTypes as initialIterationArguments and return types of the forLoop
+/// - Returns: A valid MPSGraphTensor array with same count and corresponding elementTypes as initialIterationArguments and return types of the for loop
-(NSArray<MPSGraphTensor *> *) forLoopWithNumberOfIterations:(MPSGraphTensor *) numberOfIterations
initialBodyArguments:(NSArray<MPSGraphTensor *> *)initialBodyArguments
body:(MPSGraphForLoopBodyBlock) body
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphConvolutionOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphConvolutionOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphConvolutionOps.h 2024-03-22 20:57:13
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphConvolutionOps.h 2024-05-30 05:56:17
@@ -13,60 +13,60 @@
NS_ASSUME_NONNULL_BEGIN
-/// This is a class that describes the properties of a 2d-convolution operator.
+/// A class that describes the properties of a 2D-convolution operator.
///
-/// Use an instance of this class is to add a 2d-convolution operator with desired properties to the graph.
+/// Use an instance of this class is to add a 2D-convolution operator with the desired properties to the graph.
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraphConvolution2DOpDescriptor : MPSGraphObject<NSCopying>
-/// The scale that maps`x`-coordinate of destination to `x`-coordinate of source.
+/// The scale that maps `x`-coordinate of the destination to `x`-coordinate of the source.
///
-/// Source `x`-coordiante, `sx` is computed from destination `x`-coordinate, `dx` as `sx = strideInX*dx`.
+/// Source `x`-coordinate, `sx` is computed from destination `x`-coordinate, `dx` as `sx = strideInX*dx`.
/// Default value is 1.
@property (readwrite, nonatomic) NSUInteger strideInX;
-/// The scale that maps`y`-coordinate of destination to `y`-coordinate of source.
+/// The scale that maps `y`-coordinate of the destination to `y`-coordinate of the source.
///
-/// Source `y`-coordiante, `sy` is computed from destination `y`-coordinate, `dy` as `sy = strideInY*dy`.
+/// Source `y`-coordinate, `sy` is computed from destination `y`-coordinate, `dy` as `sy = strideInY*dy`.
/// Default value is 1.
@property (readwrite, nonatomic) NSUInteger strideInY;
-/// The amount by which weights tensor is expanded in `x`-direction.
+/// The amount by which the weights tensor expands in the `x`-direction.
///
/// The weights tensor is dilated by inserting `dilationRateInX-1` zeros between consecutive values in `x`-dimension.
/// Dilated weights tensor width is `(dilationRateInX-1)*kernelWidth+1`.
/// Default value is 1.
@property (readwrite, nonatomic) NSUInteger dilationRateInX;
-/// The amount by which weights tensor is expanded in `y`-direction.
+/// The amount by which the weights tensor expands in the `y`-direction.
///
/// The weights tensor is dilated by inserting `dilationRateInY-1` zeros between consecutive values in `y`-dimension.
/// Dilated weights tensor width is `(dilationRateInY-1)*kernelHeight+1`.
/// Default value is 1.
@property (readwrite, nonatomic) NSUInteger dilationRateInY;
-/// The number of zeros that are added on the left side of the source tensor.
+/// The number of zeros added on the left side of the source tensor.
@property (readwrite, nonatomic) NSUInteger paddingLeft;
-/// The number of zeros that are added on the right side of the source tensor.
+/// The number of zeros added on the right side of the source tensor.
@property (readwrite, nonatomic) NSUInteger paddingRight;
-/// The number of zeros that are added at the top of the source tensor.
+/// The number of zeros added at the top of the source tensor.
@property (readwrite, nonatomic) NSUInteger paddingTop;
-/// The number of zeros that are added at the bottom of the source tensor.
+/// The number of zeros added at the bottom of the source tensor.
@property (readwrite, nonatomic) NSUInteger paddingBottom;
-/// The type of padding that is applied to the source tensor.
+/// The type of padding applied to the source tensor.
///
/// If paddingStyle is `MPSGraphPaddingStyleExplicit`, `paddingLeft`, `laddingRight`, `paddingTop`,
/// and `paddingBottom` must to be specified. For all other padding styles, framework compute these values so you dont need to provide these values.
@property (readwrite, nonatomic) MPSGraphPaddingStyle paddingStyle;
-/// The named layout of data in source tensor.
+/// The named layout of data in the source tensor.
///
/// It defines the order of named dimensions (Batch, Channel, Height, Width). The convolution operation uses this to interpret data in the source tensor.
/// For example, if `dataLayout` is `MPSGraphTensorNamedDataLayoutNCHW`, frameork interprets data in source tensor as `batch x channels x height x width`
/// with `width` as fastest moving dimension.
@property (readwrite, nonatomic) MPSGraphTensorNamedDataLayout dataLayout;
-/// The named layout of data in weights tensor.
+/// The named layout of data in the weights tensor.
///
/// It defines the order of named dimensions (Output channels, Input channels, Kernel height, Kernel width). The convolution operation uses this to interpret data in the weights tensor.
/// For example, if `weightsLayout` is `MPSGraphTensorNamedDataLayoutOIHW`, frameork interprets data in weights tensor as `outputChannels x inputChannels x kernelHeight x kernelWidth`
/// with `kernelWidth` as fastest moving dimension.
@property (readwrite, nonatomic) MPSGraphTensorNamedDataLayout weightsLayout;
-/// The number of paritions of input and output channels.
+/// The number of partitions of the input and output channels.
///
/// The convolution operation divides input and output channels in `groups` partitions.
/// input channels in a group or partition are only connected to output channels in corresponding group.
@@ -121,7 +121,7 @@
dataLayout:(MPSGraphTensorNamedDataLayout) dataLayout
weightsLayout:(MPSGraphTensorNamedDataLayout) weightsLayout;
-/// Sets the left, right, top and bottom padding values.
+/// Sets the left, right, top, and bottom padding values.
/// - Parameters:
/// - paddingLeft: See ``paddingLeft`` property.
/// - paddingRight: See ``paddingRight`` property.
@@ -135,82 +135,82 @@
@end
-/// This is a class that describes the properties of a 3d-convolution operator.
+/// A class that describes the properties of a 3D-convolution operator.
///
-/// Use an instance of this class is to add a 3d-convolution operator with desired properties to the graph.
+/// Use an instance of this class is to add a 3D-convolution operator with desired properties to the graph.
MPS_CLASS_AVAILABLE_STARTING(macos(13.2), ios(16.3), tvos(16.3))
@interface MPSGraphConvolution3DOpDescriptor : MPSGraphObject<NSCopying>
/// The scale that maps`x`-coordinate of destination to `x`-coordinate of source.
///
-/// Source `x`-coordiante, `sx` is computed from destination `x`-coordinate, `dx` as `sx = strideInX*dx`.
+/// Source `x`-coordinate, `sx` is computed from destination `x`-coordinate, `dx` as `sx = strideInX*dx`.
/// Default value is 1.
@property (readwrite, nonatomic) NSUInteger strideInX;
/// The scale that maps`y`-coordinate of destination to `y`-coordinate of source.
///
-/// Source `y`-coordiante, `sy` is computed from destination `y`-coordinate, `dy` as `sy = strideInY*dy`.
+/// Source `y`-coordinate, `sy` is computed from destination `y`-coordinate, `dy` as `sy = strideInY*dy`.
/// Default value is 1.
@property (readwrite, nonatomic) NSUInteger strideInY;
/// The scale that maps`z`-coordinate of destination to `z`-coordinate of source.
///
-/// Source `z`-coordiante, `sz` is computed from destination `z`-coordinate, `dz` as `sz = strideInZ*dz`.
+/// Source `z`-coordinate, `sz` is computed from destination `z`-coordinate, `dz` as `sz = strideInZ*dz`.
/// Default value is 1.
@property (readwrite, nonatomic) NSUInteger strideInZ;
-//// The amount by which weights tensor is expanded in `x`-direction.
+/// The amount by which weights tensor expands in the `x`-direction.
///
/// The weights tensor is dilated by inserting `dilationRateInX-1` zeros between consecutive values in `x`-dimension.
/// Dilated weights tensor width is `(dilationRateInX-1)*kernelWidth+1`.
/// Default value is 1.
@property (readwrite, nonatomic) NSUInteger dilationRateInX;
-/// The amount by which weights tensor is expanded in `y`-direction.
+/// The amount by which weights tensor expands in the `y`-direction.
///
/// The weights tensor is dilated by inserting `dilationRateInY-1` zeros between consecutive values in `y`-dimension.
/// Dilated weights tensor width is `(dilationRateInY-1)*kernelHeight+1`.
/// Default value is 1.
@property (readwrite, nonatomic) NSUInteger dilationRateInY;
-/// The amount by which weights tensor is expanded in `z`-direction.
+/// The amount by which weights tensor expands in the `z`-direction.
///
/// The weights tensor is dilated by inserting `dilationRateInZ-1` zeros between consecutive values in `z`-dimension.
/// Dilated weights tensor depth is `(dilationRateInZ-1)*kernelDepth+1`.
/// Default value is 1.
@property (readwrite, nonatomic) NSUInteger dilationRateInZ;
-/// The number of zeros that are added on the left side of the source tensor.
+/// The number of zeros added on the left side of the source tensor.
@property (readwrite, nonatomic) NSUInteger paddingLeft;
-/// The number of zeros that are added on the right side of the source tensor.
+/// The number of zeros added on the right side of the source tensor.
@property (readwrite, nonatomic) NSUInteger paddingRight;
-/// The number of zeros that are added at the top of the source tensor.
+/// The number of zeros added at the top of the source tensor.
@property (readwrite, nonatomic) NSUInteger paddingTop;
-/// The number of zeros that are added at the bottom of the source tensor.
+/// The number of zeros added at the bottom of the source tensor.
@property (readwrite, nonatomic) NSUInteger paddingBottom;
-/// The number of zeros that are added at the front of the source tensor.
+/// The number of zeros added at the front of the source tensor.
@property (readwrite, nonatomic) NSUInteger paddingFront;
-/// The number of zeros that are added at the back of the source tensor.
+/// The number of zeros added at the back of the source tensor.
@property (readwrite, nonatomic) NSUInteger paddingBack;
-//// The type of padding that is applied to the source tensor.
+/// The type of padding that is applied to the source tensor.
///
/// If paddingStyle is `MPSGraphPaddingStyleExplicit`, `paddingLeft`, `laddingRight`, `paddingTop`,
/// `paddingBottom`, `paddingFront` and `paddingBack` must to be specified. For all other padding styles, framework compute these values so you dont need to provide these values.
@property (readwrite, nonatomic) MPSGraphPaddingStyle paddingStyle;
-/// The named layout of data in source tensor.
+/// The named layout of data in the source tensor.
///
/// It defines the order of named dimensions (Batch, Channel, Depth, Height, Width). The convolution operation uses this to interpret data in the source tensor.
/// For example, if `dataLayout` is `MPSGraphTensorNamedDataLayoutNCDHW`, frameork interprets data in source tensor as `batch x channels x depth x height x width`
/// with `width` as fastest moving dimension.
@property (readwrite, nonatomic) MPSGraphTensorNamedDataLayout dataLayout;
-//// The named layout of data in weights tensor.
+/// The named layout of data in the weights tensor.
///
/// It defines the order of named dimensions (Output channels, Input channels, Kernel depth, Kernel height, Kernel width). The convolution operation uses this to interpret data in the weights tensor.
/// For example, if `weightsLayout` is `MPSGraphTensorNamedDataLayoutOIDHW`, frameork interprets data in weights tensor as `outputChannels x inputChannels x kernelDepth x kernelHeight x kernelWidth`
/// with `kernelWidth` as fastest moving dimension.
@property (readwrite, nonatomic) MPSGraphTensorNamedDataLayout weightsLayout;
-/// The number of paritions of input and output channels.
+/// The number of partitions of the input and output channels.
///
/// The convolution operation divides input and output channels in `groups` partitions.
/// input channels in a group or partition are only connected to output channels in corresponding group.
/// Number of weights the convolution needs is `outputFeatureChannels x inputFeatureChannels/groups x kernelDepth x kernelWidth x kernelHeight`
@property (readwrite, nonatomic) NSUInteger groups;
-/// Creates convolution descriptor with given values for parameters.
+/// Creates a convolution descriptor with given values for parameters.
/// - Parameters:
/// - strideInX: See ``strideInX`` property.
/// - strideInY: See ``strideInY`` property.
@@ -246,7 +246,7 @@
dataLayout:(MPSGraphTensorNamedDataLayout) dataLayout
weightsLayout:(MPSGraphTensorNamedDataLayout) weightsLayout;
-/// Creates convolution descriptor with given values for parameters.
+/// Creates a convolution descriptor with given values for parameters.
/// - Parameters:
/// - strideInX: See ``strideInX`` property.
/// - strideInY: See ``strideInY`` property.
@@ -270,7 +270,7 @@
dataLayout:(MPSGraphTensorNamedDataLayout) dataLayout
weightsLayout:(MPSGraphTensorNamedDataLayout) weightsLayout;
-/// Sets the left, right, top, bottom, front and back padding values.
+/// Sets the left, right, top, bottom, front, and back padding values.
/// - Parameters:
/// - paddingLeft: See ``paddingLeft`` property.
/// - paddingRight: See ``paddingRight`` property.
@@ -286,11 +286,11 @@
paddingBack:(NSUInteger) paddingBack;
@end
-/// This is a category that defines the methods which can be used to add 2d-convolution operator to the graph with properties described by an instance of `MPSGraphConvolution2DOpDescriptor`.
+/// This is a category that defines the methods which can be used to add 2D-convolution operator to the graph with properties described by an instance of `MPSGraphConvolution2DOpDescriptor`.
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(MPSGraphConvolutionOps)
-/// Creates a 2d (forward) convolution operation and returns the result tensor.
+/// Creates a 2D (forward) convolution operation and returns the result tensor.
///
/// - Parameters:
/// - source: source tensor - must be a rank 4 tensor. The layout is defined by ``descriptor.dataLayout``.
@@ -304,9 +304,9 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( convolution2D(_:weights:descriptor:name:) );
-/// Creates a 2d convoluiton gradient operation with respect to the source tensor of the forward convolution.
+/// Creates a 2D convolution gradient operation with respect to the source tensor of the forward convolution.
///
-/// If `S` is source tensor to forward convoluiton, `R` is the result/returned tensor from forward convolution,
+/// If `S` is source tensor to forward convolution, `R` is the result/returned tensor from forward convolution,
/// and `L` is the loss function, `convolution2DDataGradientWithIncomingGradientTensor` returns tensor `dL/dS = dL/dR * dR/dS`,
/// where `dL/dR` is the incomingGradient parameter.
///
@@ -314,8 +314,8 @@
/// - incomingGradient: Incoming loss gradient tensor
/// - weights: Forward pass weights tensor
/// - outputShape: Shape of the forward pass source tensor
-/// - forwardConvolutionDescriptor: Forward convolution 2d op ``descriptor``
-/// - name: The name for the operation
+/// - forwardConvolutionDescriptor: Forward convolution 2D op ``descriptor``
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) convolution2DDataGradientWithIncomingGradientTensor:(MPSGraphTensor *) incomingGradient
weightsTensor:(MPSGraphTensor *) weights
@@ -324,9 +324,9 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( convolution2DDataGradient(_:weights:outputShape:forwardConvolutionDescriptor:name:) );
-/// Creates a 2d convolution gradient operation with respect to the source tensor of the forward convolution.
+/// Creates a 2D convolution gradient operation with respect to the source tensor of the forward convolution.
///
-/// If `S` is source tensor to forward convoluiton, `R` is the result/returned tensor of forward convolution,
+/// If `S` is source tensor to forward convolution, `R` is the result/returned tensor of forward convolution,
/// and `L` is the loss function, convolution2DDataGradientWithIncomingGradientTensor returns tensor `dL/dS = dL/dR * dR/dS`,
/// where `dL/dR` is the incomingGradient parameter.
///
@@ -334,8 +334,8 @@
/// - incomingGradient: Incoming loss gradient tensor
/// - weights: Forward pass weights tensor
/// - outputShapeTensor: 4D Int32 or Int64 tensor. Shape of the forward pass source tensor
-/// - forwardConvolutionDescriptor: Forward convolution 2d op ``descriptor``
-/// - name: The name for the operation
+/// - forwardConvolutionDescriptor: Forward convolution 2D op ``descriptor``
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) convolution2DDataGradientWithIncomingGradientTensor:(MPSGraphTensor *) gradient
weightsTensor:(MPSGraphTensor *) weights
@@ -345,9 +345,9 @@
MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
MPS_SWIFT_NAME( convolution2DDataGradient(_:weights:outputShapeTensor:forwardConvolutionDescriptor:name:) );
-/// Creates a 2d convolution gradient operation with respect to the weights tensor of the forward convolution.
+/// Creates a 2D convolution gradient operation with respect to the weights tensor of the forward convolution.
///
-/// If `W` is weights tensor to forward convoluiton, `R` is the result/returned tensor of forward convolution,
+/// If `W` is weights tensor to forward convolution, `R` is the result/returned tensor of forward convolution,
/// and `L` is the loss function, convolution2DWeightsGradientWithIncomingGradientTensor returns tensor `dL/dW = dL/dR * dR/dW`,
/// where `dL/dR` is the incomingGradient parameter.
///
@@ -355,8 +355,8 @@
/// - incomingGradient: Incoming loss gradient tensor
/// - weights: Forward pass weights tensor
/// - outputShape: Shape of the forward pass source tensor
-/// - forwardConvolutionDescriptor: Forward convolution 2d op ``descriptor``
-/// - name: The name for the operation
+/// - forwardConvolutionDescriptor: Forward convolution 2D op ``descriptor``
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) convolution2DWeightsGradientWithIncomingGradientTensor:(MPSGraphTensor *) incomingGradient
sourceTensor:(MPSGraphTensor *) source
@@ -366,9 +366,9 @@
MPS_SWIFT_NAME( convolution2DWeightsGradient(_:source:outputShape:forwardConvolutionDescriptor:name:) );
-/// Creates a 2d convolution gradient operation with respect to weights tensor of forward convolution.
+/// Creates a 2D convolution gradient operation with respect to weights tensor of forward convolution.
///
-/// If `W` is weights tensor to forward convoluiton, `R` is the result/returned tensor of forward convolution,
+/// If `W` is weights tensor to forward convolution, `R` is the result/returned tensor of forward convolution,
/// and `L` is the loss function, convolution2DWeightsGradientWithIncomingGradientTensor returns tensor `dL/dW = dL/dR * dR/dW`,
/// where `dL/dR` is the incomingGradient parameter.
///
@@ -376,8 +376,8 @@
/// - incomingGradient: Incoming loss gradient tensor
/// - weights: Forward pass weights tensor
/// - outputShapeTensor: 4D int32 or Int64 Tensor. Shape of the forward pass source tensor
-/// - forwardConvolutionDescriptor: Forward convolution 2d op ``descriptor``
-/// - name: The name for the operation
+/// - forwardConvolutionDescriptor: Forward convolution 2D op ``descriptor``
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) convolution2DWeightsGradientWithIncomingGradientTensor:(MPSGraphTensor *) gradient
sourceTensor:(MPSGraphTensor *) source
@@ -388,7 +388,7 @@
MPS_SWIFT_NAME( convolution2DWeightsGradient(_:source:outputShapeTensor:forwardConvolutionDescriptor:name:) );
-/// Creates a 3d forward convolution operation and returns the result tensor.
+/// Creates a 3D forward convolution operation and returns the result tensor.
///
/// - Parameters:
/// - source: source tensor - must be of rank 5. The layout is defined by ``descriptor.dataLayout``.
@@ -403,9 +403,9 @@
MPS_CLASS_AVAILABLE_STARTING(macos(13.2), ios(16.3), tvos(16.3))
MPS_SWIFT_NAME( convolution3D(_:weights:descriptor:name:) );
-/// Creates a 3d convolution gradient operation with respect to the source tensor of the forward convolution.
+/// Creates a 3D convolution gradient operation with respect to the source tensor of the forward convolution.
///
-/// If `S` is source tensor to forward convoluiton, `R` is the result/returned tensor of forward convolution,
+/// If `S` is source tensor to forward convolution, `R` is the result/returned tensor of forward convolution,
/// and `L` is the loss function, convolution3DDataGradientWithIncomingGradientTensor returns tensor `dL/dS = dL/dR * dR/dS`,
/// where `dL/dR` is the incomingGradient parameter.
///
@@ -413,8 +413,8 @@
/// - incomingGradient: Incoming loss gradient tensor
/// - weights: Forward pass weights tensor
/// - outputShape: Shape of the forward pass source tensor
-/// - forwardConvolutionDescriptor: Forward convolution 2d op ``descriptor``
-/// - name: The name for the operation
+/// - forwardConvolutionDescriptor: Forward convolution 2D op ``descriptor``
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) convolution3DDataGradientWithIncomingGradientTensor:(MPSGraphTensor *) incomingGradient
weightsTensor:(MPSGraphTensor *) weights
@@ -424,9 +424,9 @@
MPS_CLASS_AVAILABLE_STARTING(macos(13.2), ios(16.3), tvos(16.3))
MPS_SWIFT_NAME( convolution3DDataGradient(_:weights:outputShape:forwardConvolutionDescriptor:name:) );
-/// Creates a 3d convolution gradient operation with respect to the source tensor of the forward convolution.
+/// Creates a 3D convolution gradient operation with respect to the source tensor of the forward convolution.
///
-/// If `S` is source tensor to forward convoluiton, `R` is the result/returned tensor of forward convolution,
+/// If `S` is source tensor to forward convolution, `R` is the result/returned tensor of forward convolution,
/// and `L` is the loss function, convolution3DDataGradientWithIncomingGradientTensor returns tensor `dL/dS = dL/dR * dR/dS`,
/// where `dL/dR` is the incomingGradient parameter.
///
@@ -434,8 +434,8 @@
/// - incomingGradient: Incoming loss gradient tensor
/// - weights: Forward pass weights tensor
/// - outputShapeTensor: 4D Int32 or Int64 tensor. Shape of the forward pass source tensor
-/// - forwardConvolutionDescriptor: Forward convolution 2d op ``descriptor``
-/// - name: The name for the operation
+/// - forwardConvolutionDescriptor: Forward convolution 2D op ``descriptor``
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) convolution3DDataGradientWithIncomingGradientTensor:(MPSGraphTensor *) gradient
weightsTensor:(MPSGraphTensor *) weights
@@ -445,9 +445,9 @@
MPS_CLASS_AVAILABLE_STARTING(macos(13.2), ios(16.3), tvos(16.3))
MPS_SWIFT_NAME( convolution3DDataGradient(_:weights:outputShapeTensor:forwardConvolutionDescriptor:name:) );
-/// Creates a 3d convolution gradient operation with respect to the weights tensor of the forward convolution.
+/// Creates a 3D convolution gradient operation with respect to the weights tensor of the forward convolution.
///
-/// If `W` is weights tensor to forward convoluiton, `R` is the result/returned tensor of forward convolution,
+/// If `W` is weights tensor to forward convolution, `R` is the result/returned tensor of forward convolution,
/// and `L` is the loss function, convolution3DWeightsGradientWithIncomingGradientTensor returns tensor `dL/dW = dL/dR * dR/dW`,
/// where `dL/dR` is the incomingGradient parameter.
///
@@ -455,8 +455,8 @@
/// - incomingGradient: Incoming loss gradient tensor
/// - weights: Forward pass weights tensor
/// - outputShape: Shape of the forward pass source tensor
-/// - forwardConvolutionDescriptor: Forward convolution 2d op ``descriptor``
-/// - name: The name for the operation
+/// - forwardConvolutionDescriptor: Forward convolution 2D op ``descriptor``
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) convolution3DWeightsGradientWithIncomingGradientTensor:(MPSGraphTensor *) incomingGradient
sourceTensor:(MPSGraphTensor *) source
@@ -466,9 +466,9 @@
MPS_CLASS_AVAILABLE_STARTING(macos(13.2), ios(16.3), tvos(16.3))
MPS_SWIFT_NAME( convolution3DWeightsGradient(_:source:outputShape:forwardConvolutionDescriptor:name:) );
-/// Creates a 3d convolution gradient operation with respect to the weights tensor of the forward convolution.
+/// Creates a 3D convolution gradient operation with respect to the weights tensor of the forward convolution.
///
-/// If `W` is weights tensor to forward convoluiton, `R` is the result/returned tensor of forward convolution,
+/// If `W` is weights tensor to forward convolution, `R` is the result/returned tensor of forward convolution,
/// and `L` is the loss function, convolution3DWeightsGradientWithIncomingGradientTensor returns tensor `dL/dW = dL/dR * dR/dW`,
/// where `dL/dR` is the incomingGradient parameter.
///
@@ -476,8 +476,8 @@
/// - incomingGradient: Incoming loss gradient tensor
/// - weights: Forward pass weights tensor
/// - outputShapeTensor: 4D int32 or Int64 Tensor. Shape of the forward pass source tensor
-/// - forwardConvolutionDescriptor: Forward convolution 2d op ``descriptor``
-/// - name: The name for the operation
+/// - forwardConvolutionDescriptor: Forward convolution 2D op ``descriptor``
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) convolution3DWeightsGradientWithIncomingGradientTensor:(MPSGraphTensor *) gradient
sourceTensor:(MPSGraphTensor *) source
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphConvolutionTransposeOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphConvolutionTransposeOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphConvolutionTransposeOps.h 2024-04-13 16:01:45
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphConvolutionTransposeOps.h 2024-05-30 11:41:32
@@ -13,12 +13,12 @@
NS_ASSUME_NONNULL_BEGIN
-/// This is a category that defines the methods which can be used to add 2d-convolution transpose operator to the graph with properties described by an instance of `MPSGraphConvolution2DOpDescriptor`.
+/// This is a category that defines the methods which can be used to add 2D-convolution transpose operator to the graph with properties described by an instance of `MPSGraphConvolution2DOpDescriptor`.
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(MPSGraphConvolutionTransposeOps)
-/// Creates convolution transpose operation and return the result tensor.
+/// Creates a convolution transpose operation and returns the result tensor.
///
/// Convolution Tranpose operation is exactly the same as convolution gradint with respect to input image `convolution2DDataGradientWithIncomingGradient`.
/// Weights tensor and source tensors are interpreted as they are in `convolution2DDataGradientWithIncomingGradient`.
@@ -30,8 +30,8 @@
/// - Parameters:
/// - source: input tensor
/// - weights: weights tensor
-/// - outputShape: shape of the result tensor
-/// - descriptor: descriptor for the corresponding forward 2d-convolution operation
+/// - outputShape: shape of the result tensor.
+/// - descriptor: descriptor for the corresponding forward 2D-convolution operation
/// - name: name for the operation
/// - Returns: A valid MPSGraphTensor object.
-(MPSGraphTensor *) convolutionTranspose2DWithSourceTensor:(MPSGraphTensor *) source
@@ -41,13 +41,13 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( convolutionTranspose2D(_:weights:outputShape:descriptor:name:) );
-/// Creates a convolution transpose operation and return the result tensor.
+/// Creates a convolution transpose operation and returns the result tensor.
///
/// - Parameters:
/// - source: input tensor
/// - weights: weights tensor
-/// - outputShape: 1D Int32 or Int64 tensor. shape of the result tensor
-/// - descriptor: descriptor for the corresponding forward Conv2d operation
+/// - outputShape: 1D Int32 or Int64 tensor. shape of the result tensor.
+/// - descriptor: descriptor for the corresponding forward Conv2D operation
/// - name: name for the operation
/// - Returns: A valid MPSGraphTensor object.
-(MPSGraphTensor *) convolutionTranspose2DWithSourceTensor:(MPSGraphTensor *) source
@@ -58,7 +58,7 @@
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
MPS_SWIFT_NAME( convolutionTranspose2D(_:weights:outputShapeTensor:descriptor:name:) );
-/// Creates a convolution transpose gradient operation with respect of source tensor of convolution transpose operation and returns the result tensor.
+/// Creates a convolution transpose gradient operation with respect to the source tensor of convolution transpose operation and returns the result tensor.
///
/// Inserts an operation in graph to compute gradient of convolution transpose with respect to source tensor of the corresponding
/// convolution transpose operation.
@@ -68,7 +68,7 @@
/// - weights: Forward pass weights tensor
/// - outputShape: Shape of the forward pass source tensor
/// - forwardConvolutionDescriptor: Forward pass op descriptor
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) convolutionTranspose2DDataGradientWithIncomingGradientTensor:(MPSGraphTensor *) incomingGradient
weightsTensor:(MPSGraphTensor *) weights
@@ -77,7 +77,7 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( convolutionTranspose2DDataGradient(_:weights:outputShape:forwardConvolutionDescriptor:name:) );
-/// Creates a convolution transpose gradient operation with respect of source tensor of convolution transpose operation and returns the result tensor.
+/// Creates a convolution transpose gradient operation with respect to the source tensor of convolution transpose operation and returns the result tensor.
///
/// Inserts an operation in graph to compute gradient of convolution transpose with respect to source tensor of the corresponding
/// convolution transpose operation.
@@ -87,7 +87,7 @@
/// - weights: Forward pass weights tensor
/// - outputShape: 1D Int32 or Int64 Tensor. Shape of the forward pass source tensor
/// - forwardConvolutionDescriptor: Forward pass op descriptor
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) convolutionTranspose2DDataGradientWithIncomingGradientTensor:(MPSGraphTensor *) incomingGradient
weightsTensor:(MPSGraphTensor *) weights
@@ -97,7 +97,7 @@
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
MPS_SWIFT_NAME( convolutionTranspose2DDataGradient(_:weights:outputShapeTensor:forwardConvolutionDescriptor:name:) );
-/// Creates a convolution transpose gradient operation with respect of the weights tensor of convolution transpose operation and returns the result tensor.
+/// Creates a convolution transpose gradient operation with respect to the weights tensor of the convolution transpose operation and returns the result tensor.
///
/// Inserts an operation in graph to compute gradient of convolution transpose with respect to the weights tensor of the corresponding
/// convolution transpose operation.
@@ -107,7 +107,7 @@
/// - source: Forward pass source tensor
/// - outputShape: Shape of the forward pass source weights tensor
/// - forwardConvolutionDescriptor: Forward pass op descriptor
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) convolutionTranspose2DWeightsGradientWithIncomingGradientTensor:(MPSGraphTensor *) incomingGradientTensor
sourceTensor:(MPSGraphTensor *) source
@@ -116,7 +116,7 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( convolutionTranspose2DWeightsGradient(_:weights:outputShape:forwardConvolutionDescriptor:name:) );
-/// Creates a convolution transpose gradient operation with respect of the weights tensor of convolution transpose operation and returns the result tensor.
+/// Creates a convolution transpose gradient operation with respect to the weights tensor of the convolution transpose operation and returns the result tensor.
///
/// Inserts an operation in graph to compute gradient of convolution transpose with respect to the weights tensor of the corresponding
/// convolution transpose operation.
@@ -126,7 +126,7 @@
/// - source: Forward pass source tensor
/// - outputShape: 1D Int32 or Int64 Tensor. Shape of the forward pass source weights tensor
/// - forwardConvolutionDescriptor: Forward pass op descriptor
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) convolutionTranspose2DWeightsGradientWithIncomingGradientTensor:(MPSGraphTensor *) incomingGradientTensor
sourceTensor:(MPSGraphTensor *) source
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCore.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCore.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCore.h 2024-04-13 21:12:47
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCore.h 2024-05-30 05:56:18
@@ -15,29 +15,29 @@
NS_ASSUME_NONNULL_BEGIN
MPS_CLASS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0))
-/// Common base class for all MPSGraph objects.
+/// The common base class for all Metal Performance Shaders Graph objects.
///
/// Only the child classes should be used.
@interface MPSGraphObject: NSObject
@end
-/// Base type class for types on MPSGraph tensors.
+/// The base type class for types on tensors.
MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
@interface MPSGraphType: MPSGraphObject<NSCopying>
@end
-/// Shaped type class for types on MPSGraph tensors has a shape and a dataType.
+/// The shaped type class for types on tensors with a shape and data type.
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraphShapedType: MPSGraphType
-/// Shape of the shapedType.
+/// The Shape of the shaped type.
@property (readwrite, nullable, copy, atomic) MPSShape *shape;
-/// DataType of the shapedType.
+/// The data type of the shaped type.
@property (readwrite, atomic) MPSDataType dataType;
-/// Initialize an MPSGraphShapedType.
+/// Initializes a shaped type.
///
/// - Parameters:
/// - shape: The shape of the shaped type.
@@ -46,7 +46,7 @@
-(instancetype) initWithShape:(MPSShape * _Nullable) shape
dataType:(MPSDataType) dataType;
-/// Checks if shapes and elementDataType are the same as the input shapedType.
+/// Checks if shapes and element data type are the same as the input shaped type.
///
/// - Parameters:
/// - object: shapedType to compare to
@@ -55,7 +55,7 @@
@end
-/// Tensor Layout
+/// The tensor layout.
typedef NS_ENUM(NSUInteger, MPSGraphTensorNamedDataLayout)
{
/// LayoutNCHW
@@ -82,7 +82,7 @@
MPSGraphTensorNamedDataLayoutDHWIO MPS_ENUM_AVAILABLE_STARTING(macos(13.2), ios(16.3), tvos(16.3)) = 10L,
};
-/// Tensor Layout
+/// The tensor padding style.
typedef NS_ENUM(NSUInteger, MPSGraphPaddingStyle)
{
/// Explicit
@@ -97,7 +97,7 @@
MPSGraphPaddingStyleONNX_SAME_LOWER MPS_ENUM_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0)) = 4L,
};
-/// Tensor Padding mode
+/// The tensor padding mode.
typedef NS_ENUM(NSInteger, MPSGraphPaddingMode)
{
/// Constant
@@ -116,7 +116,7 @@
MPSGraphPaddingModeAntiPeriodic MPS_ENUM_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0)) = 6L,
};
-/// Reduction Mode
+/// The reduction mode.
typedef NS_ENUM(NSUInteger, MPSGraphReductionMode)
{
/// Min
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCumulativeOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCumulativeOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCumulativeOps.h 2024-04-13 21:12:48
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCumulativeOps.h 2024-05-30 05:56:18
@@ -16,14 +16,14 @@
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(MPSGraphCumulativeOps)
-/// Compute the cumulative sum of the input tensor along the specified axis.
+/// Computes the cumulative sum of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axis: The tensor dimension where you compute the cumulative operation
/// - exclusive: If true, perform the exclusive cumulative operation, and the first element will be equal to zero
/// - reverse: If true, reverse the direction of the cumulative operation along the specified axis
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) cumulativeSumWithTensor:(MPSGraphTensor *) tensor
axis:(NSInteger) axis
@@ -33,14 +33,14 @@
MPS_SWIFT_NAME( cumulativeSum(_:axis:exclusive:reverse:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Compute the cumulative sum of the input tensor along the specified axis.
+/// Computes the cumulative sum of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axisTensor: The tensor dimension where you compute the cumulative operation
/// - exclusive: If true, perform the exclusive cumulative operation, and the first element will be equal to zero
/// - reverse: If true, reverse the direction of the cumulative operation along the specified axis
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) cumulativeSumWithTensor:(MPSGraphTensor *) tensor
axisTensor:(MPSGraphTensor *) axisTensor
@@ -50,12 +50,12 @@
MPS_SWIFT_NAME( cumulativeSum(_:axisTensor:exclusive:reverse:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Compute the cumulative sum of the input tensor along the specified axis.
+/// Computes the cumulative sum of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axis: The tensor dimension where you compute the cumulative operation
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) cumulativeSumWithTensor:(MPSGraphTensor *) tensor
axis:(NSInteger) axis
@@ -63,12 +63,12 @@
MPS_SWIFT_NAME( cumulativeSum(_:axis:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Compute the cumulative sum of the input tensor along the specified axis.
+/// Computes the cumulative sum of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axisTensor: The tensor dimension where you compute the cumulative operation
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) cumulativeSumWithTensor:(MPSGraphTensor *) tensor
axisTensor:(MPSGraphTensor *) axisTensor
@@ -76,14 +76,14 @@
MPS_SWIFT_NAME( cumulativeSum(_:axisTensor:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Compute the cumulative product of the input tensor along the specified axis.
+/// Computes the cumulative product of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axis: The tensor dimension where you compute the cumulative operation
/// - exclusive: If true, perform the exclusive cumulative operation, and the first element will be equal to one
/// - reverse: If true, reverse the direction of the cumulative operation along the specified axis
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) cumulativeProductWithTensor:(MPSGraphTensor *) tensor
axis:(NSInteger) axis
@@ -93,14 +93,14 @@
MPS_SWIFT_NAME( cumulativeProduct(_:axis:exclusive:reverse:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Compute the cumulative product of the input tensor along the specified axis.
+/// Computes the cumulative product of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axisTensor: The tensor dimension where you compute the cumulative operation
/// - exclusive: If true, perform the exclusive cumulative operation, and the first element will be equal to one
/// - reverse: If true, reverse the direction of the cumulative operation along the specified axis
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) cumulativeProductWithTensor:(MPSGraphTensor *) tensor
axisTensor:(MPSGraphTensor *) axisTensor
@@ -110,12 +110,12 @@
MPS_SWIFT_NAME( cumulativeProduct(_:axisTensor:exclusive:reverse:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Compute the cumulative product of the input tensor along the specified axis.
+/// Computes the cumulative product of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axis: The tensor dimension where you compute the cumulative operation
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) cumulativeProductWithTensor:(MPSGraphTensor *) tensor
axis:(NSInteger) axis
@@ -123,14 +123,14 @@
MPS_SWIFT_NAME( cumulativeProduct(_:axis:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Compute the cumulative product of the input tensor along the specified axis.
+/// Computes the cumulative product of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axisTensor: The tensor dimension where you compute the cumulative operation
/// - exclusive: If true, perform the exclusive cumulative operation, and the first element will be equal to one
/// - reverse: If true, reverse the direction of the cumulative operation along the specified axis
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) cumulativeProductWithTensor:(MPSGraphTensor *) tensor
axisTensor:(MPSGraphTensor *) axisTensor
@@ -138,14 +138,14 @@
MPS_SWIFT_NAME( cumulativeProduct(_:axisTensor:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Compute the cumulative minimum of the input tensor along the specified axis.
+/// Computes the cumulative minimum of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axis: The tensor dimension where you compute the cumulative operation
/// - exclusive: If true, perform the exclusive cumulative operation, and the first element will be equal to the largest value of the tensor data type
/// - reverse: If true, reverse the direction of the cumulative operation along the specified axis
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) cumulativeMinimumWithTensor:(MPSGraphTensor *) tensor
axis:(NSInteger) axis
@@ -155,14 +155,14 @@
MPS_SWIFT_NAME( cumulativeMinimum(_:axis:exclusive:reverse:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Compute the cumulative minimum of the input tensor along the specified axis.
+/// Computes the cumulative minimum of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axisTensor: The tensor dimension where you compute the cumulative operation
/// - exclusive: If true, perform the exclusive cumulative operation, and the first element will be equal to the largest value of the tensor data type
/// - reverse: If true, reverse the direction of the cumulative operation along the specified axis
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) cumulativeMinimumWithTensor:(MPSGraphTensor *) tensor
axisTensor:(MPSGraphTensor *) axisTensor
@@ -172,12 +172,12 @@
MPS_SWIFT_NAME( cumulativeMinimum(_:axisTensor:exclusive:reverse:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Compute the cumulative minimum of the input tensor along the specified axis.
+/// Computes the cumulative minimum of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axis: The tensor dimension where you compute the cumulative operation
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) cumulativeMinimumWithTensor:(MPSGraphTensor *) tensor
axis:(NSInteger) axis
@@ -185,14 +185,14 @@
MPS_SWIFT_NAME( cumulativeMinimum(_:axis:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Compute the cumulative minimum of the input tensor along the specified axis.
+/// Computes the cumulative minimum of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axisTensor: The tensor dimension where you compute the cumulative operation
/// - exclusive: If true, perform the exclusive cumulative operation, and the first element will be equal to the largest value of the tensor data type
/// - reverse: If true, reverse the direction of the cumulative operation along the specified axis
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) cumulativeMinimumWithTensor:(MPSGraphTensor *) tensor
axisTensor:(MPSGraphTensor *) axisTensor
@@ -200,14 +200,14 @@
MPS_SWIFT_NAME( cumulativeMinimum(_:axisTensor:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Compute the cumulative maximum of the input tensor along the specified axis.
+/// Computes the cumulative maximum of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axis: The tensor dimension where you compute the cumulative operation
/// - exclusive: If true, perform the exclusive cumulative operation, and the first element will be equal to the lowest value of the tensor data type
/// - reverse: If true, reverse the direction of the cumulative operation along the specified axis
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) cumulativeMaximumWithTensor:(MPSGraphTensor *) tensor
axis:(NSInteger) axis
@@ -217,14 +217,14 @@
MPS_SWIFT_NAME( cumulativeMaximum(_:axis:exclusive:reverse:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Compute the cumulative maximum of the input tensor along the specified axis.
+/// Computes the cumulative maximum of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axisTensor: The tensor dimension where you compute the cumulative operation
/// - exclusive: If true, perform the exclusive cumulative operation, and the first element will be equal to the lowest value of the tensor data type
/// - reverse: If true, reverse the direction of the cumulative operation along the specified axis
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) cumulativeMaximumWithTensor:(MPSGraphTensor *) tensor
axisTensor:(MPSGraphTensor *) axisTensor
@@ -234,12 +234,12 @@
MPS_SWIFT_NAME( cumulativeMaximum(_:axisTensor:exclusive:reverse:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Compute the cumulative maximum of the input tensor along the specified axis.
+/// Computes the cumulative maximum of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axis: The tensor dimension where you compute the cumulative operation
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) cumulativeMaximumWithTensor:(MPSGraphTensor *) tensor
axis:(NSInteger) axis
@@ -247,12 +247,12 @@
MPS_SWIFT_NAME( cumulativeMaximum(_:axis:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Compute the cumulative maximum of the input tensor along the specified axis.
+/// Computes the cumulative maximum of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axisTensor: The tensor dimension where you compute the cumulative operation
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) cumulativeMaximumWithTensor:(MPSGraphTensor *) tensor
axisTensor:(MPSGraphTensor *) axisTensor
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphDepthwiseConvolutionOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphDepthwiseConvolutionOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphDepthwiseConvolutionOps.h 2024-04-13 21:12:47
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphDepthwiseConvolutionOps.h 2024-05-30 04:43:27
@@ -12,38 +12,56 @@
NS_ASSUME_NONNULL_BEGIN
-/// This is a class that defines parameters for a 2d depthwise convolution operation.
+/// A class that defines the parameters for a 2D-depthwise convolution operation.
///
-/// A `MPSGraphDepthwiseConvolution2DOpDescriptor` defines constant parameters for 2d depthwise convolutions.
+/// An `MPSGraphDepthwiseConvolution2DOpDescriptor` defines constant parameters for 2D-depthwise convolutions.
/// Use this class with ``MPSGraph/depthwiseConvolution2DWithSourceTensor:weightsTensor:descriptor:name:``,
-/// ``MPSGraph/depthwiseConvolution2DDataGradientWithIncomingGradientTensor:weightsTensor:outputShape:descriptor:name:``
+/// ``MPSGraph/depthwiseConvolution2DDataGradientWithIncomingGradientTensor:weightsTensor:outputShape:descriptor:name:``,
/// and ``MPSGraph/depthwiseConvolution2DWeightsGradientWithIncomingGradientTensor:sourceTensor:outputShape:descriptor:name:``
/// methods.
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraphDepthwiseConvolution2DOpDescriptor : MPSGraphObject<NSCopying>
-/// The stride for X (Width) dimension. Default value: 1.
+/// The stride for the x dimension.
+///
+/// Default value: 1.
@property (readwrite, nonatomic) NSUInteger strideInX;
-/// The stride for Y (Height) dimension. Default value: 1.
+/// The stride for the y dimension.
+///
+/// Default value: 1.
@property (readwrite, nonatomic) NSUInteger strideInY;
-/// The dilation rate for X (Width) dimension. Default value: 1.
+/// The dilation rate for the x dimension.
+///
+/// Default value: 1.
@property (readwrite, nonatomic) NSUInteger dilationRateInX;
-/// The dilation rate for Y (Height) dimension. Default value: 1.
+/// The dilation rate for the y dimension.
+///
+/// Default value: 1.
@property (readwrite, nonatomic) NSUInteger dilationRateInY;
-/// The explicit padding value for X (Width) dimension the operation adds before the data. Default value: 0.
+/// The explicit padding value for the x dimension the operation adds before the data.
+///
+/// Default value: 0.
@property (readwrite, nonatomic) NSUInteger paddingLeft;
-/// The explicit padding value for X (Width) dimension operation adds after the data. Default value: 0.
+/// The explicit padding value for the x dimension operation adds after the data.
+///
+/// Default value: 0.
@property (readwrite, nonatomic) NSUInteger paddingRight;
-/// The explicit padding value for Y (Height) dimension operation adds before the data. Default value: 0.
+/// The explicit padding value for the y dimension operation adds before the data.
+///
+/// Default value: 0.
@property (readwrite, nonatomic) NSUInteger paddingTop;
-/// The explicit padding value for Y (Height) dimension operation adds after the data. Default value: 0.
+/// The explicit padding value for the y dimension operation adds after the data.
+///
+/// Default value: 0.
@property (readwrite, nonatomic) NSUInteger paddingBottom;
-/// The padding style for the operation. Default value: `MPSGraphPaddingStyleExplicit`.
+/// The padding style for the operation.
+///
+/// Default value is `MPSGraphPaddingStyleExplicit`.
@property (readwrite, nonatomic) MPSGraphPaddingStyle paddingStyle;
-/// The data layout of the input data (in forward pass).
+/// The data layout of the input data in the forward pass.
///
/// See: ``MPSGraphTensorNamedDataLayout``.
@property (readwrite, nonatomic) MPSGraphTensorNamedDataLayout dataLayout;
@@ -52,7 +70,7 @@
/// NOTE: 'O' index is channel multiplier index. See: ``MPSGraphTensorNamedDataLayout``.
@property (readwrite, nonatomic) MPSGraphTensorNamedDataLayout weightsLayout;
-/// Creates a 2d depthwise convolution descriptor with given values.
+/// Creates a 2D-depthwise convolution descriptor with given values.
///
/// - Parameters:
/// - strideInX: See `strideInX` property.
@@ -79,7 +97,7 @@
dataLayout:(MPSGraphTensorNamedDataLayout) dataLayout
weightsLayout:(MPSGraphTensorNamedDataLayout) weightsLayout;
-/// Creates a 2d depthwise convolution descriptor with given properties and default values.
+/// Creates a 2D-depthwise convolution descriptor with given properties and default values.
///
/// - Parameters:
/// - dataLayout: See `dataLayout` property.
@@ -104,9 +122,9 @@
@end
-/// This class defines parameters for a 3d depthwise convolution operation.
+/// The class that defines the parameters for a 3D-depthwise convolution operation.
///
-/// A `MPSGraphDepthwiseConvolution3DOpDescriptor` defines constant parameters for 3d depthwise convolutions.
+/// A `MPSGraphDepthwiseConvolution3DOpDescriptor` defines constant parameters for 3D depthwise convolutions.
/// Use this class with ``MPSGraph/depthwiseConvolution3DWithSourceTensor:weightsTensor:descriptor:name:``,
/// ``MPSGraph/depthwiseConvolution3DDataGradientWithIncomingGradientTensor:weightsTensor:outputShape:descriptor:name:``
/// and ``MPSGraph/depthwiseConvolution3DWeightsGradientWithIncomingGradientTensor:sourceTensor:outputShape:descriptor:name:``
@@ -136,11 +154,13 @@
/// Default value: `@[ @0, @0, @0, @0, @0, @0 ]`
@property (readwrite, nonatomic, copy) NSArray<NSNumber *> * _Nonnull paddingValues;
-/// The padding style for the operation. Default value: `MPSGraphPaddingStyleExplicit`.
+/// The padding style for the operation.
+///
+/// Default value: `MPSGraphPaddingStyleExplicit`.
@property (readwrite, nonatomic) MPSGraphPaddingStyle paddingStyle;
/// The axis that contains the channels in the input and the weights, within
-/// the 4d tile of the last dimensions.
+/// the 4D tile of the last dimensions.
///
/// For example the value of `-1` corresponds to `NDHWC`, `NHWC` layouts. This allows the placement
/// of the channel index anywhere within the last 4 dimensions of the tensor. In case your
@@ -149,7 +169,7 @@
/// Default value: `-4`, corresponds to `NCDHW` and `CDHW` layouts.
@property (readwrite, nonatomic) NSInteger channelDimensionIndex;
-/// Creates a 3d depthwise convolution descriptor with given values.
+/// Creates a 3D depthwise convolution descriptor with given values.
///
/// - Parameters:
/// - strides: See `strides` property.
@@ -162,7 +182,7 @@
paddingValues:(NSArray<NSNumber *> * _Nonnull) paddingValues
paddingStyle:(MPSGraphPaddingStyle) paddingStyle;
-/// Creates a 3d depthwise convolution descriptor with default values.
+/// Creates a 3D depthwise convolution descriptor with default values.
///
/// - Parameters:
/// - paddingStyle: See `paddingStyle` property.
@@ -174,10 +194,10 @@
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(MPSGraphDepthwiseConvolutionOps)
-/// Creates a 2d depthwise convolution operation and returns the result tensor.
+/// Creates a 2D-depthwise convolution operation and returns the result tensor.
///
/// - Parameters:
-/// - source: A 2d Image source as tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
+/// - source: A 2D Image source as tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
/// - weights: The weights tensor, must be rank=4. The layout is defined by `descriptor.weightsLayout`.
/// - descriptor: The descriptor object that specifies strides, dilation rates, paddings and layouts.
/// - name: The name for the operation.
@@ -188,10 +208,10 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( depthwiseConvolution2D(_:weights:descriptor:name:) );
-/// Creates a 2d depthwise convolution gradient for data operation and returns the result tensor.
+/// Creates a 2D-depthwise convolution gradient for data operation and returns the result tensor.
///
/// - Parameters:
-/// - incomingGradient: A 2d input gradient tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
+/// - incomingGradient: A 2D input gradient tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
/// - weights: The weights tensor, must be rank=4. The layout is defined by `descriptor.weightsLayout`.
/// - outputShape: The shape of the οutput tensor (and therefore input tensor of forward pass).
/// - descriptor: The descriptor object that specifies strides, dilation rates, paddings and layouts.
@@ -204,11 +224,11 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( depthwiseConvolution2DDataGradient(_:weights:outputShape:descriptor:name:) );
-/// Creates a 2d depthwise convolution gradient for weights operation and returns the result tensor.
+/// Creates a 2D-depthwise convolution gradient for weights operation and returns the result tensor.
///
/// - Parameters:
-/// - incomingGradient: A 2d input gradient tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
-/// - source: A 2d Image source as tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
+/// - incomingGradient: A 2D input gradient tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
+/// - source: A 2D Image source as tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
/// - outputShape: The shape of the οutput tensor (and therefore weight tensor of forward pass).
/// - descriptor: The descriptor object that specifies strides, dilation rates, paddings and layouts.
/// - name: The name for the operation.
@@ -222,14 +242,14 @@
#pragma mark - 3D Depthwise convolution
-/// Creates a 3d depthwise convolution operation and returns the result tensor.
+/// Creates a 3D depthwise convolution operation and returns the result tensor.
///
-/// Works exactly like depthwise convolution2d, but in three dimensions. Supports different layouts with
+/// Works exactly like depthwise convolution2D, but in three dimensions. Supports different layouts with
/// the ``MPSGraphDepthwiseConvolution3DOpDescriptor/channelDimensionIndex`` property.
/// If your weights need a different layout add a permute operation on them before this operation.
///
/// - Parameters:
-/// - source: A 3d Image source as tensor - must be at least rank=4 (CDHW when channelDimensionIndex = -4).
+/// - source: A 3D Image source as tensor - must be at least rank=4 (CDHW when channelDimensionIndex = -4).
/// - weights: The weights tensor, must be rank=4 - axes are interpreted as CDHW when channelDimensionIndex = -4 .
/// - descriptor: The descriptor object that specifies strides, dilation rates and paddings.
/// - name: The name for the operation.
@@ -241,10 +261,10 @@
MPS_SWIFT_NAME( depthwiseConvolution3D(_:weights:descriptor:name:))
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
-/// Creates a 3d depthwise convolution gradient for data operation and returns the result tensor.
+/// Creates a 3D depthwise convolution gradient for data operation and returns the result tensor.
///
/// - Parameters:
-/// - incomingGradient: A 3d input gradient tensor - must be at least rank=4 (CDHW).
+/// - incomingGradient: A 3D input gradient tensor - must be at least rank=4 (CDHW).
/// - weights: The weights tensor, must be rank=4 - axes are interpreted as CDHW.
/// - outputShape: The shape of the οutput tensor (and therefore input tensor of forward pass).
/// - descriptor: The descriptor object that specifies strides, dilation rates and paddings.
@@ -258,11 +278,11 @@
MPS_SWIFT_NAME( depthwiseConvolution3DDataGradient(_:weights:outputShape:descriptor:name:))
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
-/// Creates a 3d depthwise convolution gradient for weights operation and returns the result tensor.
+/// Creates a 3D depthwise convolution gradient for weights operation and returns the result tensor.
///
/// - Parameters:
-/// - incomingGradient: A 3d input gradient tensor - must be at least rank=4 (NCDHW).
-/// - source: The forward pass 3d Image source as tensor - must be at least rank=4 (NCDHW).
+/// - incomingGradient: A 3D input gradient tensor - must be at least rank=4 (NCDHW).
+/// - source: The forward pass 3D Image source as tensor - must be at least rank=4 (NCDHW).
/// - outputShape: The shape of the οutput tensor (and therefore weight tensor of forward pass).
/// - descriptor: The descriptor object that specifies strides, dilation rates and paddings.
/// - name: The name for the operation.
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphDevice.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphDevice.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphDevice.h 2024-04-13 16:03:05
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphDevice.h 2024-05-30 11:26:36
@@ -13,29 +13,34 @@
NS_ASSUME_NONNULL_BEGIN
-/// Device type
+/// The device type.
typedef NS_ENUM(uint32_t, MPSGraphDeviceType)
{
/// Device of type Metal
MPSGraphDeviceTypeMetal MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) MPS_SWIFT_NAME(metal) = 0L,
};
+/// A class that describes the compute device.
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraphDevice : MPSGraphObject
/// Device of the MPSGraphDevice.
@property (readonly, nonatomic) MPSGraphDeviceType type;
+#if !MPSGRAPH_TOOLCHAIN_BUILD
+
/// If device type is Metal then returns the corresponding MTLDevice else nil.
@property (readonly, nonatomic, nullable) id<MTLDevice> metalDevice;
-/// Creates a device from given metal device.
+/// Creates a device from a given Metal device.
///
/// - Parameters:
/// - metalDevice: `MTLDevice` to create an MPSGraphDevice from.
/// - Returns: A valid device.
///
+(instancetype) deviceWithMTLDevice:(id<MTLDevice>) metalDevice;
+
+#endif
@end
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphExecutable.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphExecutable.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphExecutable.h 2024-04-13 16:01:44
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphExecutable.h 2024-05-30 05:56:17
@@ -13,16 +13,16 @@
NS_ASSUME_NONNULL_BEGIN
-/// A notification when graph executable execution has finished.
+/// A notification when graph executable execution finishes.
///
/// - Parameters:
-/// - results: If no error, the results produced by the graph operation. If Graph has not yet allocated the results this will be NSNull
+/// - results: If no error, the results produced by the graph operation. If Graph hasn't yet allocated the results, this will be `NSNull`.
/// - error: If an error occurs, more information might be found here.
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
typedef void (^MPSGraphExecutableCompletionHandler)(NSArray<MPSGraphTensorData *> * results,
NSError * _Nullable error);
-/// A notification when graph executable execution has been scheduled.
+/// A notification when graph executable execution schedules.
///
/// - Parameters:
/// - results: If no error, the results produced by the graph operation.
@@ -31,20 +31,29 @@
typedef void (^MPSGraphExecutableScheduledHandler)(NSArray<MPSGraphTensorData *> * results,
NSError * _Nullable error);
+/// A class that consists of all the levers to synchronize and schedule executable execution.
MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
@interface MPSGraphExecutableExecutionDescriptor : MPSGraphObject<NSCopying>
-/// ScheduledHandler for the graph executable, default value is nil.
+/// A notification that appears when graph-executable execution is scheduled.
+///
+/// Default value is nil.
@property (readwrite, atomic) MPSGraphExecutableScheduledHandler scheduledHandler;
-/// CompletionHandler for the graph executable, default value is nil.
+/// A notification that appears when graph-executable execution is finished.
+///
+/// Default value is nil.
@property (readwrite, atomic) MPSGraphExecutableCompletionHandler completionHandler;
-/// Flag for the graph executable to wait till the execution has completed, default value is false.
+/// Flag for the graph executable to wait till the execution has completed.
+///
+/// Default value is false.
@property (readwrite, atomic) BOOL waitUntilCompleted;
-/// Executable waits on these shared events before scheduling execution on the HW, this does not include encoding which can still continue.
+/// Waits on these shared events before scheduling execution on the HW.
///
+/// This does not include encoding which can still continue.
+///
/// - Parameters:
/// - event: Shared event to wait on.
/// - value: Value for shared event to wait on.
@@ -52,7 +61,7 @@
value:(uint64_t) value
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Executable signals these shared events at execution stage and immediately proceeds.
+/// Signals these shared events at execution stage and immediately proceeds.
///
/// - Parameters:
/// - event: Shared event to signal.
@@ -78,7 +87,7 @@
MPSGraphDeploymentPlatformVisionOS MPS_ENUM_AVAILABLE_STARTING( macos(14.4), ios(17.4), macCatalyst(17.4), tvos(17.4), xros(1.1)) MPS_SWIFT_NAME(visionOS) = 3L,
};
-
+/// A class that consists of all the levers to serialize an executable.
MPS_CLASS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0))
@interface MPSGraphExecutableSerializationDescriptor : MPSGraphObject
@@ -87,21 +96,21 @@
/// If false, the exisiting .mpsgraphpackage will be overwritten.
@property (readwrite, atomic) BOOL append;
-/// The deployment platform used to serialize the MPSGraphExecutable.
+/// The deployment platform used to serialize the executable.
///
/// Defaults to the current platform.
@property (readwrite, atomic) MPSGraphDeploymentPlatform deploymentPlatform;
-/// The minimum deployment target to serialize the MPSGraphExecutable.
+/// The minimum deployment target to serialize the executable.
///
/// Defaults to the current sdk.
@property (readwrite, atomic) NSString* minimumDeploymentTarget;
@end
-/// Compiled representation of a compute graph executable.
+/// The compiled representation of a compute graph executable.
///
-/// An MPSGraphExecutable is a compiled graph for specific feeds for specific targetTensors and target operations.
+/// An `MPSGraphExecutable` is a compiled graph for specific feeds for specific target tensors and target operations.
MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
@interface MPSGraphExecutable : MPSGraphObject
@@ -110,34 +119,39 @@
/// Default value is `MPSGraphOptionsDefault`.
@property (readwrite, atomic) MPSGraphOptions options;
-/// Feed tensors for the graph, can be used to order the inputs when executable was created with an MPSGraph
+/// Tensors fed to the graph, can be used to order the inputs when executable is created with a graph.
@property (readonly, atomic, nullable) NSArray<MPSGraphTensor *> *feedTensors;
-/// Target tensors for the graph, can be used to order the outputs when executable was created with an MPSGraph
+/// Tensors targeted by the graph, can be used to order the outputs when executable was created with a graph.
@property (readonly, atomic, nullable) NSArray<MPSGraphTensor *> *targetTensors;
-/// Specialize the MPSGraphExecutable and optimize it, use this method to choose when specialization happens, else it occurs at encode time automatically.
+/// Specialize the executable and optimize it.
///
+/// Use this method to choose when specialization happens, else it occurs at encode time automatically.
+///
/// - Parameters:
-/// - device: optional MPSGraph device to compile with
-/// - inputTypes: input types
-/// - compilationDescriptor: compilationDescriptor to be used to specialize, since the executable was created with a compilationDescriptor already this one overrides those settings to the extent it can.
+/// - device:Ooptional MPSGraph device to compile with.
+/// - inputTypes: Input types expected to be passed to the executable.
+/// - compilationDescriptor: Compilation descriptor to be used to specialize, since the executable was created with a compilationDescriptor already this one overrides those settings to the extent it can.
-(void) specializeWithDevice:(MPSGraphDevice * _Nullable) device
inputTypes:(NSArray<MPSGraphType *> *) inputTypes
compilationDescriptor:(MPSGraphCompilationDescriptor * _Nullable) compilationDescriptor;
-/// Get output shapes for a specialized MPSGraphExecutable - in case specialization has not been done yet then calling this function will specialize for the given input shapes.
+/// Get output shapes for a specialized executable.
///
+/// In case specialization has not been done yet then calling this function will specialize for the given input shapes.
+///
/// - Parameters:
-/// - device: optional MPSGraph device to compile with
-/// - inputTypes: input types
-/// - compilationDescriptor: compilationDescriptor to be used to specialize, since the executable was created with a compilationDescriptor already this one overrides those settings to the extent it can.
+/// - device: Optional MPSGraph device to compile with
+/// - inputTypes: Input types expected to be passed to the executable.
+/// - compilationDescriptor: CompilationDescriptor to be used to specialize, since the executable was created with a compilationDescriptor already this one overrides those settings to the extent it can.
-(NSArray<MPSGraphShapedType *> * _Nullable) getOutputTypesWithDevice:(MPSGraphDevice * _Nullable) device
inputTypes:(NSArray<MPSGraphType *> *) inputTypes
compilationDescriptor:(MPSGraphCompilationDescriptor * _Nullable) compilationDescriptor
MPS_AVAILABLE_STARTING(macos(13.2), ios(16.3), tvos(16.3));
-
-/// Runs the graph for given feeds to return targetTensor values, ensuring all target operations also executed.
+#if !MPSGRAPH_TOOLCHAIN_BUILD
+/// Runs the graph for the given feeds and returns the target tensor values, ensuring all target operations also executed.
+///
/// This call is synchronous and will return on completion of execution.
///
/// - Parameters:
@@ -151,7 +165,7 @@
executionDescriptor:(MPSGraphExecutableExecutionDescriptor * _Nullable) executionDescriptor
MPS_SWIFT_NAME( run(with:inputs:results:executionDescriptor:) );
-/// Runs the graph for given feeds to return targetTensor values, ensuring all target operations also executed.
+/// Runs the graph for the given feeds and returns the target tensor values, ensuring all target operations also executed.
/// This call is asynchronous and will return immediately.
///
/// - Parameters:
@@ -166,7 +180,7 @@
executionDescriptor:(MPSGraphExecutableExecutionDescriptor * _Nullable) executionDescriptor
MPS_SWIFT_NAME( runAsync(with:inputs:results:executionDescriptor:) );
-/// Runs the graph for given feeds to return targetTensor values, ensuring all target operations also executed.
+/// Runs the graph for the given feeds and returns the target tensor values, ensuring all target operations also executed.
/// This call is asynchronous and will return immediately after finishing encoding.
///
/// - Parameters:
@@ -180,6 +194,7 @@
resultsArray:(NSArray<MPSGraphTensorData *> * _Nullable) resultsArray
executionDescriptor:(MPSGraphExecutableExecutionDescriptor * _Nullable) executionDescriptor
MPS_SWIFT_NAME( encode(to:inputs:results:executionDescriptor:) );
+#endif // !MPSGRAPH_TOOLCHAIN_BUILD
/// Serialize the MPSGraph executable at the provided url.
///
@@ -191,7 +206,7 @@
MPS_SWIFT_NAME( serialize(package:descriptor:) )
MPS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0));
-/// Initialize the MPSGraph executable with the package at the provided url.
+/// Initialize the executable with the Metal Performance Shaders Graph package at the provided URL.
///
/// - Parameters:
/// - mpsgraphPackageURL: The URL where to read the serialized MPSGraphExecutable.
@@ -200,6 +215,16 @@
compilationDescriptor:(MPSGraphCompilationDescriptor * _Nullable) compilationDescriptor
MPS_SWIFT_NAME( init(package:descriptor:) )
MPS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0));
+
+/// Initialize the executable with the Core ML model package at the provided URL.
+///
+/// - Parameters:
+/// - coreMLPackageURL: The URL where to read the Core ML model package.
+/// - compilationDescriptor: Compilation descriptor to be used to specialize, since the executable was created with a compilationDescriptor already this one overrides those settings to the extent it can.
+-(instancetype) initWithCoreMLPackageAtURL:(NSURL *)coreMLPackageURL
+ compilationDescriptor:(MPSGraphCompilationDescriptor * _Nullable) compilationDescriptor
+MPS_SWIFT_NAME( init(package:descriptor:) )
+MPS_AVAILABLE_STARTING(macos(15.0), ios(18.0), tvos(18.0));
@end
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphFourierTransformOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphFourierTransformOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphFourierTransformOps.h 2024-03-22 20:57:13
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphFourierTransformOps.h 2024-05-30 05:56:17
@@ -24,27 +24,27 @@
MPSGraphFFTScalingModeUnitary MPS_ENUM_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0))
};
-/// This class defines parameters for a fast Fourier transform (FFT) operation.
+/// The class that defines the parameters for a fast Fourier transform (FFT) operation.
///
/// Use this descriptor with ``MPSGraph/fastFourierTransformWithTensor:axes:descriptor:name:``,
-/// ``MPSGraph/realToHermiteanFFTWithTensor:axesTensor:descriptor:name:`` and
+/// ``MPSGraph/realToHermiteanFFTWithTensor:axesTensor:descriptor:name:``, and
/// ``MPSGraph/HermiteanToRealFFTWithTensor:axesTensor:descriptor:name:`` methods.
MPS_CLASS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0))
@interface MPSGraphFFTDescriptor : MPSGraphObject<NSCopying>
-/// A boolean-valued parameter that defines the phase factor sign for Fourier transforms.
+/// A Boolean-valued parameter that defines the phase factor sign for Fourier transforms.
///
-/// When set to `YES` MPSGraph uses the positive phase factor: `exp(+i 2Pi mu nu / n)`, when computing the (inverse) Fourier transform.
+/// When set to `YES` graph uses the positive phase factor: `exp(+i 2Pi mu nu / n)`, when computing the (inverse) Fourier transform.
/// Otherwise MPSGraph uses the negative phase factor: `exp(-i 2Pi mu nu / n)`, when computing the Fourier transform.
/// Default value: `NO`.
@property (readwrite, nonatomic) BOOL inverse;
-/// The scaling mode of the FFT operation.
+/// The scaling mode of the fast fourier transform (FFT) operation.
///
/// Note that the scaling mode is independent from the phase factor. Default value: `MPSGraphFFTScalingModeNone`.
@property (readwrite, nonatomic) MPSGraphFFTScalingMode scalingMode;
-/// A parameter which controls how MPSGraph rounds the output tensor size for a Hermitean-to-real Fourier transform.
+/// A parameter which controls how graph rounds the output tensor size for a Hermitean-to-real Fourier transform.
///
/// If set to `YES` then MPSGraph rounds the last output dimension of the result tensor in
/// ``MPSGraph/HermiteanToRealFFTWithTensor:axesTensor:descriptor:name:`` to an odd value.
@@ -84,7 +84,7 @@
/// - Parameters:
/// - tensor: A complex or real-valued input tensor.
/// - axes: An array of numbers that specifies over which axes MPSGraph performs the Fourier transform - all axes must be contained within last four dimensions of the input tensor.
-/// - descriptor: A descriptor that defines parameters of the Fourier transform operation - see ``MPSGraphFFTDescriptor``.
+/// - descriptor: A descriptor that defines the parameters of the Fourier transform operation - see ``MPSGraphFFTDescriptor``.
/// - name: The name for the operation.
/// - Returns: A valid complex-valued MPSGraphTensor of the same shape as `tensor`.
-(MPSGraphTensor *) fastFourierTransformWithTensor:(MPSGraphTensor *) tensor
@@ -117,7 +117,7 @@
/// - Parameters:
/// - tensor: A complex or real-valued input tensor.
/// - axesTensor: A tensor of rank one containing the axes over which MPSGraph performs the transformation. See ``MPSGraph/fastFourierTransformWithTensor:axes:descriptor:name:``.
-/// - descriptor: A descriptor that defines parameters of the Fourier transform operation - see ``MPSGraphFFTDescriptor``.
+/// - descriptor: A descriptor that defines the parameters of the Fourier transform operation - see ``MPSGraphFFTDescriptor``.
/// - name: The name for the operation.
/// - Returns: A valid complex-valued MPSGraphTensor of the same shape as `tensor`.
-(MPSGraphTensor *) fastFourierTransformWithTensor:(MPSGraphTensor *) tensor
@@ -151,7 +151,7 @@
/// - Parameters:
/// - tensor: A Real-valued input tensor. Must have datatype `MPSDataTypeFloat32` or `MPSDatatypeFloat16`.
/// - axes: An array of numbers that specifies over which axes MPSGraph performs the Fourier transform - all axes must be contained within last four dimensions of the input tensor.
-/// - descriptor: A descriptor that defines parameters of the Fourier transform operation - see ``MPSGraphFFTDescriptor``.
+/// - descriptor: A descriptor that defines the parameters of the Fourier transform operation - see ``MPSGraphFFTDescriptor``.
/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor of type `MPSDataTypeComplexFloat32` or `MPSDataTypeComplexFloat16` with reduced size (see Discussion).
-(MPSGraphTensor *) realToHermiteanFFTWithTensor:(MPSGraphTensor *) tensor
@@ -186,7 +186,7 @@
/// - Parameters:
/// - tensor: A real-valued input tensor. Must have datatype `MPSDataTypeFloat32` or `MPSDatatypeFloat16`.
/// - axesTensor: A tensor of rank one containing the axes over which MPSGraph performs the transformation. See ``MPSGraph/fastFourierTransformWithTensor:axes:descriptor:name:``.
-/// - descriptor: A descriptor that defines parameters of the Fourier transform operation - see ``MPSGraphFFTDescriptor``.
+/// - descriptor: A descriptor that defines the parameters of the Fourier transform operation - see ``MPSGraphFFTDescriptor``.
/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor of type `MPSDataTypeComplexFloat32` or `MPSDataTypeComplexFloat16` with reduced size (see Discussion).
-(MPSGraphTensor *) realToHermiteanFFTWithTensor:(MPSGraphTensor *) tensor
@@ -196,7 +196,7 @@
MPS_SWIFT_NAME(realToHermiteanFFT(_:axesTensor:descriptor:name:))
MPS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0));
-/// Creates a Hermitean-to-Real fast Fourier transform operation and returns the result tensor.
+/// Creates a Hermitean-to-real fast Fourier transform operation and returns the result tensor.
///
/// This operation computes the fast Fourier transform of a complex-valued input tensor according to the following formulae.
/// ```md
@@ -223,7 +223,7 @@
/// - Parameters:
/// - tensor: A complex-valued input tensor with reduced size (see Discussion). Must have datatype `MPSDataTypeComplexFloat32` or `MPSDataTypeComplexFloat16`.
/// - axes: An array of numbers that specifies over which axes MPSGraph performs the Fourier transform - all axes must be contained within last four dimensions of the input tensor.
-/// - descriptor: A descriptor that defines parameters of the Fourier transform operation - see ``MPSGraphFFTDescriptor``.
+/// - descriptor: A descriptor that defines the parameters of the Fourier transform operation - see ``MPSGraphFFTDescriptor``.
/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor of type `MPSDataTypeFloat32` or `MPSDataTypeFloat16` (full size).
-(MPSGraphTensor *) HermiteanToRealFFTWithTensor:(MPSGraphTensor *) tensor
@@ -234,7 +234,7 @@
MPS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0));
-/// Creates a Hermitean-to-Real fast Fourier transform operation and returns the result tensor.
+/// Creates a Hermitean-to-real fast Fourier transform operation and returns the result tensor.
///
/// This operation computes the fast Fourier transform of a complex-valued input tensor according to the following formulae.
/// ```md
@@ -261,7 +261,7 @@
/// - Parameters:
/// - tensor: A complex-valued input tensor with reduced size (see Discussion). Must have datatype `MPSDataTypeComplexFloat32` or `MPSDataTypeComplexFloat16`.
/// - axesTensor: A tensor of rank one containing the axes over which MPSGraph performs the transformation. See ``MPSGraph/fastFourierTransformWithTensor:axes:descriptor:name:``.
-/// - descriptor: A descriptor that defines parameters of the Fourier transform operation - see ``MPSGraphFFTDescriptor``.
+/// - descriptor: A descriptor that defines the parameters of the Fourier transform operation - see ``MPSGraphFFTDescriptor``.
/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor of type `MPSDataTypeFloat32` or `MPSDataTypeFloat16` (full size).
-(MPSGraphTensor *) HermiteanToRealFFTWithTensor:(MPSGraphTensor *) tensor
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphGatherOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphGatherOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphGatherOps.h 2024-04-13 15:01:01
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphGatherOps.h 2024-05-30 05:56:18
@@ -13,7 +13,7 @@
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(GatherNDOps)
-/// Create GatherND op and return the result tensor
+/// Creates a GatherND operation and returns the result tensor.
///
/// Gathers the slices in updatesTensor to the result tensor along the indices in indicesTensor.
/// The gather is defined as
@@ -36,10 +36,10 @@
/// ```
///
/// - Parameters:
-/// - updatesTensor: Tensor containing slices to be inserted into the result tensor
+/// - updatesTensor: Tensor containing slices to be inserted into the result tensor.
/// - indicesTensor: Tensor containg the updates indices to read slices from
/// - batchDimensions: The number of batch dimensions
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
///
- (MPSGraphTensor *) gatherNDWithUpdatesTensor:(MPSGraphTensor *) updatesTensor
@@ -52,7 +52,7 @@
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(GatherOps)
-/// Create Gather op and return the result tensor
+/// Creates a Gather operation and returns the result tensor.
///
/// Gathers the values in updatesTensor to the result tensor along the indices in indicesTensor.
/// The gather is defined as
@@ -74,11 +74,11 @@
/// ```
///
/// - Parameters:
-/// - updatesTensor: Tensor containing slices to be inserted into the result tensor
+/// - updatesTensor: Tensor containing slices to be inserted into the result tensor.
/// - indicesTensor: Tensor containg the updates indices to read slices from
/// - axis: The dimension on which to perform the gather
/// - batchDimensions: The number of batch dimensions
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
///
- (MPSGraphTensor *) gatherWithUpdatesTensor:(MPSGraphTensor *) updatesTensor
@@ -91,7 +91,7 @@
@interface MPSGraph(MPSGraphGatherAlongAxisOps)
-/// Create GatherAlongAxis op and return the result tensor
+/// Creates a GatherAlongAxis operation and returns the result tensor.
///
/// Gather values from `updatesTensor` along the specified `axis` at indices in `indicesTensor`.
/// The shape of `updatesTensor` and `indicesTensor` must match except at `axis`.
@@ -102,7 +102,7 @@
/// - axis: The axis to gather from. Negative values wrap around
/// - updatesTensor: The input tensor to gather values from
/// - indicesTensor: Int32 or Int64 tensor used to index `updatesTensor`
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
///
@@ -113,7 +113,7 @@
MPS_SWIFT_NAME( gatherAlongAxis(_:updates:indices:name:) )
MPS_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4));
-/// Create GatherAlongAxis op and return the result tensor
+/// Creates a GatherAlongAxis operation and returns the result tensor.
///
/// Gather values from `updatesTensor` along the specified `axis` at indices in `indicesTensor`.
/// The shape of `updatesTensor` and `indicesTensor` must match except at `axis`.
@@ -124,7 +124,7 @@
/// - axisTensor: Scalar Int32 tensor. The axis to gather from. Negative values wrap around
/// - updatesTensor: The input tensor to gather values from
/// - indicesTensor: Int32 or Int64 tensor used to index `updatesTensor`
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
///
- (MPSGraphTensor *) gatherAlongAxisTensor:(MPSGraphTensor *) axisTensor
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphImToColOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphImToColOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphImToColOps.h 2024-03-22 20:57:13
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphImToColOps.h 2024-05-30 04:58:35
@@ -13,38 +13,39 @@
NS_ASSUME_NONNULL_BEGIN
-/// This class defines parameters for an imToCol or colToIm operation.
+/// The class that defines the parameters for an image to column or column to image operation.
+///
/// Use this descriptor with the following ``MPSGraph`` methods:
-/// - ``MPSGraph/imToColWithSourceTensor:descriptor:name:``.
-/// - ``MPSGraph/colToImWithSourceTensor:outputShape:descriptor:name:``.
+/// - ``MPSGraph/imToColWithSourceTensor:descriptor:name:``
+/// - ``MPSGraph/colToImWithSourceTensor:outputShape:descriptor:name:``
MPS_CLASS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0))
@interface MPSGraphImToColOpDescriptor : MPSGraphObject<NSCopying>
-/// The property defines the kernel size in `x` or width dimension.
+/// The property that defines the kernel size in width dimension.
@property (readwrite, nonatomic) NSUInteger kernelWidth;
-/// The property defines the kernel size in `y` or height dimension.
+/// The property that defines the kernel size in height dimension.
@property (readwrite, nonatomic) NSUInteger kernelHeight;
-/// The property defines the stride in `x` or width dimension.
+/// The property that defines the stride in width dimension.
@property (readwrite, nonatomic) NSUInteger strideInX;
-/// The property defines the stride in `y` or height dimension.
+/// The property that defines the stride in height dimension.
@property (readwrite, nonatomic) NSUInteger strideInY;
-/// The property defines the dilation in `x` or width dimension.
+/// The property that defines the dilation in width dimension.
@property (readwrite, nonatomic) NSUInteger dilationRateInX;
-/// The property defines the dilation in `y` or height dimension.
+/// The property that defines the dilation in height dimension.
@property (readwrite, nonatomic) NSUInteger dilationRateInY;
-/// The property defines the padding in `x` or width dimension on left side.
+/// The property that defines the padding in width dimension on the left side.
@property (readwrite, nonatomic) NSUInteger paddingLeft;
-/// The property defines the padding in `x` or width dimension on right side.
+/// The property that defines the padding in width dimension on the right side.
@property (readwrite, nonatomic) NSUInteger paddingRight;
-/// The property defines the padding in `y` or height dimension at top.
+/// The property that defines the padding in height dimension at the top.
@property (readwrite, nonatomic) NSUInteger paddingTop;
-/// The property defines the padding in `y` or height dimension at bottom.
+/// The property that defines the padding in height dimension at the bottom.
@property (readwrite, nonatomic) NSUInteger paddingBottom;
-/// The property defines the layout of source or output tensor.
+/// The property that defines the layout of source or output tensor.
/// e.g. `batch x channels x width x height` for `NCHW` layout
@property (readwrite, nonatomic) MPSGraphTensorNamedDataLayout dataLayout;
-/// Creates an imToCol descriptor with given values for parameters.
+/// Creates an image to column descriptor with given values for parameters.
/// - Parameters:
/// - kernelWidth: See `kernelWidth` property.
/// - kernelHeight: See `kernelHeight` property.
@@ -70,7 +71,7 @@
paddingBottom:(NSUInteger) paddingBottom
dataLayout:(MPSGraphTensorNamedDataLayout) dataLayout;
-/// Creates imToCol descriptor with given values for parameters.
+/// Creates column to image descriptor with given values for parameters.
/// - Parameters:
/// - kernelWidth: See `kernelWidth` property.
/// - kernelHeight: See `kernelHeight` property.
@@ -118,7 +119,7 @@
MPS_SWIFT_NAME( imToCol(_:descriptor:name:) );
MPS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0));
-/// Creates an colToIm operation and returns the result tensor.
+/// Creates a column to image operation and returns the result tensor.
///
/// - Parameters:
/// - source: The tensor containing the source data. Must be of rank 4. The layout is defined by `descriptor.dataLayout`.
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphLinearAlgebraOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphLinearAlgebraOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphLinearAlgebraOps.h 2024-04-13 16:03:05
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphLinearAlgebraOps.h 2024-05-30 11:26:36
@@ -38,7 +38,7 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( bandPart(_:numLower:numUpper:name:) );
-/// Creates band part op and return the result.
+/// Creates the band part operation and returns the result.
///
/// See above discussion of bandPartWithTensor: numLower: numUpper: name:
///
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphLossOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphLossOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphLossOps.h 2024-04-13 15:01:02
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphLossOps.h 2024-05-30 04:43:28
@@ -13,7 +13,7 @@
NS_ASSUME_NONNULL_BEGIN
-/// The type of the reduction MPSGraph applies in the loss operations.
+/// The type of the reduction the graph applies in the loss operations.
typedef NS_ENUM(uint64_t, MPSGraphLossReductionType)
{
/// Computes the loss without reduction.
@@ -29,9 +29,9 @@
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(MPSGraphLossOps)
-/// Creates a softmax cross entropy loss operation and returns the result tensor.
+/// Creates a softmax cross-entropy loss operation and returns the result tensor.
///
-/// The softmax cross entropy operation computes:
+/// The softmax cross-entropy operation computes:
/// ```md
/// loss = reduction( - labels*ln( softmax(source) )), where
/// sotfmax(source) = exp(source) / sum( exp(source) ), and
@@ -43,7 +43,7 @@
/// - labelsTensor: The labels tensor.
/// - axis: The axis over which the operation computes the softmax reduction.
/// - reductionType: The type of reduction MPSGraph uses to reduce across all other axes than `axis`. See: ``MPSGraphLossReductionType``.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object.
-(MPSGraphTensor *) softMaxCrossEntropyWithSourceTensor:(MPSGraphTensor *) sourceTensor
labelsTensor:(MPSGraphTensor *) labelsTensor
@@ -52,7 +52,7 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( softMaxCrossEntropy(_:labels:axis:reuctionType:name:) );
-/// Creates the gradient of a softmax cross entropy loss operation and returns the result tensor.
+/// Creates the gradient of a softmax cross-entropy loss operation and returns the result tensor.
///
/// - Parameters:
/// - gradientTensor: The input gradientTensor. Note: in most cases this is the initial gradient tensor, which is a constant tensor with value one.
@@ -60,7 +60,7 @@
/// - labelsTensor: The labels tensor.
/// - axis: The axis over which the operation computes the softmax reduction.
/// - reductionType: The type of reduction MPSGraph uses to reduce across all other axes than `axis`. See: ``MPSGraphLossReductionType``.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object.
-(MPSGraphTensor *) softMaxCrossEntropyGradientWithIncomingGradientTensor:(MPSGraphTensor *) gradientTensor
sourceTensor:(MPSGraphTensor *) sourceTensor
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphMatrixMultiplicationOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphMatrixMultiplicationOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphMatrixMultiplicationOps.h 2024-04-13 16:03:06
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphMatrixMultiplicationOps.h 2024-05-30 04:58:36
@@ -28,7 +28,7 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( matrixMultiplication(primary:secondary:name:) );
-/// Computes the hamming distance of 2 input tensors with support for broadcasting.
+/// Computes the hamming distance of two input tensors with support for broadcasting.
///
/// The hamming distance is computed between 2 sets of vectors and the last dimension(s) of each
/// input tensor is considered a vector.
@@ -37,7 +37,7 @@
/// - primaryTensor: The first input tensor.
/// - secondaryTensor: The second input tensor.
/// - resultDataType: The datatype of the return MPSGraphTensor. Must be either ``MPSDataTypeUInt32`` or ``MPSDataTypeUInt16``.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid tensor containing the hamming distance between the input tensors.
-(MPSGraphTensor *) HammingDistanceWithPrimaryTensor:(MPSGraphTensor *) primaryTensor
secondaryTensor:(MPSGraphTensor *) secondaryTensor
@@ -46,6 +46,48 @@
MPS_SWIFT_NAME( HammingDistance(primary:secondary:resultDataType:name:) )
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
+/// Creates a scaled dot product attention (SDPA) operation and returns the result tensor.
+///
+/// SDPA Op computes attention by computing softmax(scale * QK^T + M)V.
+/// queryTensor Q with shape [B, Hq, Nq, F] and keyTensor K with shape [B, Hq, Nkv, F],
+/// with Q's H dimension expandable to satisfy matmul QK^T. maskTensor M's shape
+/// should be broadcast compatible to satisfy (QK^T + M). valueTensor V with shape
+/// [B, Hv, Nkv, F] should satisfy the matmul (QK^T + M)V.
+///
+/// - Parameters:
+/// - queryTensor: A tensor that represents the query projection.
+/// - keyTensor: A tensor that represents the key projection.
+/// - valueTensor: A tensor that represents the value projection.
+/// - maskTensor: An optional tensor that contains a mask that is applied to the scaled, matrix
+/// multiplied query and value matrices. If mask tensor is nil, the QK^T is not element-wise masked.
+/// - scale: A scale that is applied to the result of query and value matrix multiply.
+/// - name: The name for the operation.
+/// - Returns: A valid MPSGraphTensor object.
+- (MPSGraphTensor *)scaledDotProductAttentionWithQueryTensor:(MPSGraphTensor *)queryTensor
+ keyTensor:(MPSGraphTensor *)keyTensor
+ valueTensor:(MPSGraphTensor *)valueTensor
+ maskTensor:(MPSGraphTensor *_Nullable)maskTensor
+ scale:(float)scale
+ name:(NSString *_Nullable)name
+ MPS_SWIFT_NAME(scaledDotProductAttention(query:key:value:mask:scale:name:) )
+MPS_AVAILABLE_STARTING(macos(15.0), ios(18.0), macCatalyst(18.0), tvos(18.0), xros(2.0));
+
+/// Creates a scaled dot product attention (SDPA) operation (without a mask) and returns the result tensor.
+///
+/// - Parameters:
+/// - queryTensor: A tensor that represents the query projection.
+/// - keyTensor: A tensor that represents the key projection.
+/// - valueTensor: A tensor that represents the value projection.
+/// - scale: A scale that is applied on the result of query and value matrix multiply.
+/// - name: The name for the operation.
+/// - Returns: A valid MPSGraphTensor object.
+- (MPSGraphTensor *)scaledDotProductAttentionWithQueryTensor:(MPSGraphTensor *)queryTensor
+ keyTensor:(MPSGraphTensor *)keyTensor
+ valueTensor:(MPSGraphTensor *)valueTensor
+ scale:(float)scale
+ name:(NSString *_Nullable)name
+ MPS_SWIFT_NAME(scaledDotProductAttention(query:key:value:scale:name:) )
+MPS_AVAILABLE_STARTING(macos(15.0), ios(18.0), macCatalyst(18.0), tvos(18.0), xros(2.0));
@end
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphMemoryOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphMemoryOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphMemoryOps.h 2024-04-13 16:01:45
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphMemoryOps.h 2024-05-30 03:27:11
@@ -13,14 +13,14 @@
NS_ASSUME_NONNULL_BEGIN
-/// This class defines parameters for an MPSGraphVariableOp.
+/// The class that defines the parameters for a variable.
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraphVariableOp : MPSGraphOperation
/// The shape of the variable.
@property (readonly, nonnull, nonatomic) MPSShape *shape;
-/// The dataType of the variable.
+/// The data type of the variable.
@property (readonly, nonatomic) MPSDataType dataType;
@end
@@ -28,7 +28,7 @@
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(MemoryOps)
-/// Creates a placeholder op and returns the result tensor.
+/// Creates a placeholder operation and returns the result tensor.
///
/// - Parameters:
/// - shape: The shape of the output tensor. A nil shape will result in an unranked tensor.
@@ -40,7 +40,7 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( placeholder(shape:dataType:name:) );
-/// Creates a placeholder op and returns the result tensor with the dataType of the placeholder tensor set to MPSDataTypeFloat32.
+/// Creates a placeholder operation and returns the result tensor with the dataType of the placeholder tensor set to 32 bit float.
///
/// - Parameters:
/// - shape: The shape of the output tensor. A nil shape will result in an unranked tensor.
@@ -63,7 +63,7 @@
dataType:(MPSDataType) dataType
MPS_SWIFT_NAME( constant(_:shape:dataType:) );
-/// Creates a constant op and returns the result tensor.
+/// Creates a constant operation and returns the result tensor.
///
/// - Parameters:
/// - scalar: The scalar value to fill the entire tensor values with.
@@ -97,7 +97,7 @@
MPS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0))
MPS_SWIFT_NAME( complexConstant(realPart:imaginaryPart:) );
-/// Creates a complex constant op and returns the result tensor.
+/// Creates a complex constant operation and returns the result tensor.
///
/// - Parameters:
/// - realPart: The real part of the complex scalar to fill the entire tensor values with.
@@ -125,7 +125,7 @@
MPS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0))
MPS_SWIFT_NAME( complexConstant(realPart:imaginaryPart:shape:dataType:) );
-/// Creates a variable op and returns the result tensor.
+/// Creates a variable operation and returns the result tensor.
///
/// - Parameters:
/// - data: The data for the tensor. The number of bytes should be sizeof(dataType)numberOfElements.
@@ -138,6 +138,17 @@
dataType:(MPSDataType) dataType
name:(NSString * _Nullable) name;
+/// Creates a variable from an input tensor.
+///
+/// - Parameters:
+/// - tensor: The tensor from which to form the variable.
+/// - name: The name for the operation.
+/// - Returns: A valid MPSGraphTensor object.
+ -(MPSGraphTensor *) variableFromTensorWithTensor:(MPSGraphTensor * _Nonnull) tensor
+ name:(NSString * _Nullable) name
+MPS_SWIFT_NAME( variableFromTensor(_:name:) )
+MPS_AVAILABLE_STARTING(macos(15.0), ios(18.0), macCatalyst(18.0), tvos(18.0));
+
/// Creates a read op which reads at this point of execution of the graph and returns the result tensor.
///
/// - Parameters:
@@ -148,7 +159,7 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( read(_:name:) );
-/// Creates an assign op which writes at this point of execution of the graph.
+/// Creates an assign operation which writes at this point of execution of the graph.
///
/// - Parameters:
/// - variable: The variable resource tensor to assign to.
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphNonMaximumSuppressionOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphNonMaximumSuppressionOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphNonMaximumSuppressionOps.h 2024-03-22 20:57:13
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphNonMaximumSuppressionOps.h 2024-05-30 11:26:36
@@ -13,23 +13,21 @@
NS_ASSUME_NONNULL_BEGIN
-/*!
- * @typedef MPSGraphNonMaximumSuppressionCoordinateMode
- * @discussion The coordinate mode to use. At initialization defaults to MPSGraphNonMaximumSuppressionCoordinateModeCornersHeightFirst.
- * This mode specifies the representation used for the 4 box coordinate values.
- *
- * Center coordinate modes define a centered box and the box dimensions
- * @code
- * CornersHeightFirst:
- * [h_start, w_start, h_end, w_end]
- * CornersWidthFirst:
- * [w_start, h_start, w_end, h_end]
- * CentersHeightFirst:
- * [h_center, w_center, box_height, box_width]
- * CentersWidthFirst:
- * [w_center, w_center, box_height, box_width]
- * @endcode
- */
+/// The non-maximum suppression coordinate mode.
+///
+/// The coordinate mode to use. At initialization defaults to MPSGraphNonMaximumSuppressionCoordinateModeCornersHeightFirst.
+/// This mode specifies the representation used for the 4 box coordinate values.
+/// Center coordinate modes define a centered box and the box dimensions.
+/// ```md
+/// CornersHeightFirst:
+/// [h_start, w_start, h_end, w_end]
+/// CornersWidthFirst:
+/// [w_start, h_start, w_end, h_end]
+/// CentersHeightFirst:
+/// [h_center, w_center, box_height, box_width]
+/// CentersWidthFirst:
+/// [w_center, w_center, box_height, box_width]
+/// ```
typedef NS_ENUM(NSUInteger, MPSGraphNonMaximumSuppressionCoordinateMode)
{
MPSGraphNonMaximumSuppressionCoordinateModeCornersHeightFirst MPS_ENUM_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0)) MPS_SWIFT_NAME(explicit) = 0L,
@@ -41,7 +39,7 @@
MPS_CLASS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0))
@interface MPSGraph(MPSGraphNonMaximumSuppressionOps)
-/// Create a nonMaximumumSuppression op and return the result tensor
+/// Creates a nonMaximumumSuppression operation and returns the result tensor.
/// - Parameters:
/// - boxesTensor: A tensor containing the coordinates of the input boxes. Must be a rank 3 tensor of shape [N,B,4] of type ``MPSDataTypeFloat32``
/// - scoresTensor: A tensor containing the scores of the input boxes. Must be a rank 3 tensor of shape [N,B,K] of type ``MPSDataTypeFloat32``
@@ -58,7 +56,7 @@
coordinateMode:(MPSGraphNonMaximumSuppressionCoordinateMode) coordinateMode
name:(NSString * _Nullable) name;
-/// Create a nonMaximumumSuppression op and return the result tensor
+/// Creates a nonMaximumumSuppression operation and returns the result tensor.
/// - Parameters:
/// - boxesTensor: A tensor containing the coordinates of the input boxes. Must be a rank 3 tensor of shape [N,B,4] of type ``MPSDataTypeFloat32``
/// - scoresTensor: A tensor containing the scores of the input boxes. Must be a rank 3 tensor of shape [N,B,1] of type ``MPSDataTypeFloat32``
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphNonZeroOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphNonZeroOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphNonZeroOps.h 2024-04-13 16:03:05
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphNonZeroOps.h 2024-05-30 11:26:36
@@ -16,10 +16,10 @@
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(NonZeroOps)
-/// Compute the indices of the non-zero elements of the input tensor. The indices are
-/// returned as a two-dimensional tensor of size `[number_of_nonzeros, input_rank]`.
-/// Each row in the result contains indices of a nonzero elements in input.
+/// Computes the indices of the non-zero elements of the input tensor.
///
+/// The indices are returned as a two-dimensional tensor of size `[number_of_nonzeros, input_rank]`.
+/// Each row in the result contains indices of a nonzero elements in input.
/// For example:
/// ```md
/// tensor = [[ 1, 0, 3],
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphNormalizationOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphNormalizationOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphNormalizationOps.h 2024-04-13 21:12:48
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphNormalizationOps.h 2024-05-30 04:58:36
@@ -47,7 +47,7 @@
axes:(NSArray<NSNumber *> *) axes
name:(NSString * _Nullable) name;
-/// Create a batch normalization op and return the result tensor.
+/// Creates a batch normalization operation and returns the result tensor.
///
/// The mean and variance tensors should be outputs of `meanWithTensor:axes:name` and `varianceWithTensor:meanTensor:axes:name`.
/// Use the axes parameter to achieve different types of normalizations.
@@ -76,7 +76,7 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( normalize(_:mean:variance:gamma:beta:epsilon:name:) );
-/// Create a normalization gamma gradient op and return the result tensor.
+/// Creates a normalization gamma-gradient operation and returns the result tensor.
///
/// The mean and variance tensors should be outputs of ``meanWithTensor:axes:name`` and ``varianceWithTensor:meanTensor:axes:name``.
/// Use the axes parameter to achieve different types of normalizations.
@@ -102,7 +102,7 @@
epsilon:(float) epsilon
name:(NSString * _Nullable) name;
-/// Create a normalization beta gradient op and return the result tensor.
+/// Creates a normalization beta-gradient operation and returns the result tensor.
///
/// The mean and variance tensors should be outputs of ``meanWithTensor:axes:name`` and ``varianceWithTensor:meanTensor:axes:name``.
/// Use the axes parameter to achieve different types of normalizations.
@@ -121,7 +121,7 @@
sourceTensor:(MPSGraphTensor *) sourceTensor
reductionAxes:(NSArray<NSNumber *> *) axes
name:(NSString * _Nullable) name;
-/// Create a normalization input gradient op and return the result tensor.
+/// Creates a normalization input gradient operation and returns the result tensor.
///
/// The mean and variance tensors should be outputs of ``meanWithTensor:axes:name`` and ``varianceWithTensor:meanTensor:axes:name``.
/// Use the axes parameter to achieve different types of normalizations.
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphOneHotOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphOneHotOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphOneHotOps.h 2024-04-13 16:03:05
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphOneHotOps.h 2024-05-30 04:43:28
@@ -16,7 +16,7 @@
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(MPSGraphOneHotOps)
-/// Create oneHot op and return the result tensor
+/// Creates a oneHot operation and returns the result tensor.
///
/// Creates a tensor of rank equal to the indicesTensor rank + 1.
/// Inserts a new axis at the axis specified, or the minor axis if axis is -1.
@@ -41,7 +41,7 @@
offValue:(double) offValue
name:(NSString * _Nullable) name;
-/// Create oneHot op and return the result tensor
+/// Creates a oneHot operation and returns the result tensor.
///
/// Creates a tensor of rank equal to the rank of `indicesTensor` + 1.
/// Inserts a new axis at the minor dimension.
@@ -51,7 +51,7 @@
/// - Parameters:
/// - indicesTensor: Tensor of indices for on values
/// - depth: Depth of the oneHot vector along the axis
-/// - dataType: MPSDataType of the result tensor
+/// - dataType: MPSDataType of the result tensor.
/// - onValue: The value for indices designated by the indicesTensor. This value must match the specified data type.
/// - offValue: The value for indices not designated by the indicesTensor. This value must match the specified data type.
/// - name: Name for the operation
@@ -64,7 +64,7 @@
offValue:(double) offValue
name:(NSString * _Nullable) name;
-/// Create oneHot op and return the result tensor
+/// Creates a oneHot operation and returns the result tensor.
///
/// Creates a tensor of rank equal to the rank of `indicesTensor` + 1.
/// Inserts a new axis at the axis specified, or the minor axis if `axis` is -1.
@@ -75,7 +75,7 @@
/// - indicesTensor: Tensor of indices for on values
/// - depth: Depth of the oneHot vector along the axis
/// - axis: The axis to insert the new oneHot vector at
-/// - dataType: MPSDataType of the result tensor
+/// - dataType: MPSDataType of the result tensor.
/// - name: Name for the operation
/// - Returns: A valid MPSGraphTensor object.
///
@@ -85,7 +85,7 @@
dataType:(MPSDataType) dataType
name:(NSString * _Nullable) name;
-/// Create oneHot op and return the result tensor
+/// Creates a oneHot operation and returns the result tensor.
///
/// Creates a tensor of rank equal to the rank of `indicesTensor` + 1, of type MPSDataTypeFloat32.
/// Inserts a new axis at the axis specified, or the minor axis if `axis` is -1.
@@ -104,7 +104,7 @@
axis:(NSUInteger) axis
name:(NSString * _Nullable) name;
-/// Create oneHot op and return the result tensor
+/// Creates a oneHot operation and returns the result tensor.
///
/// Creates a tensor of rank equal to the rank of `indicesTensor` + 1.
/// Inserts a new axis at the minor dimension.
@@ -114,7 +114,7 @@
/// - Parameters:
/// - indicesTensor: Tensor of indices for on values
/// - depth: Depth of the oneHot vector along the axis
-/// - dataType: MPSDataType of the result tensor
+/// - dataType: MPSDataType of the result tensor.
/// - name: Name for the operation
/// - Returns: A valid MPSGraphTensor object.
///
@@ -123,7 +123,7 @@
dataType:(MPSDataType) dataType
name:(NSString * _Nullable) name;
-/// Create oneHot op and return the result tensor
+/// Creates a oneHot operation and returns the result tensor.
///
/// Creates a tensor of rank equal to the rank of `indicesTensor` + 1, of type MPSDataTypeFloat32.
/// Inserts a new axis at the minor dimension.
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphOperation.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphOperation.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphOperation.h 2024-04-13 16:03:05
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphOperation.h 2024-05-30 11:26:36
@@ -16,29 +16,29 @@
@class MPSGraph;
-/// Symbolic representation of a compute operation, all tensors are created, owned and destroyed by the MPSGraph
+/// A symbolic representation of a compute operation.
///
-/// NSCopy will cause a refrence to be taken, this is so NSDictionary can work with the tensor.
-/// All operations are created, owned and destroyed by the MPSGraph
+/// `NSCopy` will take a refrence, this is so `NSDictionary` can work with the tensor.
+/// All operations are created, owned and destroyed by the graph.
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraphOperation : MPSGraphObject <NSCopying>
-/// inputTensors of the operation
+/// The input tensors of the operation.
@property (readonly, nonnull, nonatomic) NSArray<MPSGraphTensor *> *inputTensors;
-/// outputTensors of the operation
+/// The output tensors of the operation.
@property (readonly, nonnull, nonatomic) NSArray<MPSGraphTensor *> *outputTensors;
-/// operations guaranteed to execute before this operation
+/// The set of operations guaranteed to execute before this operation.
@property (readonly, nonnull, nonatomic) NSArray<MPSGraphOperation *> *controlDependencies;
-/// graph on which the operation is defined
+/// The graph on which the operation is defined.
@property (readonly, nonatomic) MPSGraph *graph;
-/// name of the operation
+/// Name of the operation.
@property (readonly, nonnull, nonatomic) NSString *name;
-/// Unvaiable, please utilize graph methods to create and initialize operations
+/// Unavailable, please utilize graph methods to create and initialize operations.
-(instancetype) init NS_UNAVAILABLE;
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphOptimizerOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphOptimizerOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphOptimizerOps.h 2024-04-13 21:12:47
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphOptimizerOps.h 2024-05-30 04:58:35
@@ -16,7 +16,8 @@
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(MPSGraphOptimizerOps)
-/// The StochasticGradientDescent performs a gradient descent
+/// The Stochastic gradient descent performs a gradient descent.
+///
/// `variable = variable - (learningRate * g)`
/// where,
/// `g` is gradient of error wrt variable
@@ -33,7 +34,7 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( stochasticGradientDescent(learningRate:values:gradient:name:) );
-/// The StochasticGradientDescent performs a gradient descent
+/// The Stochastic gradient descent performs a gradient descent
/// `variable = variable - (learningRate * g)`
/// where,
/// `g` is gradient of error wrt variable
@@ -51,7 +52,7 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( applyStochasticGradientDescent(learningRate:variable:gradient:name:) );
-/// Adam
+/// Creates operations to apply Adam optimization.
///
/// The adam update ops are added
/// current learning rate:
@@ -90,7 +91,7 @@
MPS_SWIFT_NAME( adam(learningRate:beta1:beta2:epsilon:beta1Power:beta2Power:values:momentum:velocity:maximumVelocity:gradient:name:) );
-/// Adam
+/// Creates operations to apply Adam optimization.
///
/// The adam update ops are added
/// ```md
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphPoolingOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphPoolingOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphPoolingOps.h 2024-03-22 20:46:15
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphPoolingOps.h 2024-05-30 05:56:17
@@ -13,7 +13,7 @@
NS_ASSUME_NONNULL_BEGIN
-/// The flattening mode for returned indices with max pooling.
+/// The flattening mode for returned indices with max-pooling.
MPS_ENUM_AVAILABLE_STARTING(macos(12.2), ios(15.3), tvos(15.3))
typedef NS_ENUM(NSUInteger, MPSGraphPoolingReturnIndicesMode)
{
@@ -37,46 +37,63 @@
MPSGraphPoolingReturnIndicesLocalFlatten4D,
};
-/// This class defines parameters for a 2d pooling operation.
+/// The class that defines the parameters for a 2D pooling operation.
///
/// Use this descriptor with the following methods:
-/// ``MPSGraph/maxPooling2DWithSourceTensor:descriptor:name:``,
-/// ``MPSGraph/maxPooling2DReturnIndicesWithSourceTensor:descriptor:name:``,
-/// ``MPSGraph/maxPooling2DGradientWithGradientTensor:sourceTensor:descriptor:name:``,
-/// ``MPSGraph/maxPooling2DGradientWithGradientTensor:indicesTensor:outputShape:descriptor:name:``,
-/// ``MPSGraph/maxPooling2DGradientWithGradientTensor:indicesTensor:outputShapeTensor:descriptor:name:``,
-/// ``MPSGraph/avgPooling2DWithSourceTensor:descriptor:name:`` and
-/// ``MPSGraph/avgPooling2DGradientWithGradientTensor:sourceTensor:descriptor:name:``.
+/// - ``MPSGraph/maxPooling2DWithSourceTensor:descriptor:name:``
+/// - ``MPSGraph/maxPooling2DReturnIndicesWithSourceTensor:descriptor:name:``
+/// - ``MPSGraph/maxPooling2DGradientWithGradientTensor:sourceTensor:descriptor:name:``
+/// - ``MPSGraph/maxPooling2DGradientWithGradientTensor:indicesTensor:outputShape:descriptor:name:``
+/// - ``MPSGraph/maxPooling2DGradientWithGradientTensor:indicesTensor:outputShapeTensor:descriptor:name:``
+/// - ``MPSGraph/avgPooling2DWithSourceTensor:descriptor:name:``
+/// - ``MPSGraph/avgPooling2DGradientWithGradientTensor:sourceTensor:descriptor:name:``
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraphPooling2DOpDescriptor : MPSGraphObject<NSCopying>
-/// Defines the pooling window size for the X (Width) dimension.
+/// Defines the pooling window size for the width dimension.
@property (readwrite, nonatomic) NSUInteger kernelWidth;
-/// Defines the pooling window size for the Y (Height) dimension.
+/// Defines the pooling window size for the height dimension.
@property (readwrite, nonatomic) NSUInteger kernelHeight;
-/// Defines the stride for the X (Width) dimension. Default value: 1.
+/// Defines the stride for the width dimension.
+///
+/// Default value: 1.
@property (readwrite, nonatomic) NSUInteger strideInX;
-/// Defines the stride for the Y (Height) dimension. Default value: 1.
+/// Defines the stride for the height dimension.
+///
+/// Default value: 1.
@property (readwrite, nonatomic) NSUInteger strideInY;
-/// Defines the dilation rate for the X (Width) dimension. Default value: 1.
+/// Defines the dilation rate for the width dimension.
+///
+/// Default value: 1.
@property (readwrite, nonatomic) NSUInteger dilationRateInX;
-/// Defines the dilation rate for the Y (Height) dimension. Default value: 1.
+/// Defines the dilation rate for the height dimension.
+///
+/// Default value: 1.
@property (readwrite, nonatomic) NSUInteger dilationRateInY;
-/// Defines the explicit padding value for the X (Width) dimension to add before the data. Default value: 0.
+/// Defines the explicit padding value for the width dimension to add before the data.
+///
+/// Default value: 0.
@property (readwrite, nonatomic) NSUInteger paddingLeft;
-/// Defines the explicit padding value for theX (Width) dimension to add after the data. Default value: 0.
+/// Defines the explicit padding value for the width dimension to add after the data.
+///
+/// Default value: 0.
@property (readwrite, nonatomic) NSUInteger paddingRight;
-/// Defines the explicit padding value for the Y (Height) dimension to add before the data. Default value: 0.
+/// Defines the explicit padding value for the height dimension to add before the data.
+///
+/// Default value: 0.
@property (readwrite, nonatomic) NSUInteger paddingTop;
-/// Defines the explicit padding value for the Y (Height) dimension to add after the data. Default value: 0.
+/// Defines the explicit padding value for the height dimension to add after the data.
+///
+/// Default value: 0.
@property (readwrite, nonatomic) NSUInteger paddingBottom;
-/// Defines what kind of padding MPSGraph applies to the operation.
+/// Defines what kind of padding graph applies to the operation.
+///
/// Default value: `MPSGraphPaddingStyleExplicit`.
@property (readwrite, nonatomic) MPSGraphPaddingStyle paddingStyle;
-/// Defines the data layout of the input data (in forward pass). See: ``MPSGraphTensorNamedDataLayout``.
+/// Defines the data layout of the input data in the forward pass. See: ``MPSGraphTensorNamedDataLayout``.
@property (readwrite, nonatomic) MPSGraphTensorNamedDataLayout dataLayout;
/// Defines the mode for returned indices of maximum values within each pooling window.
@@ -95,18 +112,19 @@
@property (readwrite, nonatomic) MPSDataType returnIndicesDataType
MPS_AVAILABLE_STARTING(macos(12.2), ios(15.3), tvos(15.3));
-/// Affects how MPSGraph computes the output size: if set to `YES` then output size is
-/// computed by rounding up instead of down when dividing input size by stride.
+/// Affects how the graph computes the output size.
+///
+/// if set to `YES` then output size is computed by rounding up instead of down when dividing input size by stride.
/// Default value: `NO`.
@property (readwrite, nonatomic) BOOL ceilMode MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
-/// Defines for average pooling a mode where samples outside the input tensor count as
-/// zeroes in the average computation. Otherwise the result is sum over samples divided by
-/// number of samples that didn't come from padding.
+/// Defines a mode for average pooling, where samples outside the input tensor count as zeroes in the average computation.
+///
+/// Otherwise the result is sum over samples divided by number of samples that didn't come from padding.
/// Default value: `NO`.
@property (readwrite, nonatomic) BOOL includeZeroPadToAverage MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
-/// Creates a 2d pooling descriptor with given values.
+/// Creates a 2D pooling descriptor with given values.
///
/// - Parameters:
/// - kernelWidth: See `kernelWidth` property.
@@ -135,7 +153,7 @@
paddingStyle:(MPSGraphPaddingStyle) paddingStyle
dataLayout:(MPSGraphTensorNamedDataLayout) dataLayout;
-/// Creates a 2d pooling descriptor with given values.
+/// Creates a 2D pooling descriptor with given values.
///
/// - Parameters:
/// - kernelWidth: See `kernelWidth` property.
@@ -152,7 +170,7 @@
paddingStyle:(MPSGraphPaddingStyle) paddingStyle
dataLayout:(MPSGraphTensorNamedDataLayout) dataLayout;
-/// Sets the explicit padding values and sets `paddingStyle` to `MPSGraphPaddingStyleExplicit`.
+/// Sets the explicit padding values and sets padding style to explicit.
///
/// - Parameters:
/// - paddingLeft: See `paddingLeft` property.
@@ -166,57 +184,66 @@
@end
-/// This class defines parameters for a 4d pooling operation.
+/// The class that defines the parameters for a 4D pooling operation.
///
/// Use this descriptor with the following methods:
-/// ``MPSGraph/maxPooling4DWithSourceTensor:descriptor:name:``,
-/// ``MPSGraph/maxPooling4DReturnIndicesWithSourceTensor:descriptor:name:``,
-/// ``MPSGraph/maxPooling4DGradientWithGradientTensor:sourceTensor:descriptor:name:``,
-/// ``MPSGraph/maxPooling4DGradientWithGradientTensor:indicesTensor:outputShape:descriptor:name:``,
-/// ``MPSGraph/maxPooling4DGradientWithGradientTensor:indicesTensor:outputShapeTensor:descriptor:name:``,
-/// ``MPSGraph/avgPooling4DWithSourceTensor:descriptor:name:``,
-/// ``MPSGraph/avgPooling4DGradientWithGradientTensor:sourceTensor:descriptor:name:``,
-/// ``MPSGraph/L2NormPooling4DWithSourceTensor:descriptor:name:`` and
-/// ``MPSGraph/L2NormPooling4DGradientWithGradientTensor:sourceTensor:descriptor:name:``.
+/// - ``MPSGraph/maxPooling4DWithSourceTensor:descriptor:name:``
+/// - ``MPSGraph/maxPooling4DReturnIndicesWithSourceTensor:descriptor:name:``
+/// - ``MPSGraph/maxPooling4DGradientWithGradientTensor:sourceTensor:descriptor:name:``
+/// - ``MPSGraph/maxPooling4DGradientWithGradientTensor:indicesTensor:outputShape:descriptor:name:``
+/// - ``MPSGraph/maxPooling4DGradientWithGradientTensor:indicesTensor:outputShapeTensor:descriptor:name:``
+/// - ``MPSGraph/avgPooling4DWithSourceTensor:descriptor:name:``
+/// - ``MPSGraph/avgPooling4DGradientWithGradientTensor:sourceTensor:descriptor:name:``
+/// - ``MPSGraph/L2NormPooling4DWithSourceTensor:descriptor:name:``
+/// - ``MPSGraph/L2NormPooling4DGradientWithGradientTensor:sourceTensor:descriptor:name:``
MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
@interface MPSGraphPooling4DOpDescriptor : MPSGraphObject<NSCopying>
/// Defines the pooling window size.
+///
/// Must be four numbers, one for each spatial dimension, fastest running index last.
@property (readwrite, nonatomic, copy) NSArray<NSNumber *> * _Nonnull kernelSizes;
/// Defines strides for spatial dimensions. Must be four numbers, one for each spatial dimension, fastest running index last.
+///
/// Default value: `@[ @1, @1, @1, @1 ]`
@property (readwrite, nonatomic, copy) NSArray<NSNumber *> * _Nonnull strides;
/// Defines dilation rates for spatial dimensions. Must be four numbers, one for each spatial dimension, fastest running index last.
+///
/// Default value: `@[ @1, @1, @1, @1 ]`
@property (readwrite, nonatomic, copy) NSArray<NSNumber *> * _Nonnull dilationRates;
-/// Defines padding values for spatial dimensions. Must be eight numbers, two for each spatial dimension.
+/// Defines padding values for spatial dimensions which must be eight numbers, two for each spatial dimension.
+///
/// For example `paddingValues[0]` defines the explicit padding
-/// amount before the first spatial dimension (slowest running index of spatial dimensions),
+/// amount before the first spatial dimension (slowest running index of spatial dimensions),
/// `paddingValues[1]` defines the padding amount after the first spatial dimension etc.
/// Used only when `paddingStyle = MPSGraphPaddingStyleExplicit`.
/// Default value: `@[ @0, @0, @0, @0, @0, @0, @0, @0 ]`
@property (readwrite, nonatomic, copy) NSArray<NSNumber *> * _Nonnull paddingValues;
-/// Defines what kind of padding MPSGraph applies to the operation.
+/// Defines what kind of padding graph applies to the operation.
+///
/// Default value: `MPSGraphPaddingStyleExplicit`.
@property (readwrite, nonatomic) MPSGraphPaddingStyle paddingStyle;
/// Affects how MPSGraph computes the output size: if set to `YES` then output size is
/// computed by rounding up instead of down when dividing input size by stride.
+///
/// Default value: `NO`.
@property (readwrite, nonatomic) BOOL ceilMode;
-/// Defines for average pooling a mode where samples outside the input tensor count as
-/// zeroes in the average computation. Otherwise the result is sum over samples divided by
+/// Defines a mode for average pooling, where samples outside the input tensor count as
+/// zeroes in the average computation.
+///
+/// Otherwise the result is sum over samples divided by
/// number of samples that didn't come from padding.
/// Default value: `NO`.
@property (readwrite, nonatomic) BOOL includeZeroPadToAverage;
/// Defines the mode for returned indices of maximum values within each pooling window.
+///
/// Use this in conjunction with ``MPSGraph/maxPooling4DReturnIndicesWithSourceTensor:descriptor:name:`` API.
/// If `returnIndicesMode = MPSGraphPoolingReturnIndicesNone` then only the first result
/// MPSGraph returns from ``MPSGraph/maxPooling4DReturnIndicesWithSourceTensor:descriptor:name:``
@@ -226,13 +253,14 @@
MPS_AVAILABLE_STARTING(macos(12.2), ios(15.3), tvos(15.3));
/// Defines the data type for returned indices.
+///
/// Use this in conjunction with ``MPSGraph/maxPooling4DReturnIndicesWithSourceTensor:descriptor:name:`` API.
/// Currently MPSGraph supports the following datatypes: `MPSDataTypeInt32`.
/// Default value: `MPSDataTypeInt32`.
@property (readwrite, nonatomic) MPSDataType returnIndicesDataType
MPS_AVAILABLE_STARTING(macos(12.2), ios(15.3), tvos(15.3));
-/// Creates a 4d pooling descriptor with given values.
+/// Creates a 4D pooling descriptor with given values.
///
/// - Parameters:
/// - kernelSizes: See `kernelSizes` property.
@@ -247,7 +275,7 @@
paddingValues:(NSArray<NSNumber *> * _Nonnull) paddingValues
paddingStyle:(MPSGraphPaddingStyle) paddingStyle;
-/// Creates a 4d pooling descriptor with default values.
+/// Creates a 4D pooling descriptor with default values.
///
/// - Parameters:
/// - kernelSizes: See `kernelSizes` property.
@@ -261,10 +289,10 @@
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(MPSGraphPoolingOps)
-/// Creates a 2d max-pooling operation and returns the result tensor.
+/// Creates a 2D max-pooling operation and returns the result tensor.
///
/// - Parameters:
-/// - source: A 2d Image source as tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
+/// - source: A 2D Image source as tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
/// - descriptor: A pooling operation descriptor that specifies pooling window sizes, strides, dilation rates, paddings and layouts.
/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
@@ -272,15 +300,15 @@
descriptor:(MPSGraphPooling2DOpDescriptor *) descriptor
name:(NSString * _Nullable) name;
-/// Creates a 2d max-pooling operation and returns the result tensor and the corresponding indices tensor.
+/// Creates a 2D max-pooling operation and returns the result tensor and the corresponding indices tensor.
///
-/// In order to compute the indices, `returnIndicesMode` of the descriptor must be set. The datatype of indices tensor can be set
+/// In order to Computes the indices, `returnIndicesMode` of the descriptor must be set. The datatype of indices tensor can be set
/// using `returnIndicesDataType`.
/// If `returnIndicesMode = MPSGraphPoolingReturnIndicesNone` then only the first result
/// MPSGraph returns will be valid and using the second result will assert.
///
/// - Parameters:
-/// - source: A 2d Image source as tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
+/// - source: A 2D Image source as tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
/// - descriptor: A pooling operation descriptor that specifies pooling window sizes, strides, dilation rates, paddings and layouts.
/// - name: The name for the operation.
/// - Returns: An array of two MPSGraphTensors. The first tensor holds the result of max pool and the second tensor holds the corresponding indices
@@ -290,10 +318,10 @@
MPS_SWIFT_NAME( maxPooling2DReturnIndices(_:descriptor:name:))
MPS_AVAILABLE_STARTING(macos(12.2), ios(15.3), tvos(15.3));
-/// Creates a max pooling gradient operation and returns the result tensor.
+/// Creates a max-pooling gradient operation and returns the result tensor.
///
/// - Parameters:
-/// - gradient: A 2d input gradient tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
+/// - gradient: A 2D input gradient tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
/// - source: The input tensor for the forward pass.
/// - descriptor: A pooling operation descriptor that specifies pooling window sizes, strides, dilation rates, paddings and layouts.
/// - name: The name for the operation.
@@ -303,13 +331,13 @@
descriptor:(MPSGraphPooling2DOpDescriptor *) descriptor
name:(NSString * _Nullable) name;
-/// Creates a max pooling gradient operation and returns the result tensor.
+/// Creates a max-pooling gradient operation and returns the result tensor.
///
-/// With this API MPSGraph computes the max pooling gradient efficiently by reusing the indices from the forward API instead of recomputing them.
+/// With this API MPSGraph computes the max-pooling gradient efficiently by reusing the indices from the forward API instead of recomputing them.
/// The descriptor must set `returnIndicesMode` and `returnIndicesDataType` to the same value as that set by the forward pass.
///
/// - Parameters:
-/// - gradient: A 2d input gradient tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
+/// - gradient: A 2D input gradient tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
/// - indices: The indices tensor returned from ``MPSGraph/maxPooling2DReturnIndicesWithSourceTensor:descriptor:name:``.
/// - outputShape: The shape of the destination gradient.
/// - descriptor: A pooling operation descriptor that specifies pooling window sizes, strides, dilation rates, paddings and layouts.
@@ -322,13 +350,13 @@
name:(NSString * _Nullable) name
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Creates a max pooling gradient operation and returns the result tensor.
+/// Creates a max-pooling gradient operation and returns the result tensor.
///
-/// With this API MPSGraph computes the max pooling gradient efficiently by reusing the indices from the forward API instead of recomputing them.
+/// With this API MPSGraph computes the max-pooling gradient efficiently by reusing the indices from the forward API instead of recomputing them.
/// The descriptor must set `returnIndicesMode` and `returnIndicesDataType` to the same value as that set by the forward pass.
///
/// - Parameters:
-/// - gradient: A 2d input gradient tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
+/// - gradient: A 2D input gradient tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
/// - indices: The indices tensor returned from ``MPSGraph/maxPooling2DReturnIndicesWithSourceTensor:descriptor:name:``.
/// - outputShape: A tensor containing the shape of the destination gradient.
/// - descriptor: A pooling operation descriptor that specifies pooling window sizes, strides, dilation rates, paddings and layouts.
@@ -341,10 +369,10 @@
name:(NSString * _Nullable) name
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Creates a 2d average-pooling operation and returns the result tensor.
+/// Creates a 2D average-pooling operation and returns the result tensor.
///
/// - Parameters:
-/// - source: A 2d Image source as tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
+/// - source: A 2D Image source as tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
/// - descriptor: A pooling operation descriptor that specifies pooling window sizes, strides, dilation rates, paddings and layouts.
/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
@@ -352,10 +380,10 @@
descriptor:(MPSGraphPooling2DOpDescriptor *) descriptor
name:(NSString * _Nullable) name;
-/// Creates a 2d average pooling gradient operation and returns the result tensor.
+/// Creates a 2D average pooling gradient operation and returns the result tensor.
///
/// - Parameters:
-/// - gradient: A 2d input gradient tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
+/// - gradient: A 2D input gradient tensor - must be of rank=4. The layout is defined by `descriptor.dataLayout`.
/// - source: The input tensor for the forward pass.
/// - descriptor: A pooling operation descriptor that specifies pooling window sizes, strides, dilation rates, paddings and layouts.
/// - name: The name for the operation.
@@ -365,7 +393,7 @@
descriptor:(MPSGraphPooling2DOpDescriptor *) descriptor
name:(NSString * _Nullable) name;
-/// Creates a 4d max-pooling operation and returns the result tensor.
+/// Creates a 4D max-pooling operation and returns the result tensor.
///
/// - Parameters:
/// - source: A source tensor.
@@ -378,9 +406,9 @@
MPS_SWIFT_NAME( maxPooling4D(_:descriptor:name:))
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
-/// Creates a 4d max-pooling operation and returns the result tensor and the corresponding indices tensor.
+/// Creates a 4D max-pooling operation and returns the result tensor and the corresponding indices tensor.
///
-/// In order to compute the indices, `returnIndicesMode` of the descriptor must be set. The datatype of indices tensor can be set
+/// In order to Computes the indices, `returnIndicesMode` of the descriptor must be set. The datatype of indices tensor can be set
/// using `returnIndicesDataType`.
/// If `returnIndicesMode = MPSGraphPoolingReturnIndicesNone` then only the first result
/// MPSGraph returns will be valid and using the second result will assert.
@@ -396,7 +424,7 @@
MPS_SWIFT_NAME( maxPooling4DReturnIndices(_:descriptor:name:))
MPS_AVAILABLE_STARTING(macos(12.2), ios(15.3), tvos(15.3));
-/// Creates a max pooling gradient operation and returns the result tensor.
+/// Creates a max-pooling gradient operation and returns the result tensor.
///
/// - Parameters:
/// - gradient: An input gradient tensor.
@@ -411,9 +439,9 @@
MPS_SWIFT_NAME( maxPooling4DGradient(_:source:descriptor:name:))
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
-/// Creates a max pooling gradient operation and returns the result tensor.
+/// Creates a max-pooling gradient operation and returns the result tensor.
///
-/// With this API MPSGraph computes the max pooling gradient efficiently by reusing the indices from the forward API instead of recomputing them.
+/// With this API MPSGraph computes the max-pooling gradient efficiently by reusing the indices from the forward API instead of recomputing them.
/// The descriptor must set `returnIndicesMode` and `returnIndicesDataType` to the same value as that set by the forward pass.
///
/// - Parameters:
@@ -430,9 +458,9 @@
name:(NSString * _Nullable) name
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Creates a max pooling gradient operation and returns the result tensor.
+/// Creates a max-pooling gradient operation and returns the result tensor.
///
-/// With this API MPSGraph computes the max pooling gradient efficiently by reusing the indices from the forward API instead of recomputing them.
+/// With this API MPSGraph computes the max-pooling gradient efficiently by reusing the indices from the forward API instead of recomputing them.
/// The descriptor must set `returnIndicesMode` and `returnIndicesDataType` to the same value as that set by the forward pass.
///
/// - Parameters:
@@ -449,7 +477,7 @@
name:(NSString * _Nullable) name
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Creates a 4d average pooling operation and returns the result tensor.
+/// Creates a 4D average pooling operation and returns the result tensor.
///
/// - Parameters:
/// - source: A source tensor.
@@ -477,7 +505,7 @@
MPS_SWIFT_NAME( avgPooling4DGradient(_:source:descriptor:name:))
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
-/// Creates a 4d L2-Norm pooling operation and returns the result tensor.
+/// Creates a 4D L2-norm pooling operation and returns the result tensor.
///
/// - Parameters:
/// - source: A source tensor.
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphQuantizationOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphQuantizationOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphQuantizationOps.h 2024-04-13 15:01:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphQuantizationOps.h 2024-05-30 04:43:27
@@ -13,11 +13,9 @@
NS_ASSUME_NONNULL_BEGIN
-#define MPSGRAPH_QUANTIZATION_AVAILABLE
-
@interface MPSGraph(MPSGraphQuantizationOps)
-/// Create Quantize op and return the result tensor
+/// Creates a Quantize operation and returns the result tensor.
///
/// Convert the float `tensor` to an i8 or u8 tensor by applying a scale + bias transform:
/// result = (tensor / scale) + zeroPoint
@@ -26,8 +24,8 @@
/// - tensor: Input tensor to be quantized
/// - scale: Scale scalar parameter
/// - zeroPoint: Bias scalar parameter (converted to dataType of resultTensor)
-/// - dataType: Integer data type of the result tensor
-/// - name: The name for the operation
+/// - dataType: Integer data type of the result tensor.
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor array of datatype dataType
-(MPSGraphTensor*) quantizeTensor:(MPSGraphTensor*)tensor
scale:(double)scale
@@ -37,7 +35,7 @@
MPS_AVAILABLE_STARTING(macos(13.1), ios(16.2), tvos(16.2))
MPS_SWIFT_NAME( quantize(_:scale:zeroPoint:dataType:name:) );
-/// Create Dequantize op and return the result tensor
+/// Creates Dequantize operation and returns the result tensor.
///
/// Convert the i8 or u8 `tensor` to a float tensor by applying a scale + bias transform:
/// result = scale(tensor - zeroPoint)
@@ -46,8 +44,8 @@
/// - tensor: Input tensor to be dequantized
/// - scale: Scale scalar parameter
/// - zeroPoint: Bias scalar parameter (converted to dataType of tensor)
-/// - dataType: Float data type of the result tensor
-/// - name: The name for the operation
+/// - dataType: Float data type of the result tensor.
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor array of datatype dataType
-(MPSGraphTensor*) dequantizeTensor:(MPSGraphTensor*)tensor
scale:(double)scale
@@ -57,7 +55,7 @@
MPS_AVAILABLE_STARTING(macos(13.1), ios(16.2), tvos(16.2))
MPS_SWIFT_NAME( dequantize(_:scale:zeroPoint:dataType:name:) );
-/// Create Quantize op and return the result tensor
+/// Creates a Quantize operation and returns the result tensor.
///
/// Convert the float `tensor` to an i8 or u8 tensor by applying a scale + bias transform:
/// result = (tensor / scaleTensor) + zeroPoint
@@ -66,9 +64,9 @@
/// - tensor: Input tensor to be quantized
/// - scaleTensor: Scale 1D Tensor parameter with size == tensor.shape[axis]
/// - zeroPoint: Bias scalar parameter (converted to dataType of resultTensor)
-/// - dataType: Integer data type of the result tensor
+/// - dataType: Integer data type of the result tensor.
/// - axis: Axis on which the scale 1D value is being broadcasted
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor array of datatype dataType
-(MPSGraphTensor*) quantizeTensor:(MPSGraphTensor*)tensor
scaleTensor:(MPSGraphTensor*)scaleTensor
@@ -79,7 +77,7 @@
MPS_AVAILABLE_STARTING(macos(13.1), ios(16.2), tvos(16.2))
MPS_SWIFT_NAME( quantize(_:scaleTensor:zeroPoint:dataType:axis:name:) );
-/// Create Dequantize op and return the result tensor
+/// Creates Dequantize operation and returns the result tensor.
///
/// Convert the i8 or u8 `tensor` to a float tensor by applying a scale + bias transform:
/// result = scaleTensor(tensor - zeroPoint)
@@ -88,9 +86,9 @@
/// - tensor: Input tensor to be dequantized
/// - scaleTensor: Scale scalar or 1D Tensor parameter with size == tensor.shape[axis]
/// - zeroPoint: Bias scalar parameter (converted to dataType of tensor)
-/// - dataType: Float data type of the result tensor
+/// - dataType: Float data type of the result tensor.
/// - axis: Axis on which the scale 1D value is being broadcasted
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor array of datatype dataType
-(MPSGraphTensor*) dequantizeTensor:(MPSGraphTensor*)tensor
scaleTensor:(MPSGraphTensor*)scaleTensor
@@ -101,7 +99,7 @@
MPS_AVAILABLE_STARTING(macos(13.1), ios(16.2), tvos(16.2))
MPS_SWIFT_NAME( dequantize(_:scaleTensor:zeroPoint:dataType:axis:name:) );
-/// Create Quantize op and return the result tensor
+/// Creates a Quantize operation and returns the result tensor.
///
/// Convert the float `tensor` to an i8 or u8 tensor by applying a scale + bias transform:
/// result = (tensor / scaleTensor) + zeroPointTensor
@@ -110,9 +108,9 @@
/// - tensor: Input tensor to be quantized
/// - scaleTensor: Scale scalar or 1D Tensor parameter with size == tensor.shape[axis]
/// - zeroPointTensor: Bias scalar or 1D Tensor parameter with size == tensor.shape[axis]
-/// - dataType: Integer data type of the result tensor
+/// - dataType: Integer data type of the result tensor.
/// - axis: Axis on which the scale 1D value is being broadcasted
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor array of datatype dataType
-(MPSGraphTensor*) quantizeTensor:(MPSGraphTensor*)tensor
scaleTensor:(MPSGraphTensor*)scaleTensor
@@ -123,7 +121,7 @@
MPS_AVAILABLE_STARTING(macos(13.1), ios(16.2), tvos(16.2))
MPS_SWIFT_NAME( quantize(_:scaleTensor:zeroPointTensor:dataType:axis:name:) );
-/// Create Dequantize op and return the result tensor
+/// Creates a dequantize operation and returns the result tensor.
///
/// Convert the i8 or u8 `tensor` to a float tensor by applying a scale + bias transform:
/// result = scaleTensor(tensor - zeroPointTensor)
@@ -132,9 +130,9 @@
/// - tensor: Input tensor to be dequantized
/// - scaleTensor: Scale scalar or 1D Tensor parameter with size == tensor.shape[axis]
/// - zeroPointTensor: Bias scalar or 1D Tensor parameter with size == tensor.shape[axis]
-/// - dataType: Float data type of the result tensor
+/// - dataType: Float data type of the result tensor.
/// - axis: Axis on which the scale 1D value is being broadcasted
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor array of datatype dataType
-(MPSGraphTensor*) dequantizeTensor:(MPSGraphTensor*)tensor
scaleTensor:(MPSGraphTensor*)scaleTensor
@@ -144,6 +142,92 @@
name:(NSString * _Nullable) name
MPS_AVAILABLE_STARTING(macos(13.1), ios(16.2), tvos(16.2))
MPS_SWIFT_NAME( dequantize(_:scaleTensor:zeroPointTensor:dataType:axis:name:) );
+
+
+/// Creates a dequantize operation and returns the result tensor.
+///
+/// Convert the i8, u8, i4 or u4 `tensor` to a float tensor by applying a scale and bias transform:
+/// ```md
+/// result = scaleTensor(tensor - zeroPointTensor).
+/// ```
+///
+/// - Parameters:
+/// - tensor: Input tensor to be dequantized.
+/// - scaleTensor: The scale tensor with groups support.
+/// - zeroPointTensor: The bias tensor with groups support.
+/// - dataType: Float data type of the result tensor.
+/// - name: The name for the operation.
+/// - Returns: A valid ``MPSGraphTensor`` array of datatype `dataType`.
+-(MPSGraphTensor*) dequantizeTensor:(MPSGraphTensor*)tensor
+ scaleTensor:(MPSGraphTensor*)scaleTensor
+ zeroPointTensor:(MPSGraphTensor*)zeroPointTensor
+ dataType:(MPSDataType)dataType
+ name:(NSString * _Nullable) name
+MPS_AVAILABLE_STARTING(macos(15.0), ios(18.0), macCatalyst(18.0), tvos(18.0), xros(2.0))
+MPS_SWIFT_NAME( dequantize(_:scaleTensor:zeroPointTensor:dataType:name:) );
+
+
+/// Creates a dequantize operation and returns the result tensor.
+///
+/// Converts the i8, u8, i4 or u4 `tensor` to a float tensor by applying a scale and bias transform:
+/// ```md
+/// result = scaleTensor * tensor.
+/// ```
+///
+/// - Parameters:
+/// - tensor: Input tensor to be dequantized.
+/// - scaleTensor: Scale Tensor parameter with groups support.
+/// - dataType: Float data type of the result tensor.
+/// - name: The name for the operation.
+/// - Returns: A valid ``MPSGraphTensor`` array of datatype `dataType`.
+-(MPSGraphTensor*) dequantizeTensor:(MPSGraphTensor*)tensor
+ scaleTensor:(MPSGraphTensor*)scaleTensor
+ dataType:(MPSDataType)dataType
+ name:(NSString * _Nullable) name
+MPS_AVAILABLE_STARTING(macos(15.0), ios(18.0), macCatalyst(18.0), tvos(18.0), xros(2.0))
+MPS_SWIFT_NAME( dequantize(_:scaleTensor:dataType:name:) );
+
+/// Creates a lookup-table based quantization operation and returns the result tensor.
+///
+/// Converts a u8 or u4 `tensor` to a float tensor by applying a lookup operation:
+/// ```md
+/// result[i1,...,in] = LUTTensor[i1',...,in',tensor[i1,...,in]].
+/// ```
+/// Note: The operation supports LUT groups up to the last 3 dimensions for `tensor`.
+///
+/// - Parameters:
+/// - tensor: Input tensor to be dequantized.
+/// - LUTTensor: The lookup table to use - for u4 the last dimension should have 16 elements, and for u8 256 elements.
+/// - name: The name for the operation.
+/// - Returns: A valid ``MPSGraphTensor`` object.
+-(MPSGraphTensor *) dequantizeTensor:(MPSGraphTensor *) tensor
+ LUTTensor:(MPSGraphTensor *) LUTTensor
+ name:(NSString * _Nullable) name
+MPS_SWIFT_NAME( dequantize(_:LUTTensor:name:) )
+MPS_AVAILABLE_STARTING(macos(15.0), ios(18.0), macCatalyst(18.0), tvos(18.0), xros(2.0));
+
+/// Creates a vector lookup-table based quantization operation and returns the result tensor.
+///
+/// Converts a u8 or u4 `tensor` to a float tensor by applying a lookup operation, where each
+/// input index defines a vector of values. The operation reads the vector values from the last dimension of the lookup table
+/// tensor and stores them into the dimension defined by `axis` on the result tensor.
+/// ```md
+/// result[i1, ... , i_axis, ..., in] = LUTTensor[i1', ..., in', tensor[i1, ..., in], i_axis]
+/// ```
+/// Note: The operation supports LUT groups up to the last 2 dimensions for `tensor`.
+///
+/// - Parameters:
+/// - tensor: Input tensor to be dequantized.
+/// - LUTTensor: The lookup table to use - for u4 the second to last dimension should have 16 elements, and for u8 256 elements.
+/// - axis: Axis on which the scale 1D value is being broadcasted.
+/// - name: The name for the operation.
+/// - Returns: A valid ``MPSGraphTensor`` object.
+-(MPSGraphTensor *) dequantizeTensor:(MPSGraphTensor *) tensor
+ LUTTensor:(MPSGraphTensor *) LUTTensor
+ axis:(NSInteger) axis
+ name:(NSString * _Nullable) name
+MPS_SWIFT_NAME( dequantize(_:LUTTensor:axis:name:) )
+MPS_AVAILABLE_STARTING(macos(15.0), ios(18.0), macCatalyst(18.0), tvos(18.0), xros(2.0));
@end
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphRNNOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphRNNOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphRNNOps.h 2024-03-22 20:46:15
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphRNNOps.h 2024-05-30 05:56:18
@@ -29,17 +29,16 @@
MPSGraphRNNActivationHardSigmoid MPS_ENUM_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4)),
};
-/// This class defines parameters for a single gate (vanilla) RNN operation.
+/// The class that defines the parameters for a single gate RNN operation.
///
/// Use this descriptor with the following ``MPSGraph`` methods:
-/// - ``MPSGraph/singleGateRNNWithSourceTensor:recurrentWeight:initState:descriptor:name:``,
-/// - ``MPSGraph/singleGateRNNWithSourceTensor:recurrentWeight:inputWeight:bias:initState:descriptor:name:``,
-/// - ``MPSGraph/singleGateRNNWithSourceTensor:recurrentWeight:inputWeight:bias:initState:mask:descriptor:name:``,
-/// - ``MPSGraph/singleGateRNNGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:initState:descriptor:name:``,
-/// - ``MPSGraph/singleGateRNNGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:inputWeight:bias:initState:descriptor:name:``,
-/// - ``MPSGraph/singleGateRNNGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:inputWeight:bias:initState:mask:descriptor:name:``,
-/// and
-/// - ``MPSGraph/singleGateRNNGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:stateGradient:inputWeight:bias:initState:mask:descriptor:name:``.
+/// - ``MPSGraph/singleGateRNNWithSourceTensor:recurrentWeight:initState:descriptor:name:``
+/// - ``MPSGraph/singleGateRNNWithSourceTensor:recurrentWeight:inputWeight:bias:initState:descriptor:name:``
+/// - ``MPSGraph/singleGateRNNWithSourceTensor:recurrentWeight:inputWeight:bias:initState:mask:descriptor:name:``
+/// - ``MPSGraph/singleGateRNNGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:initState:descriptor:name:``
+/// - ``MPSGraph/singleGateRNNGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:inputWeight:bias:initState:descriptor:name:``
+/// - ``MPSGraph/singleGateRNNGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:inputWeight:bias:initState:mask:descriptor:name:``
+/// - ``MPSGraph/singleGateRNNGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:stateGradient:inputWeight:bias:initState:mask:descriptor:name:``
MPS_CLASS_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4))
@interface MPSGraphSingleGateRNNDescriptor : MPSGraphObject<NSCopying>
@@ -63,7 +62,8 @@
/// Default value: `NO`.
@property (readwrite, nonatomic) BOOL training;
-/// A parameter which defines the activation function to use with the RNN operation.
+/// A parameter that defines the activation function to use with the RNN operation.
+///
/// Default value: `MPSGraphRNNActivationRelu`.
@property (readwrite, nonatomic) MPSGraphRNNActivation activation;
@@ -72,16 +72,16 @@
@end
-/// This class defines parameters for a Long Short Term Memory (LSTM) operation.
+/// The class that defines the parameters for a long short-term memory (LSTM) operation.
///
/// Use this descriptor with the following ``MPSGraph`` methods:
-/// - ``MPSGraph/LSTMWithSourceTensor:recurrentWeight:initState:initCell:descriptor:name:``,
-/// - ``MPSGraph/LSTMWithSourceTensor:recurrentWeight:inputWeight:bias:initState:initCell:descriptor:name:``,
-/// - ``MPSGraph/LSTMWithSourceTensor:recurrentWeight:inputWeight:bias:initState:initCell:mask:peephole:descriptor:name:``,
-/// - ``MPSGraph/LSTMGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:cellOutputFwd:descriptor:name:``,
-/// - ``MPSGraph/LSTMGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:cellOutputFwd:inputWeight:bias:initState:initCell:descriptor:name:``,
-/// - ``MPSGraph/LSTMGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:cellOutputFwd:inputWeight:bias:initState:initCell:mask:descriptor:name:`` and
-/// - ``MPSGraph/LSTMGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:cellOutputFwd:stateGradient:cellGradient:inputWeight:bias:initState:initCell:mask:peephole:descriptor:name:``.
+/// - ``MPSGraph/LSTMWithSourceTensor:recurrentWeight:initState:initCell:descriptor:name:``
+/// - ``MPSGraph/LSTMWithSourceTensor:recurrentWeight:inputWeight:bias:initState:initCell:descriptor:name:``
+/// - ``MPSGraph/LSTMWithSourceTensor:recurrentWeight:inputWeight:bias:initState:initCell:mask:peephole:descriptor:name:``
+/// - ``MPSGraph/LSTMGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:cellOutputFwd:descriptor:name:``
+/// - ``MPSGraph/LSTMGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:cellOutputFwd:inputWeight:bias:initState:initCell:descriptor:name:``
+/// - ``MPSGraph/LSTMGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:cellOutputFwd:inputWeight:bias:initState:initCell:mask:descriptor:name:``
+/// - ``MPSGraph/LSTMGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:cellOutputFwd:stateGradient:cellGradient:inputWeight:bias:initState:initCell:mask:peephole:descriptor:name:``
MPS_CLASS_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4))
@interface MPSGraphLSTMDescriptor : MPSGraphObject<NSCopying>
@@ -105,7 +105,7 @@
/// Default value: `NO`.
@property (readwrite, nonatomic) BOOL produceCell;
-/// A parameter that makes the LSTM layer support training.
+/// A parameter that enables the LSTM layer to support training.
///
/// If set to `YES` then the layer will produce training state tensor as a secondary output.
/// Default value: `NO`.
@@ -117,23 +117,28 @@
/// Default value: `NO`
@property (readwrite, nonatomic) BOOL forgetGateLast;
-/// A parameter which defines the activation function used with the input gate of the LSTM operation.
+/// A parameter that defines the activation function used with the input gate of the LSTM operation.
+///
/// Default value: `MPSGraphRNNActivationSigmoid`.
@property (readwrite, nonatomic) MPSGraphRNNActivation inputGateActivation;
-/// A parameter which defines the activation function used with the forget gate of the LSTM operation.
+/// A parameter that defines the activation function used with the forget gate of the LSTM operation.
+///
/// Default value: `MPSGraphRNNActivationSigmoid`.
@property (readwrite, nonatomic) MPSGraphRNNActivation forgetGateActivation;
-/// A parameter which defines the activation function used with the cell gate of the LSTM operation.
+/// A parameter that defines the activation function used with the cell gate of the LSTM operation.
+///
/// Default value: `MPSGraphRNNActivationTanh`.
@property (readwrite, nonatomic) MPSGraphRNNActivation cellGateActivation;
-/// A parameter which defines the activation function used with the output gate of the LSTM operation.
+/// A parameter that defines the activation function used with the output gate of the LSTM operation.
+///
/// Default value: `MPSGraphRNNActivationSigmoid`.
@property (readwrite, nonatomic) MPSGraphRNNActivation outputGateActivation;
-/// A parameter which defines the activation function used with the current cell value of the LSTM operation.
+/// A parameter that defines the activation function used with the current cell value of the LSTM operation.
+///
/// Default value: `MPSGraphRNNActivationTanh`.
@property (readwrite, nonatomic) MPSGraphRNNActivation activation;
@@ -142,19 +147,19 @@
@end
-/// This class defines parameters for a Gated Recurrent Unit (GRU) operation.
+/// The class that defines the parameters for a gated recurrent unit (GRU) operation.
///
/// Use this descriptor with the following ``MPSGraph`` methods:
-/// - ``MPSGraph/GRUWithSourceTensor:recurrentWeight:inputWeight:bias:descriptor:name:``,
-/// - ``MPSGraph/GRUWithSourceTensor:recurrentWeight:inputWeight:bias:initState:descriptor:name:``,
-/// - ``MPSGraph/GRUWithSourceTensor:recurrentWeight:inputWeight:bias:initState:mask:secondaryBias:descriptor:name:``,
-/// - ``MPSGraph/GRUGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:outputFwd:inputWeight:bias:descriptor:name:``,
-/// - ``MPSGraph/GRUGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:outputFwd:inputWeight:bias:initState:descriptor:name:`` and
-/// - ``MPSGraph/GRUGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:outputFwd:stateGradient:inputWeight:bias:initState:mask:secondaryBias:descriptor:name:``.
+/// - ``MPSGraph/GRUWithSourceTensor:recurrentWeight:inputWeight:bias:descriptor:name:``
+/// - ``MPSGraph/GRUWithSourceTensor:recurrentWeight:inputWeight:bias:initState:descriptor:name:``
+/// - ``MPSGraph/GRUWithSourceTensor:recurrentWeight:inputWeight:bias:initState:mask:secondaryBias:descriptor:name:``
+/// - ``MPSGraph/GRUGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:outputFwd:inputWeight:bias:descriptor:name:``
+/// - ``MPSGraph/GRUGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:outputFwd:inputWeight:bias:initState:descriptor:name:``
+/// - ``MPSGraph/GRUGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:outputFwd:stateGradient:inputWeight:bias:initState:mask:secondaryBias:descriptor:name:``
MPS_CLASS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0))
@interface MPSGraphGRUDescriptor : MPSGraphObject<NSCopying>
-/// A parameter that defines time direction of the input sequence.
+/// A parameter that defines the time direction of the input sequence.
///
/// If set to `YES` then the input sequence is passed in reverse time order to the layer.
/// Note: Ignored when `bidirectional = YES`.
@@ -168,7 +173,7 @@
/// Default value: `NO`.
@property (readwrite, nonatomic) BOOL bidirectional;
-/// A parameter that makes the GRU layer support training.
+/// A parameter that enables the GRU layer to support training.
///
/// If set to `YES` then the layer will produce training state tensor as a secondary output.
/// Default value: `NO`.
@@ -194,15 +199,18 @@
/// Default value: `NO`.
@property (readwrite, nonatomic) BOOL flipZ;
-/// A parameter which defines the activation function to use with the z-gate of the GRU op.
+/// A parameter that defines the activation function to use with the update-gate of the GRU operation.
+///
/// Default value: `MPSGraphRNNActivationSigmoid`.
@property (readwrite, nonatomic) MPSGraphRNNActivation updateGateActivation;
-/// A parameter which defines the activation function to use with the r-gate of the GRU op.
+/// A parameter that defines the activation function to use with the reset-gate of the GRU operation.
+///
/// Default value: `MPSGraphRNNActivationSigmoid`.
@property (readwrite, nonatomic) MPSGraphRNNActivation resetGateActivation;
-/// A parameter which defines the activation function to use with the o-gate of the GRU op.
+/// A parameter that defines the activation function to use with the output-gate of the GRU operation.
+///
/// Default value: `MPSGraphRNNActivationTanh`.
@property (readwrite, nonatomic) MPSGraphRNNActivation outputGateActivation;
@@ -250,7 +258,7 @@
MPS_SWIFT_NAME( singleGateRNN(_:recurrentWeight:inputWeight:bias:initState:mask:descriptor:name:))
MPS_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4));
-/// Creates a single-gate RNN operation and returns the value and optionally training state tensor.
+/// Creates a single-gate RNN operation and returns the value and optionally the training state tensor.
///
/// This operation returns tensors `h` and optionally `z` that are defined recursively as follows:
/// ```md
@@ -284,7 +292,7 @@
MPS_SWIFT_NAME( singleGateRNN(_:recurrentWeight:inputWeight:bias:initState:descriptor:name:))
MPS_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4));
-/// Creates a single-gate RNN operation and returns the value and optionally training state tensor.
+/// Creates a single-gate RNN operation and returns the value and optionally the training state tensor.
///
/// This operation returns tensors `h` and optionally `z` that are defined recursively as follows:
/// ```md
@@ -458,7 +466,7 @@
MPS_SWIFT_NAME( singleGateRNNGradients(_:recurrentWeight:sourceGradient:zState:initState:descriptor:name:))
MPS_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4));
-/// Creates an LSTM operation and returns the value tensor and optionally the cell state tensor and optionally the training state tensor.
+/// Creates an LSTM operation and returns the value tensor and optionally the cell state tensor and the training state tensor.
///
/// This operation returns tensors `h` and optionally `c` and optionally `z` that are defined recursively as follows:
/// ```md
@@ -502,7 +510,7 @@
MPS_SWIFT_NAME( LSTM(_:recurrentWeight:inputWeight:bias:initState:initCell:mask:peephole:descriptor:name:))
MPS_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4));
-/// Creates an LSTM operation and returns the value tensor and optionally the cell state tensor and optionally the training state tensor.
+/// Creates an LSTM operation and returns the value tensor and optionally the cell state tensor and the training state tensor.
///
/// This operation returns tensors `h` and optionally `c` and optionally `z` that are defined recursively as follows:
/// ```md
@@ -542,7 +550,7 @@
MPS_SWIFT_NAME( LSTM(_:recurrentWeight:inputWeight:bias:initState:initCell:descriptor:name:))
MPS_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4));
-/// Creates an LSTM operation and returns the value tensor and optionally the cell state tensor and optionally the training state tensor.
+/// Creates an LSTM operation and returns the value tensor and optionally the cell state tensor and the training state tensor.
///
/// This operation returns tensors `h` and optionally `c` and optionally `z` that are defined recursively as follows:
/// ```md
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphRandomOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphRandomOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphRandomOps.h 2024-03-22 20:46:15
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphRandomOps.h 2024-05-30 11:26:36
@@ -13,18 +13,18 @@
NS_ASSUME_NONNULL_BEGIN
-/// The distributions supported by MPSGraphRandom ops.
+/// The distributions supported by random operations.
typedef NS_ENUM(uint64_t, MPSGraphRandomDistribution)
{
/// The uniform distribution, with samples drawn uniformly from [min, max) for float types, and [min, max] for integer types.
MPSGraphRandomDistributionUniform MPS_ENUM_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4)) MPS_SWIFT_NAME(uniform) = 0,
- /// The normal distribution defined by mean and standardDeviation.
+ /// The normal distribution defined by mean and standard deviation.
MPSGraphRandomDistributionNormal MPS_ENUM_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4)) = 1L,
- /// The normal distribution defined by mean and standardDeviation, truncated to the range [min, max)
+ /// The normal distribution defined by mean and standard deviation, truncated to the range [min, max)
MPSGraphRandomDistributionTruncatedNormal MPS_ENUM_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4)) = 2L,
};
-/// Specify what sampling method to use when generating values in the normal distribution.
+/// The sampling method to use when generating values in the normal distribution.
typedef NS_ENUM(uint64_t, MPSGraphRandomNormalSamplingMethod)
{
/// Use inverse erf to convert uniform values to values in the normal distribution
@@ -33,6 +33,7 @@
MPSGraphRandomNormalSamplingBoxMuller MPS_ENUM_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4)) = 1L,
};
+/// A class that describes the random operation.
@interface MPSGraphRandomOpDescriptor : MPSGraphObject<NSCopying>
/// The type of distribution to draw samples from. See MPSGraphRandomDistribution.
@@ -40,51 +41,67 @@
@property (readwrite, nonatomic) MPSGraphRandomDistribution distribution;
/// The data type of the generated result values.
-/// When sampling from the uniform distribution, valid types are MPSDataTypeFloat16,
-/// MPSDataTypeFloat32, and MPSDataTypeInt32.
+///
+/// When sampling from the uniform distribution, valid types are MPSDataTypeFloat16,
+/// MPSDataTypeFloat32, and MPSDataTypeInt32.
/// When sampling from the normal or truncated normal distribution, valid types are
/// MPSDataTypeFloat16 and MPSDataTypeFloat32.
///
@property (readwrite, nonatomic) MPSDataType dataType;
-/// The lower range of the distribution. This value is used for Uniform distributions with float data types and Truncated Normal disributions.
-/// Defaults to 0 for uniform distributions and -2 for normal distributions.
+/// The lower range of the distribution.
///
+/// This value is used for Uniform distributions with float data types and Truncated Normal disributions.
+/// Defaults to 0 for uniform distributions and -2 for normal distributions.
+///
@property (readwrite, nonatomic) float min;
-/// The upper range of the distribution. This value is used for Uniform distributions with float data types and Truncated Normal disributions.
-/// Defaults to 1 for uniform distributions and 2 for normal distributions.
+/// The upper range of the distribution.
///
+/// This value is used for Uniform distributions with float data types and Truncated Normal disributions.
+/// Defaults to 1 for uniform distributions and 2 for normal distributions.
+///
@property (readwrite, nonatomic) float max;
-/// The lower range of the distribution. This value is used for Uniform with integer data types
-/// Defaults to 0.
+/// The lower range of the distribution.
///
+/// This value is used for Uniform with integer data types
+/// Defaults to 0.
+///
@property (readwrite, nonatomic) NSInteger minInteger;
-/// The upper range of the distribution. This value is used for Uniform with integer data types
-/// Defaults to INT32_MAX for uniform distributions and 0 for normal distributions.
+/// The upper range of the distribution.
///
+/// This value is used for Uniform with integer data types
+/// Defaults to INT32_MAX for uniform distributions and 0 for normal distributions.
+///
@property (readwrite, nonatomic) NSInteger maxInteger;
-/// The mean of the distribution. This value is used for Normal and Truncated Normal disributions.
-/// Defaults to 0.
+/// The mean of the distribution.
///
+/// This value is used for Normal and Truncated Normal disributions.
+/// Defaults to 0.
+///
@property (readwrite, nonatomic) float mean;
-/// The standardDeviation of the distribution. This value is used for Normal and Truncated Normal disributions.
-/// For Truncated Normal distribution this defines the standard deviation parameter of the underlying Normal distribution, that is the width
+/// The standard deviation of the distribution.
+///
+/// This value is used for Normal and Truncated Normal disributions.
+/// For Truncated Normal distribution this defines the standard deviation parameter of the underlying Normal distribution, that is the width
/// of the Gaussian, not the true standard deviation of the truncated distribution which typically differs from the standard deviation of the
/// original Normal distribution.
/// Defaults to 0 for uniform distributions and 1 for normal distributions.
///
@property (readwrite, nonatomic) float standardDeviation;
-/// The sampling method of the distribution. This value is used for Normal and Truncated Normal disributions. See MPSGraphRandomNormalSamplingMethod.
-/// Defaults to MPSGraphRandomNormalSamplingInvCDF.
+/// The sampling method of the distribution.
///
+/// This value is used for Normal and Truncated Normal disributions. See MPSGraphRandomNormalSamplingMethod.
+/// Defaults to MPSGraphRandomNormalSamplingInvCDF.
+///
@property (readwrite, nonatomic) MPSGraphRandomNormalSamplingMethod samplingMethod;
+/// Class method to initialize a distribution descriptor.
+(nullable instancetype) descriptorWithDistribution:(MPSGraphRandomDistribution) distribution
dataType:(MPSDataType) dataType;
@@ -93,7 +110,7 @@
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(MPSGraphRandomOps)
-/// Creates an MPSGraphTensor representing state using the Philox algorithm with given counter and key values.
+/// Creates a tensor representing state using the Philox algorithm with given counter and key values.
///
/// Generates random numbers using the Philox counter-based algorithm, for further details see:
/// John K. Salmon, Mark A. Moraes, Ron O. Dror, and David E. Shaw. Parallel Random Numbers: As Easy as 1, 2, 3.
@@ -117,7 +134,7 @@
- (MPSGraphTensor *) randomPhiloxStateTensorWithSeed:(NSUInteger) seed
name:(NSString * _Nullable) name;
-/// Creates an MPSGraphTensor representing state using the Philox algorithm with given counter and key values.
+/// Creates a tensor representing state using the Philox algorithm with given counter and key values.
///
/// See randomPhiloxStateTensorWithSeed.
///
@@ -132,7 +149,7 @@
key:(NSUInteger) key
name:(NSString * _Nullable) name;
-/// Create Random op of type matching distribution in descriptor and return random values
+/// Creates a Random op of type matching distribution in descriptor and returns random values.
///
/// Returns a tensor of provided shape of random values in the distribution specified. Uses a random seed value
/// to initalize state. No state is preserved, and subsequent calls are not guaranteed to result in a unique stream of
@@ -141,12 +158,13 @@
/// - Parameters:
/// - shape: The shape of the tensor generated
/// - descriptor: The descriptor of the distribution. See MPSGraphRandomOpDescriptor.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: An MPSGraphTensor of shape containing random values in the defined range.
- (MPSGraphTensor *) randomTensorWithShape:(MPSShape *) shape
descriptor:(MPSGraphRandomOpDescriptor *) descriptor
name:(NSString * _Nullable) name;
-/// Create Random op of type matching distribution in descriptor and return random values
+
+/// Creates a Random op of type matching distribution in descriptor and returns random values.
///
/// Returns a tensor of provided shape of random values in the distribution specified. Uses a random seed value
/// to initalize state. No state is preserved, and subsequent calls are not guaranteed to result in a unique stream of
@@ -155,13 +173,13 @@
/// - Parameters:
/// - shapeTensor: 1D Int32 or Int64 tensor. The shape of the tensor generated
/// - descriptor: The descriptor of the distribution. See MPSGraphRandomOpDescriptor.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: An MPSGraphTensor of shape containing random values in the defined range.
- (MPSGraphTensor *) randomTensorWithShapeTensor:(MPSGraphTensor *) shapeTensor
descriptor:(MPSGraphRandomOpDescriptor *) descriptor
name:(NSString * _Nullable) name;
-/// Create Random op of type matching distribution in descriptor and return random values
+/// Creates a Random op of type matching distribution in descriptor and returns random values.
///
/// Returns a tensor of provided shape of random values in the distribution specified. Uses the provided seed value
/// to initalize state. No state is preserved, and all calls with equal seed yield an identical stream of random values.
@@ -170,13 +188,14 @@
/// - shape: The shape of the tensor generated
/// - descriptor: The descriptor of the distribution. See MPSGraphRandomOpDescriptor.
/// - seed: The seed to use to initialize state. All calls with equal seed yield an identical stream of random values.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: An MPSGraphTensor of shape containing random values in the defined range.
- (MPSGraphTensor *) randomTensorWithShape:(MPSShape *) shape
descriptor:(MPSGraphRandomOpDescriptor *) descriptor
seed:(NSUInteger) seed
name:(NSString * _Nullable) name;
-/// Create Random op of type matching distribution in descriptor and return random values
+
+/// Creates a Random op of type matching distribution in descriptor and returns random values.
///
/// Returns a tensor of provided shape of random values in the distribution specified. Uses the provided seed value
/// to initalize state. No state is preserved, and all calls with equal seed yield an identical stream of random values.
@@ -185,14 +204,14 @@
/// - shapeTensor: 1D Int32 or Int64 tensor. The shape of the tensor generated
/// - descriptor: The descriptor of the distribution. See MPSGraphRandomOpDescriptor.
/// - seed: The seed to use to initialize state. All calls with equal seed yield an identical stream of random values.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: An MPSGraphTensor of shape containing random values in the defined range.
- (MPSGraphTensor *) randomTensorWithShapeTensor:(MPSGraphTensor *) shapeTensor
descriptor:(MPSGraphRandomOpDescriptor *) descriptor
seed:(NSUInteger) seed
name:(NSString * _Nullable) name;
-/// Create Random op of type matching distribution in descriptor, and return random values and updated state
+/// Creates a Random op of type matching distribution in descriptor, and returns random values and updated state.
///
/// Returns an array of 2 tensors, where the first is of provided shape of random values in the distribution specified,
/// and the second is the updated state tensor.
@@ -205,14 +224,14 @@
/// - shape: The shape of the tensor generated
/// - descriptor: The descriptor of the distribution. See MPSGraphRandomOpDescriptor.
/// - state: The state to define a stream of random values. All calls with equal state yield an identical stream of random values.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: An array of MPSGraphTensor of size 2. The first MPSGraphTensor is of shape containing random values in the defined range.
/// The second MPSGraphTensor is the updated state tensor.
- (NSArray<MPSGraphTensor *> *) randomTensorWithShape:(MPSShape *) shape
descriptor:(MPSGraphRandomOpDescriptor *) descriptor
stateTensor:(MPSGraphTensor *) state
name:(NSString * _Nullable) name;
-/// Create Random op of type matching distribution in descriptor, and return random values and updated state
+/// Creates a Random op of type matching distribution in descriptor, and returns random values and updated state.
///
/// Returns an array of 2 tensors, where the first is of provided shape of random values in the distribution specified,
/// and the second is the updated state tensor.
@@ -222,10 +241,10 @@
/// random calls to continue sampling from the stream.
///
/// - Parameters:
-/// - shapeTensor: 1D Int32 or Int64 tensor. The shape of the tensor generated
+/// - shapeTensor: 1D Int32 or Int64 tensor. The shape of the tensor generated.
/// - descriptor: The descriptor of the distribution. See MPSGraphRandomOpDescriptor.
/// - state: The state to define a stream of random values. All calls with equal state yield an identical stream of random values.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: An array of MPSGraphTensor of size 2. The first MPSGraphTensor is of shape containing random values in the defined range.
/// The second MPSGraphTensor is the updated state tensor.
- (NSArray<MPSGraphTensor *> *) randomTensorWithShapeTensor:(MPSGraphTensor *) shapeTensor
@@ -233,7 +252,7 @@
stateTensor:(MPSGraphTensor *) state
name:(NSString * _Nullable) name;
-/// Create RandomUniform op and return random uniform values
+/// Creates a RandomUniform operation and returns random uniform values
///
/// Returns a tensor of provided shape of random uniform values in the range [0.0, 1.0). Uses a random seed value
/// to initalize state. No state is preserved, and subsequent calls are not guaranteed to result in a unique stream of
@@ -241,11 +260,11 @@
///
/// - Parameters:
/// - shape: The shape of the tensor generated
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: An MPSGraphTensor of shape containing random values in the defined range.
- (MPSGraphTensor *) randomUniformTensorWithShape:(MPSShape *) shape
name:(NSString * _Nullable) name;
-/// Create RandomUniform op and return random uniform values
+/// Creates a RandomUniform operation and returns random uniform values
///
/// Returns a tensor of provided shape of random uniform values in the range [0.0, 1.0). Uses a random seed value
/// to initalize state. No state is preserved, and subsequent calls are not guaranteed to result in a unique stream of
@@ -253,12 +272,12 @@
///
/// - Parameters:
/// - shapeTensor: 1D Int32 or Int64 tensor. The shape of the tensor generated
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: An MPSGraphTensor of shape containing random values in the defined range.
- (MPSGraphTensor *) randomUniformTensorWithShapeTensor:(MPSGraphTensor *) shapeTensor
name:(NSString * _Nullable) name;
-/// Create RandomUniform op and return random uniform values
+/// Creates a RandomUniform operation and returns random uniform values
///
/// Returns a tensor of provided shape of random uniform values in the range [0.0, 1.0). Uses the provided seed value
/// to initalize state. No state is preserved, and all calls with equal seed yield an identical stream of random values.
@@ -266,12 +285,12 @@
/// - Parameters:
/// - shape: The shape of the tensor generated
/// - seed: The seed to use to initialize state. All calls with equal seed yield an identical stream of random values.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: An MPSGraphTensor of shape containing random values in the defined range.
- (MPSGraphTensor *) randomUniformTensorWithShape:(MPSShape *) shape
seed:(NSUInteger) seed
name:(NSString * _Nullable) name;
-/// Create RandomUniform op and return random uniform values
+/// Creates a RandomUniform operation and returns random uniform values
///
/// Returns a tensor of provided shape of random uniform values in the range [0.0, 1.0). Uses the provided seed value
/// to initalize state. No state is preserved, and all calls with equal seed yield an identical stream of random values.
@@ -279,13 +298,13 @@
/// - Parameters:
/// - shapeTensor: 1D Int32 or Int64 tensor. The shape of the tensor generated
/// - seed: The seed to use to initialize state. All calls with equal seed yield an identical stream of random values.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: An MPSGraphTensor of shape containing random values in the defined range.
- (MPSGraphTensor *) randomUniformTensorWithShapeTensor:(MPSGraphTensor *) shapeTensor
seed:(NSUInteger) seed
name:(NSString * _Nullable) name;
-/// Create RandomUniform op and return random uniform values and updated state
+/// Creates a RandomUniform operation and returns random uniform values and updated state
///
/// Returns an array of 2 tensors, where the first is a tensor of provided shape of random uniform values in the range
/// [0.0, 1.0), and the second is the updated state tensor.
@@ -297,13 +316,13 @@
/// - Parameters:
/// - shape: The shape of the tensor generated
/// - state: The state to define a stream of random values. All calls with equal state yield an identical stream of random values.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: An array of MPSGraphTensor of size 2. The first MPSGraphTensor is of shape containing random values in the defined range.
/// The second MPSGraphTensor is the updated state tensor.
- (NSArray<MPSGraphTensor *> *) randomUniformTensorWithShape:(MPSShape *) shape
stateTensor:(MPSGraphTensor *) state
name:(NSString * _Nullable) name;
-/// Create RandomUniform op and return random uniform values and updated state
+/// Creates a RandomUniform operation and returns random uniform values and updated state
///
/// Returns an array of 2 tensors, where the first is a tensor of provided shape of random uniform values in the range
/// [0.0, 1.0), and the second is the updated state tensor.
@@ -315,35 +334,35 @@
/// - Parameters:
/// - shapeTensor: 1D Int32 or Int64 tensor. The shape of the tensor generated
/// - state: The state to define a stream of random values. All calls with equal state yield an identical stream of random values.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: An array of MPSGraphTensor of size 2. The first MPSGraphTensor is of shape containing random values in the defined range.
/// The second MPSGraphTensor is the updated state tensor.
- (NSArray<MPSGraphTensor *> *) randomUniformTensorWithShapeTensor:(MPSGraphTensor *) shapeTensor
stateTensor:(MPSGraphTensor *) state
name:(NSString * _Nullable) name;
-/// Creates a dropout op and return the result
+/// Creates a dropout operation and returns the result
///
/// Removes values in the `tensor` with a percentage chance equal to `rate`. Removed values are set to 0
///
/// - Parameters:
/// - tensor: Input tensor
/// - rate: The rate of values to be set to 0
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
- (MPSGraphTensor *) dropoutTensor:(MPSGraphTensor *) tensor
rate:(double) rate
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( dropout(_:rate:name:) );
-/// Creates a dropout op and return the result
+/// Creates a dropout operation and returns the result
///
/// Removes values in the `tensor` with a percentage chance equal to `rate`. Removed values are set to 0
///
/// - Parameters:
/// - tensor: Input tensor
/// - rate: The rate of values to be set to 0
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
- (MPSGraphTensor *) dropoutTensor:(MPSGraphTensor *) tensor
rateTensor:(MPSGraphTensor *) rate
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphReductionOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphReductionOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphReductionOps.h 2024-03-22 20:46:16
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphReductionOps.h 2024-05-30 04:58:36
@@ -16,7 +16,7 @@
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(MPSGraphReductionOps)
-/// Create reduction sum op and return the result tensor.
+/// Creates a reduction sum operation and returns the result tensor.
///
/// - Parameters:
/// - tensor: input tensor
@@ -27,7 +27,7 @@
axis:(NSInteger) axis
name:(NSString * _Nullable) name;
-/// Create reduction sum op and return the result tensor.
+/// Creates a reduction sum operation and returns the result tensor.
///
/// - Parameters:
/// - tensor: input tensor
@@ -38,7 +38,7 @@
axes:(NSArray<NSNumber *> *_Nullable)axes
name:(NSString *_Nullable)name;
-/// Create reduction max op and return the result tensor.
+/// Creates a reduction max operation and returns the result tensor.
///
/// - Parameters:
/// - tensor: input tensor
@@ -49,7 +49,7 @@
axis:(NSInteger) axis
name:(NSString * _Nullable) name;
-/// Create reduction max op and return the result tensor.
+/// Creates a reduction max operation and returns the result tensor.
///
/// - Parameters:
/// - tensor: input tensor
@@ -60,7 +60,7 @@
axes:(NSArray<NSNumber *> *_Nullable)axes
name:(NSString *_Nullable)name;
-/// Create reduction minimum op and return the result tensor.
+/// Creates a reduction minimum operation and returns the result tensor.
///
/// - Parameters:
/// - tensor: input tensor
@@ -71,7 +71,7 @@
axis:(NSInteger) axis
name:(NSString * _Nullable) name;
-/// Create reduction min op and return the result tensor.
+/// Creates a reduction min operation and returns the result tensor.
///
/// - Parameters:
/// - tensor: input tensor
@@ -82,7 +82,7 @@
axes:(NSArray<NSNumber *> *_Nullable)axes
name:(NSString *_Nullable)name;
-/// Create reduction max propagate NaN op and return the result tensor.
+/// Creates a reduction max propagate NaN operation and returns the result tensor.
///
/// - Parameters:
/// - tensor: input tensor
@@ -93,7 +93,7 @@
axis:(NSInteger) axis
name:(NSString * _Nullable) name;
-/// Create reduction max propagate NaN op and return the result tensor.
+/// Creates a reduction max propagate NaN operation and returns the result tensor.
///
/// - Parameters:
/// - tensor: input tensor
@@ -104,7 +104,7 @@
axes:(NSArray<NSNumber *> *_Nullable)axes
name:(NSString *_Nullable)name;
-/// Create reduction min propagate NaN op and return the result tensor.
+/// Creates a reduction min propagate NaN operation and returns the result tensor.
///
/// - Parameters:
/// - tensor: input tensor
@@ -115,7 +115,7 @@
axis:(NSInteger) axis
name:(NSString * _Nullable) name;
-/// Create reduction min propagate NaN op and return the result tensor.
+/// Creates a reduction min propagate NaN operation and returns the result tensor.
///
/// - Parameters:
/// - tensor: input tensor
@@ -126,7 +126,7 @@
axes:(NSArray<NSNumber *> *_Nullable)axes
name:(NSString *_Nullable)name;
-/// Create reduction product op and return the result tensor.
+/// Creates a reduction product operation and returns the result tensor.
///
/// - Parameters:
/// - tensor: input tensor
@@ -138,7 +138,7 @@
name:(NSString * _Nullable) name;
-/// Create reduction product op and return the result tensor.
+/// Creates a reduction product operation and returns the result tensor.
///
/// - Parameters:
/// - tensor: input tensor
@@ -149,7 +149,7 @@
axes:(NSArray<NSNumber *> *_Nullable)axes
name:(NSString *_Nullable)name;
-/// Create reduction argMax op and return the result tensor.
+/// Creates a reduction argMax operation and returns the result tensor.
///
/// - Parameters:
/// - tensor: input tensor
@@ -161,7 +161,7 @@
name:(NSString *_Nullable)name
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), macCatalyst(15.0), tvos(15.0));
-/// Create reduction argMin op and return the result tensor.
+/// Creates a reduction argMin operation and returns the result tensor.
///
/// - Parameters:
/// - tensor: input tensor
@@ -173,7 +173,7 @@
name:(NSString *_Nullable)name
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), macCatalyst(15.0), tvos(15.0));
-/// Create reduction and op and return the result tensor.
+/// Creates a reduction and operation and returns the result tensor.
///
/// - Parameters:
/// - tensor: input tensor
@@ -186,7 +186,7 @@
MPS_AVAILABLE_STARTING(macos(12.2), ios(15.3), macCatalyst(15.3), tvos(15.3));
-/// Create reduction and op and return the result tensor.
+/// Creates a reduction and operation and returns the result tensor.
///
/// - Parameters:
/// - tensor: input tensor
@@ -198,7 +198,7 @@
name:(NSString *_Nullable)name
MPS_AVAILABLE_STARTING(macos(12.2), ios(15.3), macCatalyst(15.3), tvos(15.3));
-/// Create reduction or op and return the result tensor.
+/// Creates a reduction or operation and returns the result tensor.
///
/// - Parameters:
/// - tensor: input tensor
@@ -211,7 +211,7 @@
MPS_AVAILABLE_STARTING(macos(12.2), ios(15.3), macCatalyst(15.3), tvos(15.3));
-/// Create reduction or op and return the result tensor.
+/// Creates a reduction or operation and returns the result tensor.
///
/// - Parameters:
/// - tensor: input tensor
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphResizeOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphResizeOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphResizeOps.h 2024-03-22 20:57:13
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphResizeOps.h 2024-05-30 05:56:18
@@ -40,7 +40,7 @@
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(MPSGraphResizeOps)
-/// Create Resize op and return the result tensor
+/// Creates a Resize operation and returns the result tensor.
///
/// Resamples input images to given size. Result images will be distorted if size is of different aspect ratio.
/// Resize supports the following modes:
@@ -69,7 +69,7 @@
/// - centerResult: Controls if the result image is centered on the input image. When NO, the result will have the top left corner aligned
/// - alignCorners: When YES, the result image will have the same value as the input image in the corners
/// - layout: Specifies what layout the provided tensor is in. The returned tensor will follow the same layout. Valid layouts are NHWC, NCHW, HWC, CHW, and HW.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeTensor:(MPSGraphTensor *) imagesTensor
size:(MPSShape *) size
@@ -80,7 +80,7 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( resize(_:size:mode:centerResult:alignCorners:layout:name:) );
-/// Create Resize op and return the result tensor
+/// Creates a Resize operation and returns the result tensor.
///
/// Resamples input images to given size. Result images will be distorted if size is of different aspect ratio.
/// Resize supports the following modes:
@@ -109,7 +109,7 @@
/// - centerResult: Controls if the result image is centered on the input image. When NO, the result will have the top left corner aligned
/// - alignCorners: When YES, the result image will have the same value as the input image in the corners
/// - layout: Specifies what layout the provided tensor is in. The returned tensor will follow the same layout. Valid layouts are NHWC, NCHW, HWC, CHW, and HW.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeTensor:(MPSGraphTensor *) imagesTensor
sizeTensor:(MPSGraphTensor *) size
@@ -121,7 +121,7 @@
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
MPS_SWIFT_NAME( resize(_:sizeTensor:mode:centerResult:alignCorners:layout:name:) );
-/// Create Resize op and return the result tensor
+/// Creates a Resize operation and returns the result tensor.
///
/// Resamples input images to given size. Result images will be distorted if size is of different aspect ratio.
/// Resize supports the following modes:
@@ -149,7 +149,7 @@
/// - mode: The resampling mode to use. If nearest sampling is specifed, RoundPreferCeil mode will be used.
/// - centerResult: Controls if the result image is centered on the input image. When NO, the result will have the top left corner aligned
/// - alignCorners: When YES, the result image will have the same value as the input image in the corners
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeTensor:(MPSGraphTensor *) imagesTensor
sizeTensor:(MPSGraphTensor *) size
@@ -160,10 +160,29 @@
MPS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0))
MPS_SWIFT_NAME( resize(_:sizeTensor:mode:centerResult:alignCorners:name:) );
-/// Resamples input images to given size using nearest neighbor sampling. This API allows for
-/// the rounding mode to be specified.
-/// See above discussion for more details.
+/// Resamples input images to given size using nearest neighbor sampling.
///
+/// This API allows for the rounding mode to be specified.
+/// Resamples input images to given size. Result images will be distorted if size is of different aspect ratio.
+/// Resize supports the following modes:
+/// Nearest Neighbor - values are interpolated using the closest neighbor pixel
+/// Bilinear - values are computed using bilinear interpolation of 4 neighboring pixels
+/// Destination indices are computed using direct index scaling by default, with no offset added.
+/// If the centerResult parameter is true, the destination indices will be scaled and shifted to be centered
+/// on the input image.
+/// If the alignCorners parameter is true, the corners of the result images will match the input images.
+/// Scaling will be modified to a factor of (size - 1) / (inputSize - 1). When alignCorners is true, the
+/// centerResult parameter does nothing.
+/// In order to achieve the same behavior as OpenCV's resize and TensorFlowV2's resize,
+/// ```md
+/// centerResult = YES;
+/// alginCorners = NO;
+/// ```
+/// To achieve the same behavior as TensorFlowV1 resize
+/// ```md
+/// centerResult = NO;
+/// ```
+///
/// - Parameters:
/// - imagesTensor: Tensor containing input images.
/// - size: 1D Int32 or Int64 tensor. A 2-element shape as [newHeight, newWidth]
@@ -171,7 +190,7 @@
/// - centerResult: Controls if the result image is centered on the input image. When NO, the result will have the top left corner aligned
/// - alignCorners: When YES, the result image will have the same value as the input image in the corners
/// - layout: Specifies what layout the provided tensor is in. The returned tensor will follow the same layout. Valid layouts are NHWC, NCHW, HWC, CHW, and HW.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeNearestWithTensor:(MPSGraphTensor *) imagesTensor
sizeTensor:(MPSGraphTensor *) size
@@ -183,7 +202,7 @@
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0))
MPS_SWIFT_NAME( resizeNearest(_:sizeTensor:nearestRoundingMode:centerResult:alignCorners:layout:name:) );
-/// Create Resize op and return the result tensor
+/// Creates a Resize operation and returns the result tensor.
///
/// Resamples input images to given size using nearest neighbor sampling. Result images will be distorted if
/// size is of different aspect ratio.
@@ -209,7 +228,7 @@
/// - nearestRoundingMode: The rounding mode to use when using nearest resampling. Default is roundPreferCeil.
/// - centerResult: Controls if the result image is centered on the input image. When NO, the result will have the top left corner aligned
/// - alignCorners: When YES, the result image will have the same value as the input image in the corners
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeNearestWithTensor:(MPSGraphTensor *) imagesTensor
sizeTensor:(MPSGraphTensor *) size
@@ -221,7 +240,24 @@
MPS_SWIFT_NAME( resizeNearest(_:sizeTensor:nearestRoundingMode:centerResult:alignCorners:name:) );
/// Resamples input images to given size using bilinear sampling.
-/// See above discussion for more details.
+///
+/// Resamples input images to given size using nearest neighbor sampling. Result images will be distorted if
+/// size is of different aspect ratio.
+/// Destination indices are computed using direct index scaling by default, with no offset added.
+/// If the centerResult parameter is true, the destination indices will be scaled and shifted to be centered
+/// on the input image.
+/// If the alignCorners parameter is true, the corners of the result images will match the input images.
+/// Scaling will be modified to a factor of (size - 1) / (inputSize - 1). When alignCorners is true, the
+/// centerResult parameter does nothing.
+/// In order to achieve the same behavior as OpenCV's resize and TensorFlowV2's resize,
+/// ```md
+/// centerResult = YES;
+/// alginCorners = NO;
+/// ```
+/// To achieve the same behavior as TensorFlowV1 resize
+/// ```md
+/// centerResult = NO;
+/// ```
///
/// - Parameters:
/// - imagesTensor: Tensor containing input images.
@@ -229,7 +265,7 @@
/// - centerResult: Controls if the result image is centered on the input image. When NO, the result will have the top left corner aligned
/// - alignCorners: When YES, the result image will have the same value as the input image in the corners
/// - layout: Specifies what layout the provided tensor is in. The returned tensor will follow the same layout. Valid layouts are NHWC, NCHW, HWC, CHW, and HW.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeBilinearWithTensor:(MPSGraphTensor *) imagesTensor
sizeTensor:(MPSGraphTensor *) size
@@ -240,7 +276,7 @@
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0))
MPS_SWIFT_NAME( resizeBilinear(_:sizeTensor:centerResult:alignCorners:layout:name:) );
-/// Create Resize op and return the result tensor
+/// Creates a Resize operation and returns the result tensor.
///
/// Resamples input images to given size using bilinear sampling. Result images will be distorted if
/// size is of different aspect ratio.
@@ -265,7 +301,7 @@
/// - size: The target size of the result tensor. 1D Int32 or Int64 tensor of size equal to rank of input.
/// - centerResult: Controls if the result image is centered on the input image. When NO, the result will have the top left corner aligned
/// - alignCorners: When YES, the result image will have the same value as the input image in the corners
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeBilinearWithTensor:(MPSGraphTensor *) imagesTensor
sizeTensor:(MPSGraphTensor *) size
@@ -289,7 +325,7 @@
/// - scaleOffset: 1D float tensor. A 4-element shape as [scaleY, scaleX, offsetY, offsetX]
/// - mode: The resampling mode to use. If nearest sampling is specifed, RoundPreferCeil mode will be used.
/// - layout: Specifies what layout the provided tensor is in. The returned tensor will follow the same layout. Valid layouts are NHWC, NCHW, HWC, CHW, and HW.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeTensor:(MPSGraphTensor *) imagesTensor
sizeTensor:(MPSGraphTensor *) size
@@ -300,7 +336,7 @@
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0))
MPS_SWIFT_NAME( resize(_:sizeTensor:scaleOffsetTensor:mode:layout:name:) );
-/// Create Resize op and return the result tensor
+/// Creates a Resize operation and returns the result tensor.
///
/// Resamples input images to given size using the provided scale and offset.
/// Destination indices are computed using
@@ -316,7 +352,7 @@
/// - scale: 1D float tensor of size equal to rank of input.
/// - offset: 1D float tensor of size equal to rank of input.
/// - mode: The resampling mode to use. If nearest sampling is specifed, RoundPreferCeil mode will be used.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeTensor:(MPSGraphTensor *) imagesTensor
sizeTensor:(MPSGraphTensor *) size
@@ -336,7 +372,7 @@
/// - scaleOffset: 1D float tensor. A 4-element shape as [scaleY, scaleX, offsetY, offsetX]
/// - nearestRoundingMode: The rounding mode to use when using nearest resampling.
/// - layout: Specifies what layout the provided tensor is in. The returned tensor will follow the same layout. Valid layouts are NHWC, NCHW, HWC, CHW, and HW.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeNearestWithTensor:(MPSGraphTensor *) imagesTensor
sizeTensor:(MPSGraphTensor *) size
@@ -347,7 +383,7 @@
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0))
MPS_SWIFT_NAME( resizeNearest(_:sizeTensor:scaleOffsetTensor:nearestRoundingMode:layout:name:) );
-/// Create Resize op and return the result tensor
+/// Creates a Resize operation and returns the result tensor.
///
/// Resamples input images to given size using the provided scale and offset and nearest neighbor sampling.
/// Destination indices are computed using
@@ -363,7 +399,7 @@
/// - scale: 1D float tensor of size equal to rank of input.
/// - offset: 1D float tensor of size equal to rank of input.
/// - nearestRoundingMode: The rounding mode to use when using nearest resampling. Default is roundPreferCeil.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeNearestWithTensor:(MPSGraphTensor *) imagesTensor
sizeTensor:(MPSGraphTensor *) size
@@ -383,7 +419,7 @@
/// - scaleOffset: 1D float tensor. A 4-element shape as [scaleY, scaleX, offsetY, offsetX]
/// - nearestRoundingMode: The rounding mode to use when using nearest resampling.
/// - layout: Specifies what layout the provided tensor is in. The returned tensor will follow the same layout. Valid layouts are NHWC, NCHW, HWC, CHW, and HW.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeBilinearWithTensor:(MPSGraphTensor *) imagesTensor
sizeTensor:(MPSGraphTensor *) size
@@ -393,7 +429,7 @@
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0))
MPS_SWIFT_NAME( resizeBilinear(_:sizeTensor:scaleOffsetTensor:layout:name:) );
-/// Create Resize op and return the result tensor
+/// Creates a Resize operation and returns the result tensor.
///
/// Resamples input images to given size using the provided scale and offset and bilinear sampling.
/// Destination indices are computed using
@@ -408,7 +444,7 @@
/// - size: The target size of the result tensor. 1D Int32 or Int64 tensor of size equal to rank of input.
/// - scale: 1D float tensor of size equal to rank of input.
/// - offset: 1D float tensor of size equal to rank of input.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeBilinearWithTensor:(MPSGraphTensor *) imagesTensor
sizeTensor:(MPSGraphTensor *) size
@@ -418,7 +454,7 @@
MPS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0))
MPS_SWIFT_NAME( resizeBilinear(_:sizeTensor:scaleTensor:offsetTensor:name:) );
-/// Create Resize gradient op and return the result tensor
+/// Creates a Resize gradient operation and returns the result tensor.
///
/// Computes the gradient for the forward pass Resize op with identical parameters.
/// See discussion of resizeTensor for more in depth description of resize paramters.
@@ -430,7 +466,7 @@
/// - centerResult: Controls if the result image is centered on the input image. When NO, the result will have the top left corner aligned
/// - alignCorners: When YES, the result image will have the same value as the input image in the corners
/// - layout: Specifies what layout the provided tensor is in. The returned tensor will follow the same layout. Valid layouts are NHWC, NCHW, HWC, CHW, and HW.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeWithGradientTensor:(MPSGraphTensor *) gradient
input:(MPSGraphTensor *) input
@@ -440,7 +476,7 @@
layout:(MPSGraphTensorNamedDataLayout) layout
name:(NSString * _Nullable) name;
-/// Create Resize gradient op and return the result tensor
+/// Creates a Resize gradient operation and returns the result tensor.
///
/// Computes the gradient for the forward pass Resize op with identical parameters.
/// See discussion of resizeTensor for more in depth description of resize paramters.
@@ -452,7 +488,7 @@
/// - centerResult: Controls if the result image is centered on the input image. When NO, the result will have the top left corner aligned
/// - alignCorners: When YES, the result image will have the same value as the input image in the corners
/// - layout: Specifies what layout the provided tensor is in. The returned tensor will follow the same layout. Valid layouts are NHWC, NCHW, HWC, CHW, and HW.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeNearestWithGradientTensor:(MPSGraphTensor *) gradient
input:(MPSGraphTensor *) input
@@ -463,7 +499,7 @@
name:(NSString * _Nullable) name
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Create Resize gradient op and return the result tensor
+/// Creates a Resize gradient operation and returns the result tensor.
///
/// Computes the gradient for the forward pass Resize op with identical parameters.
/// See discussion of resizeTensor for more in depth description of resize paramters.
@@ -474,7 +510,7 @@
/// - centerResult: Controls if the result image is centered on the input image. When NO, the result will have the top left corner aligned
/// - alignCorners: When YES, the result image will have the same value as the input image in the corners
/// - layout: Specifies what layout the provided tensor is in. The returned tensor will follow the same layout. Valid layouts are NHWC, NCHW, HWC, CHW, and HW.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeBilinearWithGradientTensor:(MPSGraphTensor *) gradient
input:(MPSGraphTensor *) input
@@ -485,7 +521,7 @@
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Create Resize gradient op and return the result tensor
+/// Creates a Resize gradient operation and returns the result tensor.
///
/// Computes the gradient for the forward pass Resize op with identical parameters.
/// See discussion of resizeTensor for more in depth description of resize paramters.
@@ -496,7 +532,7 @@
/// - scaleOffset: 1D float tensor. A 4-element shape as [scaleY, scaleX, offsetY, offsetX]
/// - mode: The resampling mode to use. If nearest sampling is specifed, RoundPreferCeil mode will be used.
/// - layout: Specifies what layout the provided tensor is in. The returned tensor will follow the same layout. Valid layouts are NHWC, NCHW, HWC, CHW, and HW.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeWithGradientTensor:(MPSGraphTensor *) gradient
input:(MPSGraphTensor *) input
@@ -506,7 +542,7 @@
name:(NSString * _Nullable) name
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Create Resize gradient op and return the result tensor
+/// Creates a Resize gradient operation and returns the result tensor.
///
/// Computes the gradient for the forward pass Resize op with identical parameters.
/// See discussion of resizeTensor for more in depth description of resize paramters.
@@ -517,7 +553,7 @@
/// - scale: 1D float tensor of size equal to rank of input.
/// - offset: 1D float tensor of size equal to rank of input.
/// - mode: The resampling mode to use. If nearest sampling is specifed, RoundPreferCeil mode will be used.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeWithGradientTensor:(MPSGraphTensor *) gradient
input:(MPSGraphTensor *) input
@@ -527,7 +563,7 @@
name:(NSString * _Nullable) name
MPS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0));
-/// Create Resize gradient op and return the result tensor
+/// Creates a Resize gradient operation and returns the result tensor.
///
/// Computes the gradient for the forward pass Resize op with identical parameters.
/// See discussion of resizeTensor for more in depth description of resize paramters.
@@ -538,7 +574,7 @@
/// - scaleOffset: 1D float tensor. A 4-element shape as [scaleY, scaleX, offsetY, offsetX]
/// - nearestRoundingMode: The rounding mode to use when using nearest resampling.
/// - layout: Specifies what layout the provided tensor is in. The returned tensor will follow the same layout. Valid layouts are NHWC, NCHW, HWC, CHW, and HW.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeNearestWithGradientTensor:(MPSGraphTensor *) gradient
input:(MPSGraphTensor *) input
@@ -548,7 +584,7 @@
name:(NSString * _Nullable) name
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Create Resize gradient op and return the result tensor
+/// Creates a Resize gradient operation and returns the result tensor.
///
/// Computes the gradient for the forward pass Resize op with nearest neighbor sampling and identical parameters.
/// See discussion of resizeTensor for more in depth description of resize paramters.
@@ -559,7 +595,7 @@
/// - scale: 1D float tensor of size equal to rank of input.
/// - offset: 1D float tensor of size equal to rank of input.
/// - nearestRoundingMode: The rounding mode to use when using nearest resampling. Default is roundPreferCeil.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeNearestWithGradientTensor:(MPSGraphTensor *) gradient
input:(MPSGraphTensor *) input
@@ -569,7 +605,7 @@
name:(NSString * _Nullable) name
MPS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0));
-/// Create Resize gradient op and return the result tensor
+/// Creates a Resize gradient operation and returns the result tensor.
///
/// Computes the gradient for the forward pass Resize op with bilinear sampling and identical parameters.
/// See discussion of resizeTensor for more in depth description of resize paramters.
@@ -579,7 +615,7 @@
/// - input: Forward pass input tensor
/// - scaleOffset: 1D float tensor. A 4-element shape as [scaleY, scaleX, offsetY, offsetX]
/// - layout: Specifies what layout the provided tensor is in. The returned tensor will follow the same layout. Valid layouts are NHWC, NCHW, HWC, CHW, and HW.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeBilinearWithGradientTensor:(MPSGraphTensor *) gradient
input:(MPSGraphTensor *) input
@@ -588,7 +624,7 @@
name:(NSString * _Nullable) name
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Create Resize gradient op and return the result tensor
+/// Creates a Resize gradient operation and returns the result tensor.
///
/// Computes the gradient for the forward pass Resize op with bilinear sampling and identical parameters.
///
@@ -597,7 +633,7 @@
/// - input: Forward pass input tensor
/// - scale: 1D float tensor of size equal to rank of input.
/// - offset: 1D float tensor of size equal to rank of input.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) resizeBilinearWithGradientTensor:(MPSGraphTensor *) gradient
input:(MPSGraphTensor *) input
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphSampleGridOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphSampleGridOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphSampleGridOps.h 2024-04-13 15:01:01
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphSampleGridOps.h 2024-05-30 03:27:11
@@ -28,7 +28,7 @@
/// - paddingMode: determines how samples outside the inputTensor are evaluated (only constant, reflect, symmetric and clampToEdge are supported)
/// - samplingMode: Can be either MPSGraphResizeNearest or MPSGraphResizeBilinear. Nearest sampling will use roundPreferCeil.
/// - constantValue: If paddingMode is MPSGraphPaddingModeConstant, then this constant is used for samples outside the input tensor.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
- (MPSGraphTensor *) sampleGridWithSourceTensor:(MPSGraphTensor *) source
coordinateTensor:(MPSGraphTensor *) coordinates
@@ -57,7 +57,7 @@
/// - paddingMode: determines how samples outside the inputTensor are evaluated (only constant, reflect, symmetric and clampToEdge are supported)
/// - nearestRoundingMode: The rounding mode to use for determining the nearest neighbor. Valid modes are roundPreferCeil, roundPreferFloor, ceil, and floor.
/// - constantValue: If paddingMode is MPSGraphPaddingModeConstant, then this constant is used for samples outside the input tensor.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
- (MPSGraphTensor *) sampleGridWithSourceTensor:(MPSGraphTensor *) source
coordinateTensor:(MPSGraphTensor *) coordinates
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphScatterNDOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphScatterNDOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphScatterNDOps.h 2024-03-22 20:46:16
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphScatterNDOps.h 2024-05-30 04:58:36
@@ -11,7 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
-/// Scatter mode
+/// The scatter mode.
typedef NS_ENUM(NSInteger, MPSGraphScatterMode)
{
/// Add
@@ -35,7 +35,7 @@
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(ScatterNDOps)
-/// Create ScatterND op and return the result tensor
+/// Creates a ScatterND operation and returns the result tensor.
///
/// Scatters the slices in updatesTensor to the result tensor along the indices in indicesTensor.
/// The scatter is defined as
@@ -57,12 +57,12 @@
/// ```
///
/// - Parameters:
-/// - updatesTensor: Tensor containing slices to be inserted into the result tensor
+/// - updatesTensor: Tensor containing slices to be inserted into the result tensor.
/// - indicesTensor: Tensor containg the result indices to insert slices at
-/// - shape: The shape of the result tensor
+/// - shape: The shape of the result tensor.
/// - batchDimensions: The number of batch dimensions
/// - mode: The type of update to use on the destination
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
- (MPSGraphTensor *) scatterNDWithUpdatesTensor:(MPSGraphTensor *) updatesTensor
indicesTensor:(MPSGraphTensor *) indicesTensor
@@ -71,7 +71,7 @@
mode:(MPSGraphScatterMode) mode
name:(NSString * _Nullable) name;
-/// Create ScatterND op and return the result tensor
+/// Creates a ScatterND operation and returns the result tensor.
///
/// Scatters the slices in updatesTensor to the result tensor along the indices in indicesTensor.
/// The scatter is defined as
@@ -93,11 +93,11 @@
/// ```
///
/// - Parameters:
-/// - updatesTensor: Tensor containing slices to be inserted into the result tensor
+/// - updatesTensor: Tensor containing slices to be inserted into the result tensor.
/// - indicesTensor: Tensor containg the result indices to insert slices at
-/// - shape: The shape of the result tensor
+/// - shape: The shape of the result tensor.
/// - batchDimensions: The number of batch dimensions
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
- (MPSGraphTensor *) scatterNDWithUpdatesTensor:(MPSGraphTensor *) updatesTensor
indicesTensor:(MPSGraphTensor *) indicesTensor
@@ -105,7 +105,7 @@
batchDimensions:(NSUInteger) batchDimensions
name:(NSString * _Nullable) name;
-/// Create ScatterND op and return the result tensor
+/// Creates a ScatterND operation and returns the result tensor.
///
/// Scatters the slices in updatesTensor to the result tensor along the indices in indicesTensor, on top of dataTensor.
/// The scatter is defined as
@@ -130,11 +130,11 @@
///
/// - Parameters:
/// - dataTensor: Tensor containing inital values of same shape as result tensor
-/// - updatesTensor: Tensor containing slices to be inserted into the result tensor
+/// - updatesTensor: Tensor containing slices to be inserted into the result tensor.
/// - indicesTensor: Tensor containg the result indices to insert slices at
/// - batchDimensions: The number of batch dimensions
/// - mode: The type of update to use on the destination
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
- (MPSGraphTensor *) scatterNDWithDataTensor:(MPSGraphTensor *) dataTensor
updatesTensor:(MPSGraphTensor *) updatesTensor
@@ -151,7 +151,7 @@
@interface MPSGraph(MPSGraphScatterOps)
-/// Create Scatter op and return the result tensor
+/// Creates a Scatter operation and returns the result tensor.
///
/// Scatters the slices in updatesTensor to the result tensor along the indices in indicesTensor.
/// The scatter is defined as
@@ -170,13 +170,13 @@
/// ```
///
/// - Parameters:
-/// - updatesTensor: Tensor containing values to be inserted into the result tensor
-/// - indicesTensor: Tensor containg the result indices to insert values at
-/// - shape: The shape of the result tensor
-/// - axis: The axis of the result tensor to scatter values along
-/// - mode: The type of update to use on the destination
-/// - name: The name for the operation
-/// - Returns: A valid MPSGraphTensor object
+/// - updatesTensor: Tensor containing values to be inserted into the result tensor.
+/// - indicesTensor: Tensor containg the result indices to insert values at.
+/// - shape: The shape of the result tensor.
+/// - axis: The axis of the result tensor to scatter values along.
+/// - mode: The type of update to use on the destination.
+/// - name: The name for the operation.
+/// - Returns: A valid MPSGraphTensor object.
- (MPSGraphTensor *) scatterWithUpdatesTensor:(MPSGraphTensor *) updatesTensor
indicesTensor:(MPSGraphTensor *) indicesTensor
shape:(MPSShape *) shape
@@ -186,7 +186,7 @@
MPS_SWIFT_NAME( scatter(_:indices:shape:axis:mode:name:) )
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
-/// Create Scatter op and return the result tensor
+/// Creates a Scatter operation and returns the result tensor.
///
/// Scatters the slices in updatesTensor to the result tensor along the indices in indicesTensor, on top of dataTensor.
/// The scatter is defined as
@@ -208,11 +208,11 @@
///
/// - Parameters:
/// - dataTensor: Tensor containing inital values of same shape as result tensor
-/// - updatesTensor: Tensor containing values to be inserted into the result tensor
+/// - updatesTensor: Tensor containing values to be inserted into the result tensor.
/// - indicesTensor: Tensor containg the result indices to insert values at
/// - axis: The axis of the result tensor to scatter values along
/// - mode: The type of update to use on the destination
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
- (MPSGraphTensor *) scatterWithDataTensor:(MPSGraphTensor *) dataTensor
updatesTensor:(MPSGraphTensor *) updatesTensor
@@ -226,7 +226,7 @@
@interface MPSGraph(MPSGraphScatterAlongAxisOps)
-/// Create ScatterAlongAxis op and return the result tensor
+/// Creates a ScatterAlongAxis operation and returns the result tensor.
///
/// Scatter values from `updatesTensor` along the specified `axis` at indices in `indicesTensor` into a result tensor.
/// Values are updated following `mode`. See MPSGraphScatterMode.
@@ -237,9 +237,9 @@
/// - Parameters:
/// - axis: The axis to scatter to. Negative values wrap around
/// - updatesTensor: The input tensor to scatter values from
-/// - indicesTensor: Int32 or Int64 tensor used to index the result tensor
+/// - indicesTensor: Int32 or Int64 tensor used to index the result tensor.
/// - mode: The type of update to use
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
- (MPSGraphTensor *) scatterAlongAxis:(NSInteger) axis
withUpdatesTensor:(MPSGraphTensor *) updatesTensor
@@ -250,7 +250,7 @@
MPS_SWIFT_NAME( scatterAlongAxis(_:updates:indices:shape:mode:name:) )
MPS_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4));
-/// Create ScatterAlongAxis op and return the result tensor
+/// Creates a ScatterAlongAxis operation and returns the result tensor.
///
/// Scatter values from `updatesTensor` along the specified `axis` at indices in `indicesTensor` into a result tensor.
/// Values are updated following `mode`. See MPSGraphScatterMode.
@@ -261,9 +261,9 @@
/// - Parameters:
/// - axisTensor: Scalar Int32 tensor. The axis to scatter to. Negative values wrap around
/// - updatesTensor: The input tensor to scatter values from
-/// - indicesTensor: Int32 or Int64 tensor used to index the result tensor
+/// - indicesTensor: Int32 or Int64 tensor used to index the result tensor.
/// - mode: The type of update to use
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
- (MPSGraphTensor *) scatterAlongAxisTensor:(MPSGraphTensor *) axisTensor
withUpdatesTensor:(MPSGraphTensor *) updatesTensor
@@ -274,7 +274,7 @@
MPS_SWIFT_NAME( scatterAlongAxisTensor(_:updates:indices:shape:mode:name:) )
MPS_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4));
-/// Create ScatterAlongAxis op and return the result tensor
+/// Creates a ScatterAlongAxis operation and returns the result tensor.
///
/// Scatter values from `updatesTensor` along the specified `axis` at indices in `indicesTensor` onto `dataTensor`.
/// Values in `dataTensor` are updated following `mode`. See MPSGraphScatterMode.
@@ -302,9 +302,9 @@
/// - axis: The axis to scatter to. Negative values wrap around
/// - dataTensor: The input tensor to scatter values onto
/// - updatesTensor: The input tensor to scatter values from
-/// - indicesTensor: Int32 or Int64 tensor used to index the result tensor
+/// - indicesTensor: Int32 or Int64 tensor used to index the result tensor.
/// - mode: The type of update to use
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
- (MPSGraphTensor *) scatterAlongAxis:(NSInteger) axis
withDataTensor:(MPSGraphTensor *) dataTensor
@@ -315,7 +315,7 @@
MPS_SWIFT_NAME( scatterAlongAxis(_:data:updates:indices:mode:name:) )
MPS_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4));
-/// Create ScatterAlongAxis op and return the result tensor
+/// Creates a ScatterAlongAxis operation and returns the result tensor.
///
/// Scatter values from `updatesTensor` along the specified `axis` at indices in `indicesTensor` onto `dataTensor`.
/// Values in `dataTensor` are updated following `mode`. See MPSGraphScatterMode.
@@ -343,9 +343,9 @@
/// - axisTensor: Scalar Int32 tensor. The axis to scatter to. Negative values wrap around
/// - dataTensor: The input tensor to scatter values onto
/// - updatesTensor: The input tensor to scatter values from
-/// - indicesTensor: Int32 or Int64 tensor used to index the result tensor
+/// - indicesTensor: Int32 or Int64 tensor used to index the result tensor.
/// - mode: The type of update to use
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
- (MPSGraphTensor *) scatterAlongAxisTensor:(MPSGraphTensor *) axisTensor
withDataTensor:(MPSGraphTensor *) dataTensor
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphSortOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphSortOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphSortOps.h 2024-04-13 15:01:01
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphSortOps.h 2024-05-30 05:56:18
@@ -16,13 +16,13 @@
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(MPSGraphSortOps)
-/// Sort the elements of the input tensor along the specified axis.
+/// Sorts the elements of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axis: The tensor dimension over which you sort the tensor
/// - descending: If true, reverse the sort direction
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) sortWithTensor:(MPSGraphTensor *) tensor
axis:(NSInteger) axis
@@ -31,13 +31,13 @@
MPS_SWIFT_NAME( sort(_:axis:descending:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Sort the elements of the input tensor along the specified axis.
+/// Sorts the elements of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axisTensor: The tensor dimension over which you sort the tensor
/// - descending: If true, reverse the sort direction
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) sortWithTensor:(MPSGraphTensor *) tensor
axisTensor:(MPSGraphTensor *) axisTensor
@@ -46,12 +46,12 @@
MPS_SWIFT_NAME( sort(_:axisTensor:descending:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Sort the elements of the input tensor along the specified axis.
+/// Sorts the elements of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axis: The tensor dimension over which you sort the tensor
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) sortWithTensor:(MPSGraphTensor *) tensor
axis:(NSInteger) axis
@@ -59,12 +59,12 @@
MPS_SWIFT_NAME( sort(_:axis:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Sort the elements of the input tensor along the specified axis.
+/// Sorts the elements of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axisTensor: The tensor dimension over which you sort the tensor
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) sortWithTensor:(MPSGraphTensor *) tensor
axisTensor:(MPSGraphTensor *) axisTensor
@@ -72,13 +72,13 @@
MPS_SWIFT_NAME( sort(_:axisTensor:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-/// Compute the indices that sort the elements of the input tensor along the specified axis.
+/// Computes the indices that sort the elements of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axis: The tensor dimension over which you sort the tensor
/// - descending: If true, reverse the sort direction
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object with 32-bit integer data type
-(MPSGraphTensor *) argSortWithTensor:(MPSGraphTensor *) tensor
axis:(NSInteger) axis
@@ -87,13 +87,13 @@
MPS_SWIFT_NAME( argSort(_:axis:descending:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.1), tvos(16.1));
-/// Compute the indices that sort the elements of the input tensor along the specified axis.
+/// Computes the indices that sort the elements of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axisTensor: The tensor dimension over which you sort the tensor
/// - descending: If true, reverse the sort direction
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object with 32-bit integer data type
-(MPSGraphTensor *) argSortWithTensor:(MPSGraphTensor *) tensor
axisTensor:(MPSGraphTensor *) axisTensor
@@ -102,12 +102,12 @@
MPS_SWIFT_NAME( argSort(_:axisTensor:descending:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.1), tvos(16.1));
-/// Compute the indices that sort the elements of the input tensor along the specified axis.
+/// Computes the indices that sort the elements of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axis: The tensor dimension over which you sort the tensor
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object with 32-bit integer data type
-(MPSGraphTensor *) argSortWithTensor:(MPSGraphTensor *) tensor
axis:(NSInteger) axis
@@ -115,12 +115,12 @@
MPS_SWIFT_NAME( argSort(_:axis:name:))
MPS_AVAILABLE_STARTING(macos(13.0), ios(16.1), tvos(16.1));
-/// Compute the indices that sort the elements of the input tensor along the specified axis.
+/// Computes the indices that sort the elements of the input tensor along the specified axis.
///
/// - Parameters:
/// - tensor: The input tensor
/// - axisTensor: The tensor dimension over which you sort the tensor
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object with 32-bit integer data type
-(MPSGraphTensor *) argSortWithTensor:(MPSGraphTensor *) tensor
axisTensor:(MPSGraphTensor *) axisTensor
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphSparseOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphSparseOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphSparseOps.h 2024-04-13 16:01:45
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphSparseOps.h 2024-05-30 03:27:11
@@ -13,7 +13,7 @@
NS_ASSUME_NONNULL_BEGIN
-/// Sparse Storage options in MPSGraph.
+/// The sparse storage options in the Metal Performance Shaders Graph framework.
typedef NS_ENUM(uint64_t, MPSGraphSparseStorageType) {
/// COO Storage
MPSGraphSparseStorageCOO MPS_ENUM_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0)) MPS_SWIFT_NAME(COO) = 0,
@@ -23,20 +23,21 @@
MPSGraphSparseStorageCSR MPS_ENUM_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0)) = 2L,
};
+/// A class that describes the properties of a create sparse operation.
MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
@interface MPSGraphCreateSparseOpDescriptor : MPSGraphObject <NSCopying>
-/// Defines storage format of sparse tensor.
+/// Defines the storage format of the sparse tensor.
@property(readwrite, nonatomic) MPSGraphSparseStorageType sparseStorageType;
-/// Defines datatype of sparse tensor.
+/// Defines the datatype of the sparse tensor.
@property(readwrite, nonatomic) MPSDataType dataType;
/// Creates a descriptor for a sparse tensor.
///
/// - Parameters:
/// - sparseStorageType: A sparseStorageType.
-/// - dataType: A dataType of sparse tensor.
+/// - dataType: A dataType of the sparse tensor.
/// - Returns: The descriptor.
+ (nullable instancetype)descriptorWithStorageType:(MPSGraphSparseStorageType)sparseStorageType
dataType:(MPSDataType)dataType
@@ -46,7 +47,7 @@
@interface MPSGraph (MPSGraphSparseOps)
-/// Creates a sparseTensor representation.
+/// Creates a sparse tensor representation.
///
/// sparseVals corresponds to non zero values in matrix.
/// indexTensor0 and indexTensor1 are indices used for indexing into sparse data structure.
@@ -70,7 +71,7 @@
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
MPS_SWIFT_NAME(sparseTensor(sparseTensorWithType:tensors:shape:dataType:name:));
-/// Creates a sparseTensor representation.
+/// Creates a sparse tensor representation.
///
/// sparseVals corresponds to non zero values in matrix.
/// indexTensor0 and indexTensor1 are indices used for indexing into sparse data structure.
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphStencilOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphStencilOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphStencilOps.h 2024-03-22 20:57:12
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphStencilOps.h 2024-05-30 05:56:17
@@ -13,17 +13,19 @@
NS_ASSUME_NONNULL_BEGIN
-/// This class defines parameters for a stencil operation.
+/// The class that defines the parameters for a stencil operation.
///
-/// Use this descriptor with the following ``MPSGraph`` methods:
-/// - ``MPSGraph/stencilWithSourceTensor:weightsTensor:descriptor:name:``.
+/// Use this descriptor with the following ``MPSGraph`` method:
+/// - ``MPSGraph/stencilWithSourceTensor:weightsTensor:descriptor:name:``
MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
@interface MPSGraphStencilOpDescriptor : MPSGraphObject<NSCopying>
-/// The reduction mode to use within the stecil window. Default value: `MPSGraphReductionModeSum`.
+/// The reduction mode to use within the stencil window.
+///
+/// Default value: `MPSGraphReductionModeSum`.
@property (readwrite, nonatomic) MPSGraphReductionMode reductionMode;
-/// An array of length four that determines from which offset to start reading the `input` tensor.
+/// An array of length four that determines from which offset to start reading the input tensor.
///
/// Only used when `paddingStyle` is `MPSGraphPaddingStyleExplicitOffset`.
/// For example zero offset means that the first stencil window will align its top-left corner (in 4 dimensions) to the top-left corner of the input tensor.
@@ -53,14 +55,17 @@
@property (readwrite, nonatomic, copy) MPSShape * explicitPadding;
/// The property that determines which values to use for padding the input tensor.
+///
/// Default value: `MPSGraphPaddingModeZero`.
@property (readwrite, nonatomic) MPSGraphPaddingMode boundaryMode;
/// The property that defines what kind of padding to apply to the stencil operation.
+///
/// Default value: `MPSGraphPaddingStyleExplicit`.
@property (readwrite, nonatomic) MPSGraphPaddingStyle paddingStyle;
/// The padding value for `boundaryMode = MPSGraphPaddingModeConstant`.
+///
/// Default value: 0.
@property (readwrite, nonatomic) float paddingConstant;
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensor.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensor.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensor.h 2024-04-13 16:03:06
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensor.h 2024-05-30 11:26:37
@@ -16,24 +16,26 @@
NS_ASSUME_NONNULL_BEGIN
-/// Symbolic representation of a compute datatype
+/// The symbolic representation of a compute data type.
///
-/// NSCopy will cause a refrence to be taken, this is so NSDictionary can work with the tensor.
+/// `NSCopy` will take a refrence, this is so `NSDictionary` can work with the tensor.
/// All tensors are created, owned and destroyed by the MPSGraph
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraphTensor : MPSGraphObject <NSCopying>
-/// shape of the tensor, nil shape represents an unranked tensor,
-/// -1 value for a dimension represents that it will be resolved via shape inference at runtime and it can be anything
+/// The shape of the tensor.
+///
+/// nil shape represents an unranked tensor.
+/// -1 value for a dimension represents that it will be resolved via shape inference at runtime and it can be anything.
@property (nullable, readonly, copy, nonatomic) MPSShape *shape;
-/// dataType of the tensor
+/// The data type of the tensor.
@property (readonly, nonatomic) MPSDataType dataType;
-/// operation responsible for creating this tensor
+/// The operation responsible for creating this tensor.
@property (readonly, nonnull, nonatomic) MPSGraphOperation *operation;
-/// Unvaiable, please utilize graph methods to create and initialize tensors
+/// Unavailable, please utilize graph methods to create and initialize tensors.
-(instancetype) init NS_UNAVAILABLE;
@end
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorData.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorData.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorData.h 2024-04-13 21:12:47
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorData.h 2024-05-30 05:56:17
@@ -14,22 +14,22 @@
NS_ASSUME_NONNULL_BEGIN
-/// Representation of a compute datatype
+/// The representation of a compute data type.
///
-/// MPSGraphTensorData is how we pass data to an MPSGraph, a reference will be taken to your data and used just in time when MPSGraph is run.
+/// Pass data to a graph using a tensor data, a reference will be taken to your data and used just in time when the graph is run.
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraphTensorData : MPSGraphObject
-/// shape of the tensorData
+/// The shape of the tensor data.
@property (readonly, copy, nonatomic) MPSShape *shape;
-/// dataType of the tensorData
+/// The data type of the tensor data.
@property (readonly, nonatomic) MPSDataType dataType;
-/// device of the tensorData
+/// The device of the tensor data.
@property (readonly, nonatomic) MPSGraphDevice * device;
-/// Initialize an MPSGraphTensorData with an NSData on an MPSDevice
+/// Initializes the tensor data with an `NSData` on a device.
///
/// - Parameters:
/// - device: MPSDevice on which the MPSGraphTensorData exists
@@ -43,7 +43,8 @@
shape:(MPSShape *) shape
dataType:(MPSDataType) dataType;
-/// Initialize an MPSGraphTensorData with an MTLBuffer
+/// Initializes an tensor data with a metal buffer.
+///
/// The device of the MTLBuffer will be used to get the MPSDevice for this MPSGraphTensorData.
///
/// - Parameters:
@@ -56,7 +57,8 @@
dataType:(MPSDataType) dataType
MPS_SWIFT_NAME( init(_:shape:dataType:) );
-/// Initialize an MPSGraphTensorData with an MTLBuffer
+/// Initializes an tensor data with a metal buffer.
+///
/// The device of the MTLBuffer will be used to get the MPSDevice for this MPSGraphTensorData.
///
/// - Parameters:
@@ -72,7 +74,8 @@
MPS_SWIFT_NAME( init(_:shape:dataType:rowBytes:) )
MPS_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4));
-/// Initialize an MPSGraphTensorData with an MPSMatrix
+/// Initializes a tensor data with an MPS matrix.
+///
/// The device of the MPSMatrix will be used to get the MPSDevice for this MPSGraphTensorData.
///
/// - Parameters:
@@ -81,7 +84,8 @@
-(instancetype) initWithMPSMatrix:(MPSMatrix *) matrix
MPS_SWIFT_NAME( init(_:) );
-/// Initialize an MPSGraphTensorData with an MPSMatrix enforcing rank of the result.
+/// Initializes a tensor data with an MPS matrix enforcing rank of the result.
+///
/// The device of the MPSMatrix will be used to get the MPSDevice for this MPSGraphTensorData.
///
/// - Parameters:
@@ -94,7 +98,8 @@
-/// Initialize an MPSGraphTensorData with an MPSVector
+/// Initializes a tensor data with an MPS vector.
+///
/// The device of the MPSVector will be used to get the MPSDevice for this MPSGraphTensorData.
///
/// - Parameters:
@@ -103,7 +108,8 @@
-(instancetype) initWithMPSVector:(MPSVector *) vector
MPS_SWIFT_NAME( init(_:) );
-/// Initialize an MPSGraphTensorData with an MPSVector enforcing rank of the result.
+/// Initializes a tensor data with an MPS vector enforcing rank of the result.
+///
/// The device of the MPSVector will be used to get the MPSDevice for this MPSGraphTensorData.
///
/// - Parameters:
@@ -116,25 +122,27 @@
-/// Initialize an MPSGraphTensorData with an MPSNDArray
+/// Initializes an MPSGraphTensorData with an MPS ndarray.
+///
/// The device of the MPSNDArray will be used to get the MPSDevice for this MPSGraphTensorData.
///
/// - Parameters:
-/// - ndarray: MPSNDArray to be used within the MPSGraphTensorData
+/// - ndarray: MPSNDArray to be used within the MPSGraphTensorData.
/// - Returns: A valid MPSGraphTensorData, or nil if allocation failure.
-(instancetype) initWithMPSNDArray:(MPSNDArray *) ndarray
MPS_SWIFT_NAME( init(_:) );
-/// Initialize an MPSGraphTensorData with an MPSImage batch, the dataLayout used will be NHWC,
-/// call a transpose or permute to change to a layout of your choice.
+/// Initializes a tensor data with an MPS image batch.
///
+/// The dataLayout used will be NHWC, call a transpose or permute to change to a layout of your choice.
+///
/// - Parameters:
/// - imageBatch: The device on which the kernel will run, unorm8 and unorm16 images will create a float32 tensorData
/// - Returns: A valid MPSGraphTensorData, or nil if allocation failure.
-(instancetype) initWithMPSImageBatch:(MPSImageBatch *) imageBatch
MPS_SWIFT_NAME( init(_:) );
-/// Return an mpsndarray object will copy contents if the contents are not stored in an MPSNDArray
+/// Return an mpsndarray object will copy contents if the contents are not stored in an MPS ndarray.
///
/// - Returns: A valid MPSNDArray, or nil if allocation fails.
-(MPSNDArray *)mpsndarray;
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorShapeOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorShapeOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorShapeOps.h 2024-04-13 16:01:45
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorShapeOps.h 2024-05-30 11:26:36
@@ -95,7 +95,7 @@
length:(NSInteger) length
name:(NSString * _Nullable) name;
-/// Creates a strided slice operation and returns the result tensor.
+/// Creates a strided-slice operation and returns the result tensor.
///
/// Slices a tensor starting from `starts`, stopping short before `ends` stepping
/// `strides` paces between each value. Semantics based on
@@ -114,7 +114,7 @@
strides:(NSArray<NSNumber *> *) strides
name:(NSString * _Nullable) name;
-/// Creates a strided slice operation and returns the result tensor.
+/// Creates a strided-slice operation and returns the result tensor.
///
/// Slices a tensor starting from `starts`, stopping short before `ends` stepping
/// `strides` paces between each value. Semantics based on
@@ -139,7 +139,7 @@
squeezeMask:(uint32_t) squeezeMask
name:(NSString * _Nullable) name;
-/// Creates a strided slice gradient operation and returns the result tensor.
+/// Creates a strided-slice gradient operation and returns the result tensor.
///
/// - Parameters:
/// - inputGradientTensor: The input gradient.
@@ -156,7 +156,7 @@
strides:(NSArray<NSNumber *> *) strides
name:(NSString * _Nullable) name;
-/// Creates a strided slice gradient operation and returns the result tensor.
+/// Creates a strided-slice gradient operation and returns the result tensor.
///
/// - Parameters:
/// - inputGradientTensor: The input gradient.
@@ -167,7 +167,7 @@
/// - startMask: A bitmask that indicates dimensions whose `starts` values the operation should ignore.
/// - endMask: A bitmask that indicates dimensions whose `ends` values the operation should ignore.
/// - squeezeMask: A bitmask that indicates dimensions the operation will squeeze out from the result.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) sliceGradientTensor:(MPSGraphTensor *) inputGradientTensor
fwdInShapeTensor:(MPSGraphTensor *) fwdInShapeTensor
@@ -179,7 +179,7 @@
squeezeMask:(uint32_t) squeezeMask
name:(NSString * _Nullable) name;
-/// Creates a strided slice update operation and returns the result tensor.
+/// Creates a strided-slice update operation and returns the result tensor.
///
/// - Parameters:
/// - dataTensor: The large tensor that will receive the update.
@@ -190,7 +190,7 @@
/// - startMask: A bitmask that indicates dimensions whose `starts` values the operation should ignore.
/// - endMask: A bitmask that indicates dimensions whose `ends` values the operation should ignore.
/// - squeezeMask: A bitmask that indicates dimensions the operation will squeeze out from the result.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) sliceUpdateDataTensor:(MPSGraphTensor *) dataTensor
updateTensor:(MPSGraphTensor *) updateTensor
@@ -203,7 +203,7 @@
name:(NSString * _Nullable) name
MPS_AVAILABLE_STARTING(macos(14.4), ios(17.4), tvos(17.4));
-/// Creates a strided slice update operation and returns the result tensor.
+/// Creates a strided-slice update operation and returns the result tensor.
///
/// - Parameters:
/// - dataTensor: The large tensor that will receive the update.
@@ -214,7 +214,7 @@
/// - startMask: A bitmask that indicates dimensions whose `starts` values the operation should ignore.
/// - endMask: A bitmask that indicates dimensions whose `ends` values the operation should ignore.
/// - squeezeMask: A bitmask that indicates dimensions the operation will squeeze out from the result.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) sliceUpdateDataTensor:(MPSGraphTensor *) dataTensor
updateTensor:(MPSGraphTensor *) updateTensor
@@ -227,6 +227,44 @@
name:(NSString * _Nullable) name
MPS_AVAILABLE_STARTING(macos(14.4), ios(17.4), tvos(17.4));
+/// Creates a strided-slice update operation with zero masks and returns the result tensor.
+///
+/// - Parameters:
+/// - dataTensor: The large tensor that will receive the update.
+/// - updateTensor: The tensor with the new values that will replace values in the dataTensor.
+/// - startsTensor: A Tensor that contains an array of numbers that specify the starting points for each dimension.
+/// - endsTensor: A Tensor that contains an array of numbers that specify the ending points for each dimension.
+/// - stridesTensor: A Tensor that contains an array of numbers that specify the strides for each dimension.
+/// - name: The name for the operation.
+/// - Returns: A valid MPSGraphTensor object
+-(MPSGraphTensor *) sliceUpdateDataTensor:(MPSGraphTensor *) dataTensor
+ updateTensor:(MPSGraphTensor *) updateTensor
+ startsTensor:(MPSGraphTensor *) startsTensor
+ endsTensor:(MPSGraphTensor *) endsTensor
+ stridesTensor:(MPSGraphTensor *) stridesTensor
+ name:(NSString * _Nullable) name
+MPS_AVAILABLE_STARTING(macos(15.0), ios(18.0), macCatalyst(18.0), tvos(18.0), xros(2.0));
+
+/// Creates a strided-slice update operation with zero masks and returns the result tensor.
+///
+/// - Parameters:
+/// - dataTensor: The large tensor that will receive the update.
+/// - updateTensor: The tensor with the new values that will replace values in the dataTensor.
+/// - starts: An array of numbers that specify the starting points for each dimension.
+/// - ends: An array of numbers that specify the ending points for each dimension.
+/// - strides: An array of numbers that specify the strides for each dimension.
+/// - name: The name for the operation.
+/// - Returns: A valid MPSGraphTensor object
+-(MPSGraphTensor *) sliceUpdateDataTensor:(MPSGraphTensor *) dataTensor
+ updateTensor:(MPSGraphTensor *) updateTensor
+ starts:(NSArray<NSNumber *> *) starts
+ ends:(NSArray<NSNumber *> *) ends
+ strides:(NSArray<NSNumber *> *) strides
+ name:(NSString * _Nullable) name
+MPS_AVAILABLE_STARTING(macos(15.0), ios(18.0), macCatalyst(18.0), tvos(18.0), xros(2.0));
+
+
+
/// Creates a concatenation operation and returns the result tensor.
///
/// Concatenates two input tensors along the specified dimension. Tensors must be broadcast
@@ -341,7 +379,7 @@
rightPadding:(MPSShape *) rightPadding
name:(NSString * _Nullable) name;
-/// Creates a space-to-depth2d operation and returns the result tensor.
+/// Creates a space-to-depth2D operation and returns the result tensor.
///
/// This operation outputs a copy of the `input` tensor, where values from the
/// `widthAxis` and `heightAxis` dimensions are moved in spatial blocks of size
@@ -369,7 +407,7 @@
name:(NSString * _Nullable) name
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
-/// Creates a space-to-depth2d operation and returns the result tensor.
+/// Creates a space-to-depth2D operation and returns the result tensor.
///
/// This operation outputs a copy of the `input` tensor, where values from the
/// `widthAxisTensor` and `heightAxisTensor` dimensions are moved in spatial blocks of size
@@ -398,7 +436,7 @@
name:(NSString * _Nullable) name
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
-/// Creates a depth-to-space2d operation and returns the result tensor.
+/// Creates a depth-to-space2D operation and returns the result tensor.
///
/// This operation outputs a copy of the input tensor, where values from the
/// `depthAxis` dimension are moved in spatial blocks of size `blockSize` to the
@@ -428,7 +466,7 @@
name:(NSString * _Nullable) name
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
-/// Creates a depth-to-space2d operation and returns the result tensor.
+/// Creates a depth-to-space2D operation and returns the result tensor.
///
/// This operation outputs a copy of the input tensor, where values from the
/// `depthAxisTensor` dimension are moved in spatial blocks of size `blockSize` to the
@@ -631,7 +669,7 @@
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
-/// Creates a flatten2d operation and returns the result tensor.
+/// Creates a flatten2D operation and returns the result tensor.
///
/// Flattens dimensions before `axis` to `result[0]` and dimensions starting
/// from `axis` to `result[1]` and returns a rank-2 tensor as result.
@@ -647,7 +685,7 @@
MPS_SWIFT_NAME( flatten2D(_:axis:name:) )
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
-/// Creates a flatten2d operation and returns the result tensor.
+/// Creates a flatten2D operation and returns the result tensor.
///
/// Flattens dimensions before `axis` to `result[0]` and dimensions starting
/// from `axis` to `result[1]` and returns a rank-2 tensor as result.
@@ -670,8 +708,8 @@
///
/// - Parameters:
/// - tensor: The tensor to be broadcasted
-/// - shape: The shape of the result tensor
-/// - name: The name for the operation
+/// - shape: The shape of the result tensor.
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(MPSGraphTensor *) broadcastTensor:(MPSGraphTensor *) tensor
toShape:(MPSShape *) shape
@@ -782,7 +820,7 @@
/// - tensor: The input tensor
/// - splitSizesTensor: The lengths of the result tensors along the split axis.
/// - axis: The dimension along which MPSGraph splits the input tensor.
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor object
-(NSArray<MPSGraphTensor *> *) splitTensor:(MPSGraphTensor *) tensor
splitSizesTensor:(MPSGraphTensor *) splitSizesTensor
@@ -870,7 +908,7 @@
MPS_SWIFT_NAME( squeeze(_:axesTensor:name:) )
MPS_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4));
-/// Creates an expand dimensions operation and returns the result tensor.
+/// Creates an expand-dimensions operation and returns the result tensor.
///
/// Expands the tensor, inserting a dimension with size 1 at the specified axis.
///
@@ -885,7 +923,7 @@
MPS_SWIFT_NAME( expandDims(_:axis:name:) )
MPS_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4));
-/// Creates an expand dimensions operation and returns the result tensor.
+/// Creates an expand-dimensions operation and returns the result tensor.
///
/// Expands the tensor, inserting dimensions with size 1 at specified axes.
///
@@ -900,7 +938,7 @@
MPS_SWIFT_NAME( expandDims(_:axes:name:) )
MPS_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4));
-/// Creates an expand dimensions operation and returns the result tensor.
+/// Creates an expand-dimensions operation and returns the result tensor.
///
/// Expands the tensor, inserting dimensions with size 1 at specified axes.
///
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTopKOps.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTopKOps.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTopKOps.h 2024-04-13 16:03:05
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTopKOps.h 2024-05-30 04:43:28
@@ -16,7 +16,7 @@
MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
@interface MPSGraph(MPSGraphTopKOps)
-/// Creates TopK op and return the value and indices tensors
+/// Creates a TopK operation and returns the value and indices tensors
///
/// Finds the k largest values along the minor dimension of the input. The source must have
/// at least k elements along its minor dimension.
@@ -26,14 +26,14 @@
/// - Parameters:
/// - source: Tensor containing source data
/// - k: The number of largest values to return
-/// - name: The name for the operation
+/// - name: The name for the operation.
/// - Returns: A valid MPSGraphTensor array of size 2
-(NSArray<MPSGraphTensor *> *) topKWithSourceTensor:(MPSGraphTensor *) source
k:(NSUInteger) k
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( topK(_:k:name:) );
-/// Creates TopK op and return the result tensor.
+/// Creates a TopK operation and returns the result tensor.
///
/// Finds the k largest values along the minor dimension of the input. The source must have
/// at least k elements along its minor dimension.
@@ -50,7 +50,7 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( topK(_:kTensor:name:) );
-/// Creates TopK op and return the value and indices tensors.
+/// Creates a TopK operation and returns the value and indices tensors.
///
/// Finds the k largest values along the minor dimension of the input. The source must have
/// at least k elements along its minor dimension.
@@ -70,7 +70,7 @@
MPS_SWIFT_NAME( topK(_:axis:k:name:) )
MPS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0));
-/// Create BottomK op and return the value and indices tensors.
+/// Creates a BottomK operation and returns the value and indices tensors.
///
/// Finds the k smallest values along the minor dimension of the input. The source must have
/// at least k elements along its minor dimension.
@@ -90,7 +90,7 @@
MPS_SWIFT_NAME( bottomK(_:axis:k:name:) )
MPS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0));
-/// Creates TopK op and return the result tensor..
+/// Creates a TopK operation and returns the result tensor.
///
/// Finds the k largest values along the minor dimension of the input. The source must have
/// at least k elements along its minor dimension.
@@ -110,7 +110,7 @@
MPS_SWIFT_NAME( topK(_:axisTensor:kTensor:name:) )
MPS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0));
-/// Create BottomK op and return the result tensor.
+/// Creates a BottomK operation and returns the result tensor.
///
/// Finds the k smallest values along the minor dimension of the input. The source must have
/// at least k elements along its minor dimension.
@@ -134,7 +134,7 @@
@interface MPSGraph(MPSGraphTopKGradientOps)
-/// Create TopKGradient op and return the result tensor.
+/// Creates a TopKGradient operation and returns the result tensor.
///
/// Finds the K largest values along the minor dimension of the input. The input must have
/// at least K elements along its minor dimension.
@@ -151,7 +151,7 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( topKGradient(_:input:k:name:) );
-/// Create TopKGradient op and return the result tensor.
+/// Creates a TopKGradient operation and returns the result tensor.
///
/// Finds the K largest values along the minor dimension of the input. The input must have
/// at least K elements along its minor dimension.
@@ -171,7 +171,7 @@
MPS_SWIFT_NAME( topKGradient(_:source:axis:k:name:) )
MPS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0));
-/// Create BottomKGradient op and return the result tensor.
+/// Creates a BottomKGradient operation and returns the result tensor.
///
/// Finds the K smallest values along the minor dimension of the input. The input must have
/// at least K elements along its minor dimension.
@@ -191,7 +191,7 @@
MPS_SWIFT_NAME( bottomKGradient(_:source:axis:k:name:) )
MPS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0));
-/// Create TopKGradient op and return the result tensor.
+/// Creates a TopKGradient operation and returns the result tensor.
///
/// Finds the K largest values along the minor dimension of the input. The input must have
/// at least K elements along its minor dimension.
@@ -208,7 +208,7 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( topKGradient(_:input:kTensor:name:) );
-/// Create TopKGradient op and return the result tensor.
+/// Creates a TopKGradient operation and returns the result tensor.
///
/// Finds the K largest values along the minor dimension of the input. The input must have
/// at least K elements along its minor dimension.
@@ -228,7 +228,7 @@
MPS_SWIFT_NAME( topKGradient(_:source:axisTensor:kTensor:name:) )
MPS_AVAILABLE_STARTING(macos(14.0), ios(17.0), tvos(17.0));
-/// Create BottomKGradient op and return the result tensor.
+/// Creates a BottomKGradient operation and returns the result tensor.
///
/// Finds the K smallest values along the minor dimension of the input. The input must have
/// at least K elements along its minor dimension.
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MetalPerformanceShadersGraph.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MetalPerformanceShadersGraph.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MetalPerformanceShadersGraph.h 2024-04-13 16:03:04
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MetalPerformanceShadersGraph.h 2024-05-30 11:26:35
@@ -12,6 +12,7 @@
#import <MetalPerformanceShadersGraph/MPSGraphAutomaticDifferentiation.h>
#import <MetalPerformanceShadersGraph/MPSGraphActivationOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphArithmeticOps.h>
+#import <MetalPerformanceShadersGraph/MPSGraphCallOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphConvolutionOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphConvolutionTransposeOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphControlFlowOps.h>
- 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