-
Notifications
You must be signed in to change notification settings - Fork 516
MetalPerformanceShadersGraph iOS xcode13.0 beta1
Sebastien Pouliot edited this page Jun 7, 2021
·
1 revision
#MetalPerformanceShadersGraph.framework
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraph.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraph.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraph.h 2021-03-16 08:47:28.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraph.h 2021-06-02 05:35:20.000000000 -0400
@@ -10,12 +10,15 @@
#define MPSGraph_h
#import <MetalPerformanceShadersGraph/MPSGraphCore.h>
+#import <MetalPerformanceShadersGraph/MPSGraphDevice.h>
#import <MetalPerformanceShadersGraph/MPSGraphTensor.h>
#import <MetalPerformanceShadersGraph/MPSGraphTensorData.h>
#import <MetalPerformanceShadersGraph/MPSGraphOperation.h>
NS_ASSUME_NONNULL_BEGIN
+@class MPSGraphExecutable;
+
/*!
* @typedef MPSGraphOptions
* @abstract Options to be utilized by the graph
@@ -80,6 +83,21 @@
@end
+
+/*! @class MPSGraphCompilationDescriptor
+ * @abstract A structure which consists of all the levers users can use to compile their graphs
+ *
+ */
+MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
+@interface MPSGraphCompilationDescriptor : NSObject
+
+/*!
+ * @brief Turns off type inference and we rely on type inference during runtime
+ */
+-(void) disableTypeInference;
+
+@end
+
/*! @class MPSGraph
* @abstract Optimized representation of a compute graph of MPSGraphOperations and MPSGraphTensors
* @discussion An MPSGraph is a symbolic representation of operations to be utilized to execute compute graphs on a device.
@@ -109,6 +127,23 @@
@property (readonly, nonnull, nonatomic) NSArray<MPSGraphTensor *> *placeholderTensors;
/*!
+ * @abstract Compiles the graph for given feeds to return targetTensor values, ensuring all target operations would be executed. This call blocks till execution has completed.
+ *
+ * @param device MPSGraph device to optimize for
+ * @param feeds Feeds dictionary for the placeholder tensors
+ * @param targetTensors Tensors for which the caller wishes MPSGraphTensorData to be returned
+ * @param targetOperations Operations to be completed at the end of the run
+ * @param compilationDescriptor compilation descriptor
+ *
+ * @return A valid MPSGraphExecutable object
+ */
+-(MPSGraphExecutable *) compileWithDevice:(MPSGraphDevice * _Nullable) device
+ feeds:(MPSGraphTensorShapedTypeDictionary *) feeds
+ targetTensors:(NSArray<MPSGraphTensor *> *) targetTensors
+ targetOperations:(NSArray<MPSGraphOperation *> * _Nullable) targetOperations
+ compilationDescriptor:(MPSGraphCompilationDescriptor * _Nullable) compilationDescriptor;
+
+/*!
* @abstract Runs the graph for given feeds to return targetTensor values, ensuring all target operations also executed. This call blocks till execution has completed.
*
* @param feeds Feeds dictionary for the placeholder tensors
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphControlFlowOps.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphControlFlowOps.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphControlFlowOps.h 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphControlFlowOps.h 2021-06-02 12:47:03.000000000 -0400
@@ -0,0 +1,150 @@
+//
+// MPSGraphControlFlow.h
+// MPSGraph
+//
+// Created by Dhruv Saksena on 12/27/20.
+// Copyright © 2020 Apple Inc. All rights reserved.
+//
+
+#ifndef MPSGraphControlFlowOps_h
+#define MPSGraphControlFlowOps_h
+
+#import <MetalPerformanceShadersGraph/MPSGraph.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
+@interface MPSGraph(MPSGraphControlFlowOps)
+
+/*!
+ * @abstract Defines a scope where all the ops defined in this block get controlDependency operations
+ * @return A valid MPSGraphTensor array with results forwarded to return of controlDependency call
+ */
+typedef NSArray<MPSGraphTensor *> * _Nonnull(^MPSGraphControlFlowDependencyBlock)();
+
+/*!
+ * @abstract Runs the graph for given feeds to return targetTensor values, ensuring all target operations also executed. This call blocks till execution has completed.
+ *
+ * @param operations Operations maked as control dependency for all ops created inside the dependent block
+ * @param dependentBlock MPSGraphControlFlowDependencyBlock which is provided by caller to create dependent ops
+ * @param name name of scope
+ *
+ * @return A valid MPSGraphTensor array with results returned from dependentBlock forwarded
+ */
+-(NSArray<MPSGraphTensor *> *) controlDependencyWithOperations:(NSArray<MPSGraphOperation *> *) operations
+ dependentBlock:(MPSGraphControlFlowDependencyBlock) dependentBlock
+ name:(NSString * _Nullable) name;
+
+/*! @abstract A block to have if/else condition in it
+ * @return 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.
+ */
+typedef NSArray<MPSGraphTensor *> * _Nonnull(^MPSGraphIfThenElseBlock)();
+
+/*!
+ * @abstract Add an if/then/else op to the graph
+ *
+ * @param predicateTensor Tensor must have a single scalar value, used to decide between then/else branches
+ * @param thenBlock If predicate is true operations in this block are executed
+ * @param elseBlock If predicate is false operations in this block are executed
+ * @param name name of operation
+ *
+ * @return 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.
+ */
+-(NSArray<MPSGraphTensor *> *) ifWithPredicateTensor:(MPSGraphTensor *) predicateTensor
+ thenBlock:(MPSGraphIfThenElseBlock) thenBlock
+ elseBlock:(MPSGraphIfThenElseBlock _Nullable) elseBlock
+ name:(NSString * _Nullable) name
+MPS_SWIFT_NAME( if(_:then:else:name:) );
+
+/*!
+ * @abstract While loop before block, this block executes before the condition is evaluated for each iteration
+ *
+ * @param inputTensors inputTensors to the whileConditionBlock, for the 1st iteration will be same as initialInputs passed to the whileLoop
+ * @param 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.
+ *
+ * @return Tensor MUST be set and have a single scalar value, used to decide between executing the bodyBlock or returning from the whileLoop
+ */
+typedef MPSGraphTensor *_Nonnull(^MPSGraphWhileBeforeBlock)(NSArray<MPSGraphTensor *> *inputTensors,
+ NSMutableArray<MPSGraphTensor *> *_Nonnull resultTensors);
+
+/*!
+ * @abstract While loop after block, this block executes after the condition is evaluated for each iteration
+ *
+ * @param 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
+ *
+ * @return A valid MPSGraphTensor array with results forwarded to condition block
+ */
+typedef NSArray<MPSGraphTensor *> * _Nonnull(^MPSGraphWhileAfterBlock)(NSArray<MPSGraphTensor *> *bodyBlockArguments);
+
+/*!
+ * @abstract Adds a whileLoop operation
+ *
+ * @param initialInputs inputTensors to the whileBeforeBlock, for the 1st iteration will be same as initialInputs passed to the whileLoop
+ * @param before beforeBlock, this will be run first and then call the afterBlock with results or return results from the loop
+ * @param after afterBlock, this will execute after the condition evaluation
+ * @param name name of operation
+ *
+ * @return A valid MPSGraphTensor array with results returned from the conditionBlock depending on the predicateTensor
+ */
+-(NSArray<MPSGraphTensor *> *) whileWithInitialInputs:(NSArray<MPSGraphTensor *> *) initialInputs
+ before:(MPSGraphWhileBeforeBlock) before
+ after:(MPSGraphWhileAfterBlock) after
+ name:(NSString * _Nullable) name
+MPS_SWIFT_NAME( while(initialInputs:before:after:name:) );
+
+
+/*!
+ * @abstract A block for the body in the for loop
+ *
+ * @param index loopIndex per iteration, it is a scalar tensor
+ * @param iterationArguments arguments for this iteration, same count and corresponding elementTypes as initialIterationArguments and return types of the forLoop
+ *
+ * @return A valid MPSGraphTensor array with same count and corresponding elementTypes as initialIterationArguments and return types of the forLoop
+ */
+typedef NSArray<MPSGraphTensor *> * _Nonnull(^MPSGraphForLoopBodyBlock)(MPSGraphTensor *index,
+ NSArray<MPSGraphTensor *> *iterationArguments);
+
+/*!
+ * @abstract 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.
+ *
+ * @param lowerBound lowerBound value of the loop, this is a scalar tensor, this is the index the loop will start with
+ * @param upperBound upperBound value of the loop, this is a scalar tensor
+ * @param step step value of the loop, this is a scalar tensor and must be positive
+ * @param initialBodyArguments initial set of iteration arguments passed to the bodyBlock of the for loop
+ * @param body bodyBlock, this will execute the body of the forLoop
+ * @param name name of operation
+ *
+ * @return A valid MPSGraphTensor array with same count and corresponding elementTypes as initialIterationArguments and return types of the forLoop
+ */
+-(NSArray<MPSGraphTensor *> *) forLoopWithLowerBound:(MPSGraphTensor *) lowerBound
+ upperBound:(MPSGraphTensor *) upperBound
+ step:(MPSGraphTensor *) step
+ initialBodyArguments:(NSArray<MPSGraphTensor *> *)initialBodyArguments
+ body:(MPSGraphForLoopBodyBlock) body
+ name:(NSString * _Nullable) name
+MPS_SWIFT_NAME( for(lowerBound:upperBound:step:initialBodyArguments:body:name:) );
+
+/*!
+ * @abstract Adds a forLoop operation, with a specific number of iterations
+ *
+ * @param numberOfIterations tensor with number of iterations the loop will execute
+ * @param initialBodyArguments initial set of iteration arguments passed to the bodyBlock of the for loop
+ * @param body bodyBlock, this will execute the body of the forLoop, index will go from 0 to numberOfIterations-1
+ * @param name name of operation
+ *
+ * @return A valid MPSGraphTensor array with same count and corresponding elementTypes as initialIterationArguments and return types of the forLoop
+ */
+-(NSArray<MPSGraphTensor *> *) forLoopWithNumberOfIterations:(MPSGraphTensor *) numberOfIterations
+ initialBodyArguments:(NSArray<MPSGraphTensor *> *)initialBodyArguments
+ body:(MPSGraphForLoopBodyBlock) body
+ name:(NSString * _Nullable) name
+MPS_SWIFT_NAME( for(numberOfIterations:initialBodyArguments:body:name:) );
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif /* MPSGraphControlFlowOps_h */
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCore.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCore.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCore.h 2021-03-16 08:47:28.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCore.h 2021-06-02 11:06:55.000000000 -0400
@@ -14,8 +14,13 @@
NS_ASSUME_NONNULL_BEGIN
+MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
+@interface MPSGraphType: NSObject<NSCopying>
+
+@end
+
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
-@interface MPSGraphShapedType: NSObject<NSCopying>
+@interface MPSGraphShapedType: MPSGraphType
/*! @property shape
* @discussion shape of the shapedType
@@ -66,30 +71,61 @@
* @typedef MPSGraphPaddingStyle
* @abstract Tensor Layout
*
- * @constant MPSGraphPaddingStyleExplicit Explicit
+ * @constant MPSGraphPaddingStyleExplicit Explicit
* @constant MPSGraphPaddingStyleTF_SAME TF_SAME
* @constant MPSGraphPaddingStyleTF_VALID TF_VALID
+ * @constant MPSGraphPaddingStyleExplicitOffset Explicit offsets
*/
typedef NS_ENUM(NSUInteger, MPSGraphPaddingStyle)
{
- MPSGraphPaddingStyleExplicit MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) MPS_SWIFT_NAME(explicit) = 0L,
- MPSGraphPaddingStyleTF_VALID MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) = 1L,
- MPSGraphPaddingStyleTF_SAME MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) = 2L,
+ MPSGraphPaddingStyleExplicit MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) MPS_SWIFT_NAME(explicit) = 0L,
+ MPSGraphPaddingStyleTF_VALID MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) = 1L,
+ MPSGraphPaddingStyleTF_SAME MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) = 2L,
+ MPSGraphPaddingStyleExplicitOffset MPS_ENUM_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0)) = 3L,
};
/*!
* @typedef MPSGraphPaddingMode
* @abstract Tensor Padding mode
*
- * @constant MPSGraphPaddingModeConstant Constant
- * @constant MPSGraphPaddingModeReflect Reflect
- * @constant MPSGraphPaddingModeSymmetric Symmetric
+ * @constant MPSGraphPaddingModeConstant Constant
+ * @constant MPSGraphPaddingModeReflect Reflect
+ * @constant MPSGraphPaddingModeSymmetric Symmetric
+ * @constant MPSGraphPaddingModeClampToEdge ClampToEdge (PyTorch ReplicationPad)
+ * @constant MPSGraphPaddingModeZero Zero
+ * @constant MPSGraphPaddingModePeriodic Periodic
+ * @constant MPSGraphPaddingModeAntiPeriodic Anti Periodic
*/
typedef NS_ENUM(NSInteger, MPSGraphPaddingMode)
{
- MPSGraphPaddingModeConstant MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) MPS_SWIFT_NAME(constant) = 0L,
- MPSGraphPaddingModeReflect MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) = 1L,
- MPSGraphPaddingModeSymmetric MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) = 2L,
+ MPSGraphPaddingModeConstant MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) MPS_SWIFT_NAME(constant) = 0L,
+ MPSGraphPaddingModeReflect MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) = 1L,
+ MPSGraphPaddingModeSymmetric MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) = 2L,
+ MPSGraphPaddingModeClampToEdge MPS_ENUM_AVAILABLE_STARTING(macos(11.1), ios(15.0), tvos(15.0)) = 3L,
+ MPSGraphPaddingModeZero MPS_ENUM_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0)) = 4L,
+ MPSGraphPaddingModePeriodic MPS_ENUM_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0)) = 5L, // x[-2] -> x[L-3], where L is size of x.
+ MPSGraphPaddingModeAntiPeriodic MPS_ENUM_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0)) = 6L, // x[-2] -> -x[L-3]
+};
+
+/*!
+ * @typedef MPSGraphStencilReductionMode
+ * @abstract Reduction Mode
+ *
+ * @constant MPSGraphReductionModeMin Min
+ * @constant MPSGraphReductionModeMax Max
+ * @constant MPSGraphReductionModeSum Sum
+ * @constant MPSGraphReductionModeProduct Product
+ * @constant MPSGraphReductionModeArgumentMin Argument Min
+ * @constant MPSGraphReductionModeArgumentMax Argument Max
+ */
+typedef NS_ENUM(NSUInteger, MPSGraphReductionMode)
+{
+ MPSGraphReductionModeMin MPS_ENUM_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0)) = 0L,
+ MPSGraphReductionModeMax MPS_ENUM_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0)) = 1L,
+ MPSGraphReductionModeSum MPS_ENUM_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0)) = 2L,
+ MPSGraphReductionModeProduct MPS_ENUM_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0)) = 3L,
+ MPSGraphReductionModeArgumentMin MPS_ENUM_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0)) = 4L,
+ MPSGraphReductionModeArgumentMax MPS_ENUM_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0)) = 5L
};
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphDepthwiseConvolutionOps.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphDepthwiseConvolutionOps.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphDepthwiseConvolutionOps.h 2021-03-16 13:56:25.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphDepthwiseConvolutionOps.h 2021-06-02 11:06:55.000000000 -0400
@@ -45,13 +45,83 @@
+(nullable instancetype) descriptorWithDataLayout:(MPSGraphTensorNamedDataLayout) dataLayout
weightsLayout:(MPSGraphTensorNamedDataLayout) weightsLayout;
-
-(void) setExplicitPaddingWithPaddingLeft:(NSUInteger) paddingLeft
paddingRight:(NSUInteger) paddingRight
paddingTop:(NSUInteger) paddingTop
paddingBottom:(NSUInteger) paddingBottom;
+@end
+/*!
+ * @class MPSGraphDepthwiseConvolution3DOpDescriptor
+ * @abstract Defines a 3d depthwise convolution operation
+ */
+MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
+@interface MPSGraphDepthwiseConvolution3DOpDescriptor : NSObject<NSCopying>
+
+/*!
+ * @property strides
+ * @discussion Must be three numbers, one for each spatial dimension, fastest running index last.
+ * Default value: @code @[ @1, @1, @1 ] @endcode
+ */
+@property (readwrite, nonatomic, copy) NSArray<NSNumber *> * _Nonnull strides;
+
+/*!
+ * @property dilationRates
+ * @discussion Must be three numbers, one for each spatial dimension, fastest running index last.
+ * Default value: @code @[ @1, @1, @1 ] @endcode
+ */
+@property (readwrite, nonatomic, copy) NSArray<NSNumber *> * _Nonnull dilationRates;
+
+/*!
+ * @property paddingValues
+ * @discussion Must be six numbers, two for each spatial dimension. `paddingValues[0]` defines the explicit padding
+ * 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: @code @[ @0, @0, @0, @0, @0, @0 ] @endcode
+ */
+@property (readwrite, nonatomic, copy) NSArray<NSNumber *> * _Nonnull paddingValues;
+
+/*!
+ * @property paddingStyle
+ * @discussion Defines what kind of padding to apply to operation.
+ * Default value: @code MPSGraphPaddingStyleExplicit @endcode
+ */
+@property (readwrite, nonatomic) MPSGraphPaddingStyle paddingStyle;
+
+/*!
+ * @property channelDimensionIndex
+ * @discussion Defines which axis contains the channels in the input and the weights, within
+ * the 4d tile of the last dimensions. For example the value of @code -1 @endcode
+ * corresponds to @code NDHWC, NHWC @endcode layouts. This allows the placement
+ * of the channel index anywhere within the last 4 dimensions of the tensor. In case the
+ * weights are in a different layout it is recommended to bring them to the same layout
+ * as inputs using transposes or permutations.
+ * Default value: @code -4 @endcode, corresponds to @code NCDHW @endcode
+ * and @code CDHW @endcode layouts.
+ */
+@property (readwrite, nonatomic) NSInteger channelDimensionIndex;
+/*!
+ * @abstract Creates a 3d depthwise convolution descriptor with given values.
+ * @param strides See corresponding property above.
+ * @param dilationRates See corresponding property above.
+ * @param paddingValues See corresponding property above.
+ * @param paddingStyle See corresponding property above.
+ * @return The descriptor on autoreleasepool.
+ */
++(nullable instancetype) descriptorWithStrides:(NSArray<NSNumber *> * _Nonnull) strides
+ dilationRates:(NSArray<NSNumber *> * _Nonnull) dilationRates
+ paddingValues:(NSArray<NSNumber *> * _Nonnull) paddingValues
+ paddingStyle:(MPSGraphPaddingStyle) paddingStyle;
+
+/*!
+ * @abstract Creates a 3d depthwise convolution descriptor with default values.
+ * @param paddingStyle See corresponding property above.
+ * @return The descriptor on autoreleasepool.
+ */
++(nullable instancetype) descriptorWithPaddingStyle:(MPSGraphPaddingStyle) paddingStyle;
+
@end
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@@ -76,7 +146,66 @@
outputShape:(MPSShape *) outputShape
descriptor:(MPSGraphDepthwiseConvolution2DOpDescriptor *) descriptor
name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( depthwiseConvolution2DWeightsGradient(_:source:outputShape:descriptor:name:) );
+MPS_SWIFT_NAME( depthwiseConvolution2DWeightsGradient(_:source:outputShape:descriptor:name:));
+
+#pragma mark - 3D Depthwise convolution
+
+/*!
+ * @abstract Create 3d depthwise convolution operation and return the result tensor.
+ * @discussion Just like depthwise convolution2d, but in three dimensions. Different layouts are supported by using
+ * the @code channelDimensionIndex @endcode property. If your weights need a different layout
+ * add a permute operation on them before this operation.
+
+ * @param source 3d Image source as tensor - must be at least rank=4 (CDHW when channelDimensionIndex = -4).
+ * @param weights Weights tensor, must be rank=4 - axes are interpreted as CDHW when channelDimensionIndex = -4 .
+ * @param descriptor Specifies strides, dilation rates and paddings.
+ * @param name The name for the operation.
+ *
+ * @return A valid MPSGraphTensor object
+ */
+-(MPSGraphTensor *) depthwiseConvolution3DWithSourceTensor:(MPSGraphTensor *) source
+ weightsTensor:(MPSGraphTensor *) weights
+ descriptor:(MPSGraphDepthwiseConvolution3DOpDescriptor* _Nonnull) descriptor
+ name:(NSString * _Nullable) name
+MPS_SWIFT_NAME( depthwiseConvolution3D(_:weights:descriptor:name:))
+MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
+
+/*!
+ * @abstract Create 3d depthwise convolution gradient for data operation and return the result tensor.
+
+ * @param incomingGradient 3d input gradient tensor - must be at least rank=4 (CDHW).
+ * @param weights Weights tenstor, must be rank=4 - axes are interpreted as CDHW.
+ * @param outputShape Shape of the οutput tensor (and therefore input tensor of forward pass).
+ * @param descriptor Specifies strides, dilation rates and paddings.
+ * @param name The name for the operation (NCDHW).
+ *
+ * @return A valid MPSGraphTensor object
+ */
+-(MPSGraphTensor *) depthwiseConvolution3DDataGradientWithIncomingGradientTensor:(MPSGraphTensor *) incomingGradient
+ weightsTensor:(MPSGraphTensor *) weights
+ outputShape:(MPSShape * _Nullable) outputShape
+ descriptor:(MPSGraphDepthwiseConvolution3DOpDescriptor* _Nonnull) descriptor
+ name:(NSString * _Nullable) name
+MPS_SWIFT_NAME( depthwiseConvolution3DDataGradient(_:weights:outputShape:descriptor:name:))
+MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
+
+/*!
+ * @abstract Create 3d depthwise convolution gradient for weights operation and return the result tensor.
+
+ * @param incomingGradient 3d input gradient tensor - must be at least rank=4 (NCDHW).
+ * @param source Forward pass 3d Image source as tensor - must be at least rank=4 (NCDHW).
+ * @param outputShape Shape of the οutput tensor (and therefore weight tensor of forward pass).
+ * @param descriptor Specifies strides, dilation rates and paddings.
+ * @param name The name for the operation (NCDHW).
+ *
+ * @return A valid MPSGraphTensor object
+ */
+-(MPSGraphTensor *) depthwiseConvolution3DWeightsGradientWithIncomingGradientTensor:(MPSGraphTensor *) incomingGradient
+ sourceTensor:(MPSGraphTensor *) source
+ outputShape:(MPSShape *) outputShape
+ descriptor:(MPSGraphDepthwiseConvolution3DOpDescriptor *) descriptor
+ name:(NSString * _Nullable) name
+MPS_SWIFT_NAME( depthwiseConvolution3DWeightsGradient(_:source:outputShape:descriptor:name:));
@end
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphDevice.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphDevice.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphDevice.h 2021-03-16 08:47:27.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphDevice.h 2021-06-02 12:47:03.000000000 -0400
@@ -27,7 +27,7 @@
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraphDevice : NSObject
-/*! @property deviceType
+/*! @property type
*/
@property (readonly, nonatomic) MPSGraphDeviceType type;
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphExecutable.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphExecutable.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphExecutable.h 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphExecutable.h 2021-06-02 11:06:55.000000000 -0400
@@ -0,0 +1,139 @@
+//
+// MPSGraphExecutable.h
+// MPSGraph
+//
+// Created by Dhruv Saksena on 4/11/21.
+// Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#ifndef MPSGraphExecutable_h
+#define MPSGraphExecutable_h
+
+#import <MetalPerformanceShadersGraph/MPSGraph.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*! @abstract A notification when graph executable execution: has finished
+ * @param results If no error, the results produced by the graph operation.
+ * @param error If an error occurs, more information might be found here.
+ */
+typedef void (^MPSGraphExecutableCompletionHandler)(NSArray<MPSGraphTensorData *> * results,
+ NSError * _Nullable error);
+
+/*! @abstract A notification when graph executable execution: has finished
+ * @param results If no error, the results produced by the graph operation.
+ * @param error If an error occurs, more information might be found here.
+ */
+typedef void (^MPSGraphExecutableScheduledHandler)(NSArray<MPSGraphTensorData *> * results,
+ NSError * _Nullable error);
+
+MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
+@interface MPSGraphExecutableExecutionDescriptor : NSObject
+
+/*! @property scheduledHandler
+ * @discussion scheduledHandler for the graph executable, default value is nil
+ */
+@property (readwrite, atomic) MPSGraphExecutableScheduledHandler scheduledHandler;
+
+/*! @property completionHandler
+ * @discussion completionHandler for the graph executable, default value is nil
+ */
+@property (readwrite, atomic) MPSGraphExecutableCompletionHandler completionHandler;
+
+/*! @property waitUntilCompleted
+ * @discussion waitUntilCompleted for the graph executable, default value is false
+ */
+@property (readwrite, atomic) BOOL waitUntilCompleted;
+
+@end
+
+/*! @class MPSGraphExecutable
+ * @abstract Compiled representation of a compute graph executable
+ * @discussion An MPSGraphExecutable is a compiled graph for specific feeds for specific targetTensors and targetOperations
+ *
+ */
+MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
+@interface MPSGraphExecutable : NSObject
+
+/*! @property options
+ * @discussion options for the graph, default value is MPSGraphOptionsDefault
+ */
+@property (readwrite, atomic) MPSGraphOptions options;
+
+/*! @property feedTensors
+ * @discussion feedTensors for the graph, can be used to order the inputs when executable was created with an MPSGraph
+ */
+@property (readonly, atomic, nullable) NSArray<MPSGraphTensor *> *feedTensors;
+
+/*! @property targetTensors
+ * @discussion targetTensors for the graph, can be used to order the outputs when executable was created with an MPSGraph
+ */
+@property (readonly, atomic, nullable) NSArray<MPSGraphTensor *> *targetTensors;
+
+/*!
+ * @abstract Specialize MLIR module and optimize it
+ *
+ * @param device optional MPSGraph device to compile with
+ * @param inputTypes input types
+ *
+ */
+-(void) specializeWithDevice:(MPSGraphDevice * _Nullable) device
+ inputTypes:(NSArray<MPSGraphType *> *) inputTypes
+ compilationDescriptor:(MPSGraphCompilationDescriptor * _Nullable) compilationDescriptor;
+
+/*!
+ * @abstract Runs the graph for given feeds to return targetTensor values, ensuring all target operations also executed.
+ * This call is synchronous and will return on completion of execution
+ *
+ * @param commandQueue CommandQueue passed to exectute the graph on
+ * @param inputsArray Feeds tensorData for the placeholder tensors, same order as arguments of main function
+ * @param resultsArray Results tensorData for which the caller wishes MPSGraphTensorData to be returned
+ *
+ * @return A valid MPSGraphTensorData array with results synchronized to the CPU memory if MPSGraphOptionsSynchronizeResults set.
+ */
+-(NSArray<MPSGraphTensorData *> *) runWithMTLCommandQueue:(id<MTLCommandQueue>) commandQueue
+ inputsArray:(NSArray<MPSGraphTensorData *> *) inputsArray
+ resultsArray:(NSArray<MPSGraphTensorData *> * _Nullable) resultsArray
+ executionDescriptor:(MPSGraphExecutableExecutionDescriptor * _Nullable) executionDescriptor
+MPS_SWIFT_NAME( run(with:inputs:results:executionDescriptor:) );
+
+/*!
+ * @abstract Runs the graph for given feeds to return targetTensor values, ensuring all target operations also executed.
+ * This call is asynchronous and will return immediately if a completionHandler is set.
+ *
+ * @param commandQueue CommandQueue passed to exectute the graph on
+ * @param inputsArray Feeds tensorData for the placeholder tensors, same order as arguments of main function
+ * @param resultsArray Tensors for which the caller wishes MPSGraphTensorData to be returned
+ * @param executionDescriptor ExecutionDescriptor to be passed in and used,
+ *
+ * @return A valid MPSGraphTensorData array with results synchronized to the CPU memory if MPSGraphOptionsSynchronizeResults set.
+ */
+-(NSArray<MPSGraphTensorData *> *) runAsyncWithMTLCommandQueue:(id<MTLCommandQueue>) commandQueue
+ inputsArray:(NSArray<MPSGraphTensorData *> *) inputsArray
+ resultsArray:(NSArray<MPSGraphTensorData *> * _Nullable) resultsArray
+ executionDescriptor:(MPSGraphExecutableExecutionDescriptor * _Nullable) executionDescriptor
+MPS_SWIFT_NAME( run(with:inputs:results:executionDescriptor:) );
+
+/*!
+ * @abstract Runs the graph for given feeds to return targetTensor values, ensuring all target operations also executed.
+ * This call is asynchronous and will return immediately if a completionHandler is set.
+ *
+ * @param commandBuffer commandBuffer passed to exectute the graph on
+ * @param inputsArray Feeds tensorData for the placeholder tensors, same order as arguments of main function
+ * @param resultsArray Tensors for which the caller wishes MPSGraphTensorData to be returned
+ * @param executionDescriptor ExecutionDescriptor to be passed in and used,
+ *
+ * @return A valid MPSGraphTensorData array with results synchronized to the CPU memory if MPSGraphOptionsSynchronizeResults set.
+ */
+-(NSArray<MPSGraphTensorData *> *) encodeToCommandBuffer:(MPSCommandBuffer *) commandBuffer
+ inputsArray:(NSArray<MPSGraphTensorData *> *) inputsArray
+ resultsArray:(NSArray<MPSGraphTensorData *> * _Nullable) resultsArray
+ executionDescriptor:(MPSGraphExecutableExecutionDescriptor * _Nullable) executionDescriptor
+MPS_SWIFT_NAME( encode(to:inputs:results:executionDescriptor:) );
+
+@end
+
+
+NS_ASSUME_NONNULL_END
+
+#endif /* MPSGraphExecutable_h */
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphGatherNDOps.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphGatherNDOps.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphGatherNDOps.h 2021-03-16 08:47:28.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphGatherNDOps.h 2021-05-22 07:13:13.000000000 -0400
@@ -1,54 +1,14 @@
//
-// MPSGatherNDOps.h
+// MPSGraphGatherNDOps.h
// MPSGraph
//
-// Created on 3/10/20.
-// Copyright © 2020 Apple Inc. All rights reserved.
+// Created by Chris Bayley on 12/2/20.
+// Copyright © 2020 Dhruv Saksena. All rights reserved.
//
-#ifndef MPSGatherNDOps_h
-#define MPSGatherNDOps_h
+#ifndef MPSGraphGatherNDOps_h
+#define MPSGraphGatherNDOps_h
-NS_ASSUME_NONNULL_BEGIN
+#import "MPSGraphGatherOps.h"
-MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
-@interface MPSGraph(GatherNDOps)
-/*!
- * @abstract Create GatherND op and return the result tensor
- * @discussion Gathers the slices in updatesTensor to the result tensor along the indices in indicesTensor.
- * The gather is defined as
- * @code
- * B = batchDims
- * U = updates.rank - B
- * P = res.rank - B
- * Q = inds.rank - B
- * K = inds.shape[-1]
- * index_slice = indices[i_{b0},...,i_{bB},i_{0},..,i_{Q-1}]
- * res[i_{b0},...,i_{bB},i_{0},...,i_{Q-1}] = updates[i_{b0},...,i_{bB},index_slice[0],...,index_slice[K-1]]
- * @endcode
- * The tensors have the following shape requirements
- * @code
- * U > 0; P > 0; Q > 0
- * K <= U
- * P = (U-K) + Q-1
- * indices.shape[0:Q-1] = res.shape[0:Q-1]
- * res.shape[Q:P] = updates.shape[K:U]
- * @endcode
- *
- * @param updatesTensor Tensor containing slices to be inserted into the result tensor
- * @param indicesTensor Tensor containg the updates indices to read slices from
- * @param batchDimensions The number of batch dimensions
- * @param name The name for the operation
- *
- * @return A valid MPSGraphTensor object
-*/
--(MPSGraphTensor *) gatherNDWithUpdatesTensor:(MPSGraphTensor *) updatesTensor
- indicesTensor:(MPSGraphTensor *) indicesTensor
- batchDimensions:(NSUInteger) batchDimensions
- name:(NSString * _Nullable) name;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-#endif /* MPSGatherNDOps_h */
+#endif /* MPSGraphGatherNDOps_h */
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphGatherOps.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphGatherOps.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphGatherOps.h 2021-03-16 08:47:28.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphGatherOps.h 2021-06-02 12:47:03.000000000 -0400
@@ -12,6 +12,44 @@
NS_ASSUME_NONNULL_BEGIN
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
+@interface MPSGraph(GatherNDOps)
+/*!
+ * @abstract Create GatherND op and return the result tensor
+ * @discussion Gathers the slices in updatesTensor to the result tensor along the indices in indicesTensor.
+ * The gather is defined as
+ * @code
+ * B = batchDims
+ * U = updates.rank - B
+ * P = res.rank - B
+ * Q = inds.rank - B
+ * K = inds.shape[-1]
+ * index_slice = indices[i_{b0},...,i_{bB},i_{0},..,i_{Q-1}]
+ * res[i_{b0},...,i_{bB},i_{0},...,i_{Q-1}] = updates[i_{b0},...,i_{bB},index_slice[0],...,index_slice[K-1]]
+ * @endcode
+ * The tensors have the following shape requirements
+ * @code
+ * U > 0; P > 0; Q > 0
+ * K <= U
+ * P = (U-K) + Q-1
+ * indices.shape[0:Q-1] = res.shape[0:Q-1]
+ * res.shape[Q:P] = updates.shape[K:U]
+ * @endcode
+ *
+ * @param updatesTensor Tensor containing slices to be inserted into the result tensor
+ * @param indicesTensor Tensor containg the updates indices to read slices from
+ * @param batchDimensions The number of batch dimensions
+ * @param name The name for the operation
+ *
+ * @return A valid MPSGraphTensor object
+*/
+-(MPSGraphTensor *) gatherNDWithUpdatesTensor:(MPSGraphTensor *) updatesTensor
+ indicesTensor:(MPSGraphTensor *) indicesTensor
+ batchDimensions:(NSUInteger) batchDimensions
+ name:(NSString * _Nullable) name;
+
+@end
+
+MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(GatherOps)
/*!
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphLossOps.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphLossOps.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphLossOps.h 2021-03-16 08:47:29.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphLossOps.h 2021-06-02 12:47:04.000000000 -0400
@@ -19,11 +19,13 @@
*
* @constant MPSGraphLossReductionTypeAxis No Reductions
* @constant MPSGraphLossReductionTypeSum ReduceSum down to a scalar
+ * @constant MPSGraphLossReductionTypeMean ReduceMean down to a scalar
*/
typedef NS_ENUM(uint64_t, MPSGraphLossReductionType)
{
MPSGraphLossReductionTypeAxis MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) MPS_SWIFT_NAME(none) = 0,
MPSGraphLossReductionTypeSum MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) = 1L,
+ MPSGraphLossReductionTypeMean MPS_ENUM_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0)) = 2L,
};
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphPoolingOps.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphPoolingOps.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphPoolingOps.h 2021-03-16 09:54:23.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphPoolingOps.h 2021-06-02 05:35:18.000000000 -0400
@@ -64,6 +64,95 @@
@end
+/*!
+ * @class MPSGraphPooling4DOpDescriptor
+ * @abstract Defines a 4d pooling operation
+ */
+MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
+@interface MPSGraphPooling4DOpDescriptor : NSObject<NSCopying>
+
+/*!
+ * @property kernelSizes
+ * @discussion 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;
+
+/*!
+ * @property strides
+ * @discussion Must be four numbers, one for each spatial dimension, fastest running index last.
+ * Default value: @code @[ @1, @1, @1, @1 ] @endcode
+ */
+@property (readwrite, nonatomic, copy) NSArray<NSNumber *> * _Nonnull strides;
+
+/*!
+ * @property dilationRates
+ * @discussion Must be four numbers, one for each spatial dimension, fastest running index last.
+ * Default value: @code @[ @1, @1, @1, @1 ] @endcode
+ */
+@property (readwrite, nonatomic, copy) NSArray<NSNumber *> * _Nonnull dilationRates;
+
+/*!
+ * @property paddingValues
+ * @discussion Must be eight numbers, two for each spatial dimension. `paddingValues[0]` defines the explicit padding
+ * 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: @code @[ @0, @0, @0, @0, @0, @0, @0, @0 ] @endcode
+ */
+@property (readwrite, nonatomic, copy) NSArray<NSNumber *> * _Nonnull paddingValues;
+
+/*!
+ * @property paddingStyle
+ * @discussion Defines what kind of padding to apply to operation.
+ * Default value: @code MPSGraphPaddingStyleExplicit @endcode
+ */
+@property (readwrite, nonatomic) MPSGraphPaddingStyle paddingStyle;
+
+/*!
+ * @property ceilMode
+ * @discussion If set then the output size is computed by rounding up instead of down when
+ * dividing by stride.
+ * Default value: @code NO @endcode
+ */
+@property (readwrite, nonatomic) BOOL ceilMode;
+
+/*!
+ * @property includeZeroPadToAverage
+ * @discussion For average pooling use 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.
+ * Default value: @code NO @endcode
+ */
+@property (readwrite, nonatomic) BOOL includeZeroPadToAverage;
+
+
+/*!
+ * @abstract Creates a 4d pooling descriptor with given values.
+ * @param kernelSizes See corresponding property above.
+ * @param strides See corresponding property above.
+ * @param dilationRates See corresponding property above.
+ * @param paddingValues See corresponding property above.
+ * @param paddingStyle See corresponding property above.
+ * @return The descriptor on autoreleasepool.
+ */
++(nullable instancetype) descriptorWithKernelSizes:(NSArray<NSNumber *> * _Nonnull) kernelSizes
+ strides:(NSArray<NSNumber *> * _Nonnull) strides
+ dilationRates:(NSArray<NSNumber *> * _Nonnull) dilationRates
+ paddingValues:(NSArray<NSNumber *> * _Nonnull) paddingValues
+ paddingStyle:(MPSGraphPaddingStyle) paddingStyle;
+
+/*!
+ * @abstract Creates a 4d pooling descriptor with default values.
+ * @param kernelSizes See corresponding property above.
+ * @param paddingStyle See corresponding property above.
+ * @return The descriptor on autoreleasepool.
+ */
++(nullable instancetype) descriptorWithKernelSizes:(NSArray<NSNumber *> * _Nonnull) kernelSizes
+ paddingStyle:(MPSGraphPaddingStyle) paddingStyle;
+
+@end
+
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(MPSGraphPoolingOps)
@@ -85,6 +174,49 @@
descriptor:(MPSGraphPooling2DOpDescriptor *) descriptor
name:(NSString * _Nullable) name;
+
+-(MPSGraphTensor *) maxPooling4DWithSourceTensor:(MPSGraphTensor *) source
+ descriptor:(MPSGraphPooling4DOpDescriptor *) descriptor
+ name:(NSString * _Nullable) name
+MPS_SWIFT_NAME( maxPooling4D(_:descriptor:name:))
+MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
+
+-(MPSGraphTensor *) maxPooling4DGradientWithGradientTensor:(MPSGraphTensor *) gradient
+ sourceTensor:(MPSGraphTensor *) source
+ descriptor:(MPSGraphPooling4DOpDescriptor *) descriptor
+ name:(NSString * _Nullable) name
+MPS_SWIFT_NAME( maxPooling4DGradient(_:source:descriptor:name:))
+MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
+
+-(MPSGraphTensor *) avgPooling4DWithSourceTensor:(MPSGraphTensor *) source
+ descriptor:(MPSGraphPooling4DOpDescriptor *) descriptor
+ name:(NSString * _Nullable) name
+MPS_SWIFT_NAME( avgPooling4D(_:descriptor:name:))
+MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
+
+
+-(MPSGraphTensor *) avgPooling4DGradientWithGradientTensor:(MPSGraphTensor *) gradient
+ sourceTensor:(MPSGraphTensor *) source
+ descriptor:(MPSGraphPooling4DOpDescriptor *) descriptor
+ name:(NSString * _Nullable) name
+MPS_SWIFT_NAME( avgPooling4DGradient(_:source:descriptor:name:))
+MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
+
+
+-(MPSGraphTensor *) L2NormPooling4DWithSourceTensor:(MPSGraphTensor *) source
+ descriptor:(MPSGraphPooling4DOpDescriptor *) descriptor
+ name:(NSString * _Nullable) name
+MPS_SWIFT_NAME( L2NormPooling4D(_:descriptor:name:))
+MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
+
+
+-(MPSGraphTensor *) L2NormPooling4DGradientWithGradientTensor:(MPSGraphTensor *) gradient
+ sourceTensor:(MPSGraphTensor *) source
+ descriptor:(MPSGraphPooling4DOpDescriptor *) descriptor
+ name:(NSString * _Nullable) name
+MPS_SWIFT_NAME( L2NormPooling4DGradient(_:source:descriptor:name:))
+MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
+
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphReductionOps.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphReductionOps.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphReductionOps.h 2021-03-16 08:47:28.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphReductionOps.h 2021-06-02 05:35:19.000000000 -0400
@@ -16,37 +16,138 @@
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(MPSGraphReductionOps)
+/*!
+ * @abstract Create reduction sum op and return the result tensor.
+ *
+ * @param tensor input tensor
+ * @param axis axis of reduction
+ * @param name name for the operation
+ *
+ * @return A valid MPSGraphTensor object.
+ */
-(MPSGraphTensor *) reductionSumWithTensor:(MPSGraphTensor *) tensor
axis:(NSInteger) axis
name:(NSString * _Nullable) name;
--(MPSGraphTensor *) reductionSumWithTensor:(MPSGraphTensor *) tensor
- axes:(NSArray<NSNumber *> *)axes
- name:(NSString * _Nullable) name;
-
+/*!
+ * @abstract Create reduction sum op and return the result tensor.
+ *
+ * @param tensor input tensor
+ * @param axes axes of reduction
+ * @param name name for the operation
+ *
+ * @return A valid MPSGraphTensor object.
+ */
+-(MPSGraphTensor *) reductionSumWithTensor:(MPSGraphTensor *)tensor
+ axes:(NSArray<NSNumber *> *_Nullable)axes
+ name:(NSString *_Nullable)name;
+
+/*!
+ * @abstract Create reduction max op and return the result tensor.
+ *
+ * @param tensor input tensor
+ * @param axis axis of reduction
+ * @param name name for the operation
+ *
+ * @return A valid MPSGraphTensor object.
+ */
-(MPSGraphTensor *) reductionMaximumWithTensor:(MPSGraphTensor *) tensor
axis:(NSInteger) axis
name:(NSString * _Nullable) name;
--(MPSGraphTensor *) reductionMaximumWithTensor:(MPSGraphTensor *) tensor
- axes:(NSArray<NSNumber *> *)axes
- name:(NSString * _Nullable) name;
-
+/*!
+ * @abstract Create reduction max op and return the result tensor.
+ *
+ * @param tensor input tensor
+ * @param axes axes of reduction
+ * @param name name for the operation
+ *
+ * @return A valid MPSGraphTensor object.
+ */
+-(MPSGraphTensor *) reductionMaximumWithTensor:(MPSGraphTensor *)tensor
+ axes:(NSArray<NSNumber *> *_Nullable)axes
+ name:(NSString *_Nullable)name;
+
+/*!
+ * @abstract Create reduction minimum op and return the result tensor.
+ *
+ * @param tensor input tensor
+ * @param axis axis of reduction
+ * @param name name for the operation
+ *
+ * @return A valid MPSGraphTensor object.
+ */
-(MPSGraphTensor *) reductionMinimumWithTensor:(MPSGraphTensor *) tensor
axis:(NSInteger) axis
name:(NSString * _Nullable) name;
--(MPSGraphTensor *) reductionMinimumWithTensor:(MPSGraphTensor *) tensor
- axes:(NSArray<NSNumber *> *)axes
- name:(NSString * _Nullable) name;
-
+/*!
+ * @abstract Create reduction min op and return the result tensor.
+ *
+ * @param tensor input tensor
+ * @param axes axes of reduction
+ * @param name name for the operation
+ *
+ * @return A valid MPSGraphTensor object.
+ */
+-(MPSGraphTensor *) reductionMinimumWithTensor:(MPSGraphTensor *)tensor
+ axes:(NSArray<NSNumber *> *_Nullable)axes
+ name:(NSString *_Nullable)name;
+
+/*!
+ * @abstract Create reduction product op and return the result tensor.
+ *
+ * @param tensor input tensor
+ * @param axis axis of reduction
+ * @param name name for the operation
+ *
+ * @return A valid MPSGraphTensor object.
+ */
-(MPSGraphTensor *) reductionProductWithTensor:(MPSGraphTensor *) tensor
axis:(NSInteger) axis
name:(NSString * _Nullable) name;
--(MPSGraphTensor *) reductionProductWithTensor:(MPSGraphTensor *) tensor
- axes:(NSArray<NSNumber *> *)axes
- name:(NSString * _Nullable) name;
+
+/*!
+ * @abstract Create reduction product op and return the result tensor.
+ *
+ * @param tensor input tensor
+ * @param axes axes of reduction
+ * @param name name for the operation
+ *
+ * @return A valid MPSGraphTensor object.
+ */
+-(MPSGraphTensor *) reductionProductWithTensor:(MPSGraphTensor *)tensor
+ axes:(NSArray<NSNumber *> *_Nullable)axes
+ name:(NSString *_Nullable)name;
+
+/*!
+ * @abstract Create reduction argMax op and return the result tensor.
+ *
+ * @param tensor input tensor
+ * @param axis axis of reduction
+ * @param name name for the operation
+ *
+ * @return A valid MPSGraphTensor object.
+ */
+-(MPSGraphTensor *) reductionArgMaximumWithTensor:(MPSGraphTensor *)tensor
+ axis:(NSInteger)axis
+ name:(NSString *_Nullable)name
+MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), macCatalyst(15.0), tvos(15.0));
+
+/*!
+ * @abstract Create reduction argMin op and return the result tensor.
+ *
+ * @param tensor input tensor
+ * @param axis axis of reduction
+ * @param name name for the operation
+ *
+ * @return A valid MPSGraphTensor object.
+ */
+-(MPSGraphTensor *) reductionArgMinimumWithTensor:(MPSGraphTensor *)tensor
+ axis:(NSInteger)axis
+ name:(NSString *_Nullable)name
+MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), macCatalyst(15.0), tvos(15.0));
@end
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphScatterNDOps.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphScatterNDOps.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphScatterNDOps.h 2021-03-16 08:47:28.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphScatterNDOps.h 2021-06-02 12:47:03.000000000 -0400
@@ -11,6 +11,29 @@
NS_ASSUME_NONNULL_BEGIN
+/*!
+ * @typedef MPSGraphScatterMode
+ * @abstract Scatter mode
+ *
+ * @constant MPSGraphScatterModeAdd Add
+ * @constant MPSGraphScatterModeSub Sub
+ * @constant MPSGraphScatterModeMul Multiply
+ * @constant MPSGraphScatterModeDiv Divide
+ * @constant MPSGraphScatterModeMin Minimum
+ * @constant MPSGraphScatterModeMax Maximum
+ * @constant MPSGraphScatterModeSet Set
+ */
+typedef NS_ENUM(NSInteger, MPSGraphScatterMode)
+{
+ MPSGraphScatterModeAdd MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) MPS_SWIFT_NAME(add) = 0L,
+ MPSGraphScatterModeSub MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) = 1L,
+ MPSGraphScatterModeMul MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) = 2L,
+ MPSGraphScatterModeDiv MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) = 3L,
+ MPSGraphScatterModeMin MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) = 4L,
+ MPSGraphScatterModeMax MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) = 5L,
+ MPSGraphScatterModeSet MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) = 6L,
+};
+
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(ScatterNDOps)
@@ -39,6 +62,43 @@
* @param indicesTensor Tensor containg the result indices to insert slices at
* @param shape The shape of the result tensor
* @param batchDimensions The number of batch dimensions
+ * @param mode The type of update to use on the destination
+ * @param name The name for the operation
+ *
+ * @return A valid MPSGraphTensor object
+ */
+-(MPSGraphTensor *) scatterNDWithUpdatesTensor:(MPSGraphTensor *) updatesTensor
+ indicesTensor:(MPSGraphTensor *) indicesTensor
+ shape:(MPSShape *) shape
+ batchDimensions:(NSUInteger) batchDimensions
+ mode:(MPSGraphScatterMode) mode
+ name:(NSString * _Nullable) name;
+
+/*!
+ * @abstract Create ScatterND op and return the result tensor
+ * @discussion Scatters the slices in updatesTensor to the result tensor along the indices in indicesTensor.
+ * The scatter is defined as
+ * @code
+ * B = batchDims
+ * U = updates.rank - B
+ * P = res.rank - B
+ * Q = inds.rank - B
+ * K = inds.shape[-1]
+ * index_slice = indices[i_{b0},...,i_{bB},i_{0},..,i_{Q-1}]
+ * res[i_{b0},...,i_{bB},index_slice[0],...,index_slice[K-1]] = updates[i_{b0},...,i_{bB},i_{0},...,i_{Q-1}]
+ * @endcode
+ * Collsions will be summed, and slices not set by indices are set to 0. The tensors have the following shape requirements
+ * @code
+ * K <= P
+ * U = (P-K) + Q-1
+ * indices.shape[0:Q-1] = updates.shape[0:Q-1]
+ * updates.shape[Q:U] = res.shape[K:P]
+ * @endcode
+ *
+ * @param updatesTensor Tensor containing slices to be inserted into the result tensor
+ * @param indicesTensor Tensor containg the result indices to insert slices at
+ * @param shape The shape of the result tensor
+ * @param batchDimensions The number of batch dimensions
* @param name The name for the operation
*
* @return A valid MPSGraphTensor object
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphSparseOps.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphSparseOps.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphSparseOps.h 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphSparseOps.h 2021-06-02 05:35:19.000000000 -0400
@@ -0,0 +1,95 @@
+//
+// MPSGraphSparseOps.h
+// MetalPerformanceShadersGraph
+//
+// Created on 12/30/20.
+// Copyright © 2020 Apple Inc. All rights reserved.
+//
+
+#ifndef MPSGraphSparseOps_h
+#define MPSGraphSparseOps_h
+
+#import <MetalPerformanceShadersGraph/MPSGraph.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ * @typedef MPSGraphSparseStorageType
+ * @abstract Sparse Storage options in graph
+ *
+ * @constant MPSGraphSparseStorageCOO COO Storage
+ * @constant MPSGraphSparseStorageCSC CSC Storage
+ * @constant MPSGraphSparseStorageCSR CSR Storage
+ */
+typedef NS_ENUM(uint64_t, MPSGraphSparseStorageType) {
+ MPSGraphSparseStorageCOO MPS_ENUM_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0)) MPS_SWIFT_NAME(COO) = 0,
+ MPSGraphSparseStorageCSC MPS_ENUM_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0)) = 1L,
+ MPSGraphSparseStorageCSR MPS_ENUM_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0)) = 2L,
+};
+
+MPS_ENUM_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
+@interface MPSGraphCreateSparseOpDescriptor : NSObject <NSCopying>
+
+@property(readwrite, nonatomic) MPSGraphSparseStorageType sparseStorageType;
+@property(readwrite, nonatomic) MPSDataType dataType;
+
++ (nullable instancetype)descriptorWithStorageType:(MPSGraphSparseStorageType)sparseStorageType
+ dataType:(MPSDataType)dataType
+ MPS_SWIFT_NAME(sparseDescriptor(descriptorWithStorageType:dataType:));
+
+@end
+
+MPS_ENUM_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
+@interface MPSGraph (MPSGraphSparseOps)
+
+/*!
+ * @abstract Create sparseTensor op and return the result tensor
+ *
+ *
+ * @param sparseStorageType sparseStorageType
+ * @param inputTensorArray array of input tensors as [sparseVals, indexTensor0, indexTensor1]
+ * @param shape shape of sparse tensor
+ * @param dataType dataType of sparse tensor
+ * @param name name for the operation
+ *
+ * @discussion sparseVals corresponds to non zero values in matrix.
+ * indexTensor0 and indexTensor1 are indices used for indexing into sparse data structure
+ * For COO, indexTensor0 is x index and indexTensor1 is y index
+ * For CSC, indexTensor0 and indexTensor1 correspond to rowIndex and colStarts respectively.
+ * For CSR, indexTensor0 and indexTensor1 correspond to colIndex and rowStarts respectively.
+ * @return A valid MPSGraphTensor object.
+ */
+- (MPSGraphTensor *)sparseTensorWithType:(MPSGraphSparseStorageType)sparseStorageType
+ tensors:(NSArray<MPSGraphTensor *> *)inputTensorArray
+ shape:(MPSShape *)shape
+ dataType:(MPSDataType)dataType
+ name:(NSString *_Nullable)name
+ MPS_SWIFT_NAME(sparseTensor(sparseTensorWithType:tensors:shape:dataType:name:));
+
+/*!
+ * @abstract Create sparseTensor op and return the result tensor
+ *
+ *
+ * @param sparseDescriptor sparseDescriptorType
+ * @param inputTensorArray array of input tensors as [sparseVals, indexTensor0, indexTensor1]
+ * @param shape shape of sparse tensor
+ * @param name name for the operation
+ *
+ * @discussion sparseVals corresponds to non zero values in matrix.
+ * indexTensor0 and indexTensor1 are indices used for indexing into sparse data structure
+ * For COO, indexTensor0 is x index and indexTensor1 is y index
+ * For CSC, indexTensor0 and indexTensor1 correspond to rowIndex and colStarts respectively.
+ * For CSR, indexTensor0 and indexTensor1 correspond to colIndex and rowStarts respectively.
+ * @return A valid MPSGraphTensor object.
+ */
+- (MPSGraphTensor *)sparseTensorWithDescriptor:(MPSGraphCreateSparseOpDescriptor *)sparseDescriptor
+ tensors:(NSArray<MPSGraphTensor *> *)inputTensorArray
+ shape:(MPSShape *)shape
+ name:(NSString *_Nullable)name
+ MPS_SWIFT_NAME(sparseTensor(sparseTensorWithDescriptor:tensors:shape:name:));
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif /* MPSGraphSparseOps_h */
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphStencilOps.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphStencilOps.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphStencilOps.h 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphStencilOps.h 2021-06-02 12:47:02.000000000 -0400
@@ -0,0 +1,126 @@
+//
+// MPSGraphStencilOps.h
+// MetalPerformanceShadersGraph
+//
+// Created by Riya Savla on 12/16/20.
+// Copyright © 2020 Apple Inc. All rights reserved.
+//
+
+#ifndef MPSGraphStencilOps_h
+#define MPSGraphStencilOps_h
+
+#import <MetalPerformanceShadersGraph/MPSGraph.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
+@interface MPSGraphStencilOpDescriptor : NSObject<NSCopying>
+
+@property (readwrite, nonatomic) MPSGraphReductionMode reductionMode;
+@property (readwrite, nonatomic, copy) MPSShape * offsets;
+@property (readwrite, nonatomic, copy) MPSShape * strides;
+@property (readwrite, nonatomic, copy) MPSShape * dilationRates;
+@property (readwrite, nonatomic, copy) MPSShape * explicitPadding;
+@property (readwrite, nonatomic) MPSGraphPaddingMode boundaryMode;
+@property (readwrite, nonatomic) MPSGraphPaddingStyle paddingStyle;
+@property (readwrite, nonatomic) float paddingConstant;
+
+/*!
+ * @abstract stencil operation descriptor
+ *
+ * @param reductionMode Reduction operation used to combine the source with weights. Defaults to Sum.
+ * @param offsets Array of length 4 that determines where to start reading the `input` from.
+ * Only used when paddingStyle is MPSGraphPaddingStylExplicitOffset. Defaults to 0.
+ * @param strides Array of length 4 that determines strides for the window of the weights Tensor. Defaults to 1.
+ * @param dilationRates Array of length 4 that determines dilation rates for the weights Tensor. Defaults to 1.
+ * @param explicitPadding Array of length 8 that determines paddings for the input Tensor's last 4 dimensions.
+ * explicitPadding[2*i] and explicitPadding[2*i + 1] for dimension i of the input.
+ * Only used when paddingSTyle is MPSGraphPaddingStyleExplicit or ExplicitOffset.
+ * @param boundaryMode Determines what values to pad the input Tensor with. Defaults to MPSGraphPaddingModeZero.
+ * @param paddingStyle Determines how many values to pad the inpur Tensor with.
+ * @param paddingConstant Specifies the value to pad the inputTensor with when using boundaryMode = constant. Defaults to 0.
+ *
+ * @return A valid MPSGraphStencilOpDescriptor object
+ */
+
++(nullable instancetype) descriptorWithReductionMode:(MPSGraphReductionMode) reductionMode
+ offsets:(MPSShape *) offsets
+ strides:(MPSShape *) strides
+ dilationRates:(MPSShape *) dilationRates
+ explicitPadding:(MPSShape *) explicitPadding
+ boundaryMode:(MPSGraphPaddingMode) boundaryMode
+ paddingStyle:(MPSGraphPaddingStyle) paddingStyle
+ paddingConstant:(float) paddingConstant;
+
+/*!
+ * @abstract stencil operation descriptor
+ * @discussion Stencil operation descriptor for paddingStyle MPSGraphPaddingStyleExplicitOffset.
+ * Default values for everything else.
+ *
+ * @param offsets Array of length 4 that determines where to start reading the `input` from.
+ * @param explicitPadding Array of length 8 that determines paddings for the input Tensor's last 4 dimensions.
+ * explicitPadding[2*i] and explicitPadding[2*i + 1] for dimension i of the input.
+ *
+ * @return A valid MPSGraphStencilOpDescriptor object
+ */
+
++(nullable instancetype) descriptorWithOffsets:(MPSShape *) offsets
+ explicitPadding:(MPSShape *) explicitPadding;
+
+/*!
+ * @abstract stencil operation descriptor
+ * @discussion Stencil operation descriptor for paddingStyle MPSGraphPaddingStyleExplicit
+ * Default values for everything else.
+ *
+ * @param explicitPadding Array of length 8 that determines paddings for the input Tensor's last 4 dimensions.
+ * explicitPadding[2*i] and explicitPadding[2*i + 1] for dimension i of the input.
+ *
+ * @return A valid MPSGraphStencilOpDescriptor object
+ */
+
++(nullable instancetype) descriptorWithExplicitPadding:(MPSShape *) explicitPadding;
+
+/*!
+ * @abstract stencil operation descriptor
+ * @discussion Stencil operation descriptor with a user specified paddingStyle.
+ * Default values for everything else.
+ *
+ * @param paddingStyle Determines how many values to pad the inpur Tensor with.
+ *
+ * @return A valid MPSGraphStencilOpDescriptor object
+ */
+
++(nullable instancetype) descriptorWithPaddingStyle:(MPSGraphPaddingStyle) paddingStyle;
+
+@end
+
+MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
+@interface MPSGraph(MPSGraphStencilOps)
+
+/*!
+ * @abstract stencil operation
+ * @discussion Performs a weighted reduction operation (`reductionMode`) on the last 4 dimensions of the `source`
+ * over the window determined by `weights`, acc. to the given `strides` and `dilationRates` and `paddingStyle`.
+ * `boundaryMode` determines what values to pad the `input` with. `offsets` are used to determine where
+ * to start reading the `input` from. `explicitPadding` can also be provided when using relevant paddingStyles.
+ *
+ * y[i] = reduction { x[ i + j ] * w[j] }
+ *
+ * @param source Tensor containing source data. Must be of rank 4 or greater.
+ * @param weights 4-D Tensor containing the weights data.
+ * @param descriptor Descriptor object that specifies strides, dilationRates etc.
+ * @param name The name for the operation.
+ *
+ * @return A valid MPSGraphTensor object
+ */
+
+-(MPSGraphTensor *) stencilWithSourceTensor:(MPSGraphTensor *) source
+ weightsTensor:(MPSGraphTensor *) weights
+ descriptor:(MPSGraphStencilOpDescriptor *) descriptor
+ name:(NSString * _Nullable) name;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif /* MPSGraphStencilOps_h */
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorShapeOps.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorShapeOps.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorShapeOps.h 2021-03-16 08:47:28.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorShapeOps.h 2021-06-02 05:35:20.000000000 -0400
@@ -33,14 +33,157 @@
length:(NSInteger) length
name:(NSString * _Nullable) name;
+/*!
+ * @abstract Create strided slice op and return the result tensor
+ * @discussion Slices a tensor starting from `starts`, stopping short before `ends` stepping
+ * `strides` paces between each value. Semantics based on
+ * https://www.tensorflow.org/api_docs/python/tf/strided_slice.
+ *
+ * @param tensor Tensor to be sliced
+ * @param starts Array of numbers specifying starting point per dimension
+ * @param ends Array of numbers specifying ending point per dimension
+ * @param strides Array of numbers specifying strides per dimension
+ * @param name The name for the operation
+ *
+ * @return A valid MPSGraphTensor object
+ */
+
+-(MPSGraphTensor *) sliceTensor:(MPSGraphTensor *) tensor
+ starts:(NSArray<NSNumber *> *) starts
+ ends:(NSArray<NSNumber *> *) ends
+ strides:(NSArray<NSNumber *> *) strides
+ name:(NSString * _Nullable) name;
+
+/*!
+ * @abstract Create strided slice op and return the result tensor
+ * @discussion Slices a tensor starting from `starts`, stopping short before `ends` stepping
+ * `strides` paces between each value. Semantics based on
+ * https://www.tensorflow.org/api_docs/python/tf/strided_slice.
+ *
+ * @param tensor Tensor to be sliced
+ * @param starts Array of numbers specifying starting point per dimension
+ * @param ends Array of numbers specifying ending point per dimension
+ * @param strides Array of numbers specifying strides per dimension
+ * @param startMask Bitmask indicating dimensions whose `starts` values should be ignored.
+ * @param endMask Bitmask indicating dimensions whose `ends` values should be ignored.
+ * @param squeezeMask Bitmask indicating dimensions that should be squeezed out from the result.
+ * @param name The name for the operation
+ *
+ * @return A valid MPSGraphTensor object
+ */
+
+-(MPSGraphTensor *) sliceTensor:(MPSGraphTensor *) tensor
+ starts:(NSArray<NSNumber *> *) starts
+ ends:(NSArray<NSNumber *> *) ends
+ strides:(NSArray<NSNumber *> *) strides
+ startMask:(uint32_t) startMask
+ endMask:(uint32_t) endMask
+ squeezeMask:(uint32_t) squeezeMask
+ name:(NSString * _Nullable) name;
+
+/*!
+ * @abstract Create strided slice gradient op and return the result tensor
+ *
+ * @param inputGradientTensor Input gradient
+ * @param fwdInShapeTensor Shape of the forward pass input = shape of gradient output
+ * @param starts Array of numbers specifying starting point per dimension
+ * @param ends Array of numbers specifying ending point per dimension
+ * @param strides Array of numbers specifying strides per dimension
+ * @param name The name for the operation
+ *
+ * @return A valid MPSGraphTensor object
+ */
+
+-(MPSGraphTensor *) sliceGradientTensor:(MPSGraphTensor *) inputGradientTensor
+ fwdInShapeTensor:(MPSGraphTensor *) fwdInShapeTensor
+ starts:(NSArray<NSNumber *> *) starts
+ ends:(NSArray<NSNumber *> *) ends
+ strides:(NSArray<NSNumber *> *) strides
+ name:(NSString * _Nullable) name;
+
+/*!
+ * @abstract Create strided slice gradient op and return the result tensor
+ *
+ * @param inputGradientTensor Input gradient
+ * @param fwdInShapeTensor Shape of the forward pass input = shape of gradient output
+ * @param starts Array of numbers specifying starting point per dimension
+ * @param ends Array of numbers specifying ending point per dimension
+ * @param strides Array of numbers specifying strides per dimension
+ * @param startMask Bitmask indicating dimensions whose `starts` values should be ignored.
+ * @param endMask Bitmask indicating dimensions whose `ends` values should be ignored.
+ * @param squeezeMask Bitmask indicating dimensions that should be squeezed out from the result.
+ * @param name The name for the operation
+ *
+ * @return A valid MPSGraphTensor object
+ */
+
+-(MPSGraphTensor *) sliceGradientTensor:(MPSGraphTensor *) inputGradientTensor
+ fwdInShapeTensor:(MPSGraphTensor *) fwdInShapeTensor
+ starts:(NSArray<NSNumber *> *) starts
+ ends:(NSArray<NSNumber *> *) ends
+ strides:(NSArray<NSNumber *> *) strides
+ startMask:(uint32_t) startMask
+ endMask:(uint32_t) endMask
+ squeezeMask:(uint32_t) squeezeMask
+ name:(NSString * _Nullable) name;
+
+/*!
+ * @abstract Create concat op and return the result tensor
+ * @discussion Concatenate two input tensors along sepecified dimension. Tensors must be broadcast
+ * compatible along all other dimensions, and have the same type.
+ *
+ * @param tensor First tensor to concatenate
+ * @param tensor2 Second tensor to concatenate
+ * @param dimensionIndex The dimension to concatenate across, must be in range - rank <= dimension < rank
+ * @param name The name for the operation
+ *
+ * @return A valid MPSGraphTensor object
+ */
+
-(MPSGraphTensor *) concatTensor:(MPSGraphTensor *) tensor
withTensor:(MPSGraphTensor *) tensor2
- dimension:(NSUInteger) dimensionIndex
+ dimension:(NSInteger) dimensionIndex
name:(NSString * _Nullable) name;
+/*!
+ * @abstract Create concat op and return the result tensor
+ * @discussion Concatenate all input tensors along specified dimension. All inputs must be broadcast
+ * compatible along all other dimensions, and have the same type.
+ *
+ * @param tensors Tensors to concatenate
+ * @param dimensionIndex The dimension to concatenate across, must be in range - rank <= dimension < rank
+ * @param name The name for the operation
+ *
+ * @return A valid MPSGraphTensor object
+ */
-(MPSGraphTensor *) concatTensors:(NSArray<MPSGraphTensor *> *) tensors
- dimension:(NSUInteger) dimensionIndex
- name:(NSString * _Nullable) name;
+ dimension:(NSInteger) dimensionIndex
+ name:(NSString * _Nullable) name;
+
+/*!
+ * @abstract Create concat op and return the result tensor
+ * @discussion Concatenate all input tensors along specified dimension. All inputs must be broadcast
+ * compatible along all other dimensions, and have the same type.
+ * When interleave is specified, all tensors will be interleaved. To interleave, all inputs must
+ * be broadcast compatible along the specified dimension as well.
+ * Example,
+ * @code
+ * operand0 = [1, 2, 3]
+ * operand1 = [4, 5, 6]
+ * concat([operand0, operand1], axis = 0, interleave = YES) = [1, 4, 2, 5, 3, 6]
+ * @endcode
+ *
+ * @param tensors Tensors to concatenate
+ * @param dimensionIndex The dimension to concatenate across, must be in range - rank <= dimension < rank
+ * @param interleave Interleave input tensors
+ * @param name The name for the operation
+ *
+ * @return A valid MPSGraphTensor object
+ */
+-(MPSGraphTensor *) concatTensors:(NSArray<MPSGraphTensor *> *) tensors
+ dimension:(NSInteger) dimensionIndex
+ interleave:(BOOL) interleave
+ name:(NSString * _Nullable) name;
-(MPSGraphTensor *) tileTensor:(MPSGraphTensor *) tensor
withMultiplier:(MPSShape *) multiplier
@@ -66,6 +209,129 @@
rightPadding:(MPSShape *) rightPadding
name:(NSString * _Nullable) name;
+-(MPSGraphTensor *)spaceToDepth2DTensor:(MPSGraphTensor *) tensor
+ widthAxisTensor:(MPSGraphTensor *) widthAxisTensor
+ heightAxisTensor:(MPSGraphTensor *) heightAxisTensor
+ depthAxisTensor:(MPSGraphTensor *) depthAxisTensor
+ blockSize:(NSUInteger)blockSize
+ usePixelShuffleOrder:(BOOL)usePixelShuffleOrder
+ name:(NSString * _Nullable) name
+MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
+
+-(MPSGraphTensor *)depthToSpace2DTensor:(MPSGraphTensor *) tensor
+ widthAxisTensor:(MPSGraphTensor *) widthAxisTensor
+ heightAxisTensor:(MPSGraphTensor *) heightAxisTensor
+ depthAxisTensor:(MPSGraphTensor *) depthAxisTensor
+ blockSize:(NSUInteger)blockSize
+ usePixelShuffleOrder:(BOOL)usePixelShuffleOrder
+ name:(NSString * _Nullable) name
+MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
+
+-(MPSGraphTensor *)spaceToDepth2DTensor:(MPSGraphTensor *) tensor
+ widthAxis:(NSUInteger) widthAxis
+ heightAxis:(NSUInteger) heightAxis
+ depthAxis:(NSUInteger) depthAxis
+ blockSize:(NSUInteger)blockSize
+ usePixelShuffleOrder:(BOOL)usePixelShuffleOrder
+ name:(NSString * _Nullable) name
+MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
+
+-(MPSGraphTensor *)depthToSpace2DTensor:(MPSGraphTensor *) tensor
+ widthAxis:(NSUInteger) widthAxis
+ heightAxis:(NSUInteger) heightAxis
+ depthAxis:(NSUInteger) depthAxis
+ blockSize:(NSUInteger)blockSize
+ usePixelShuffleOrder:(BOOL)usePixelShuffleOrder
+ name:(NSString * _Nullable) name
+MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
+
+/*!
+ * @abstract Create reverse op and return the result tensor
+ * @discussion Reverses a tensor on given axes
+ * https://www.tensorflow.org/api_docs/python/tf/reverse.
+ *
+ * @param tensor Tensor to be reversed
+ * @param axesTensor Tensor that specifies axes to be reversed (Axes must be unique and within normal axis range).
+ * @param name The name for the operation
+ *
+ * @return A valid MPSGraphTensor object
+ */
+
+-(MPSGraphTensor *) reverseTensor:(MPSGraphTensor *) tensor
+ axesTensor:(MPSGraphTensor *) axesTensor
+ name:(NSString * _Nullable) name
+MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
+
+/*!
+ * @abstract Create reverse op and return the result tensor
+ * @discussion Reverses a tensor on given axes
+ * https://www.tensorflow.org/api_docs/python/tf/reverse.
+ *
+ * @param tensor Tensor to be reversed
+ * @param axes Axes to be reversed (Axes must be unique and within normal axis range).
+ * @param name The name for the operation
+ *
+ * @return A valid MPSGraphTensor object
+ */
+
+-(MPSGraphTensor *) reverseTensor:(MPSGraphTensor *) tensor
+ axes:(NSArray<NSNumber *> *) axes
+ name:(NSString * _Nullable) name
+MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
+
+/*!
+ * @abstract Create reverse op and return the result tensor
+ * @discussion Reverses a tensor on all axes
+ * https://www.tensorflow.org/api_docs/python/tf/reverse.
+ *
+ * @param tensor Tensor to be reversed
+ * @param name The name for the operation
+ *
+ * @return A valid MPSGraphTensor object
+ */
+
+-(MPSGraphTensor *) reverseTensor:(MPSGraphTensor *) tensor
+ name:(NSString * _Nullable) name
+MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
+
+
+/*!
+ * @abstract Create flatten2d op and return the result tensor
+ * @discussion Flattens dimensions before `axis` to `result[0]` and dimensions starting
+ * from `axis` to `result[1]` and returns a rank-2 tensor as result.
+ *
+ * @param tensor Tensor to be flattened
+ * @param axis Axis around which to flatten
+ * @param name The name for the operation
+ *
+ * @return A valid MPSGraphTensor object
+ */
+
+-(MPSGraphTensor *) flatten2DTensor:(MPSGraphTensor *) tensor
+ axis:(NSInteger) axis
+ name:(NSString * _Nullable) name
+MPS_SWIFT_NAME( flatten2D(_:axis:name:) )
+MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
+
+/*!
+ * @abstract Create flatten2d op and return the result tensor
+ * @discussion Flattens dimensions before `axis` to `result[0]` and dimensions starting
+ * from `axis` to `result[1]` and returns a rank-2 tensor as result.
+ *
+ * @param tensor Tensor to be flattened
+ * @param axisTensor Axis around which to flatten
+ * @param name The name for the operation
+ *
+ * @return A valid MPSGraphTensor object
+ */
+
+-(MPSGraphTensor *) flatten2DTensor:(MPSGraphTensor *) tensor
+ axisTensor:(MPSGraphTensor *) axisTensor
+ name:(NSString * _Nullable) name
+MPS_SWIFT_NAME( flatten2D(_:axisTensor:name:) )
+MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
+
+
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MetalPerformanceShadersGraph.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MetalPerformanceShadersGraph.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MetalPerformanceShadersGraph.h 2021-03-16 08:41:02.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MetalPerformanceShadersGraph.h 2021-05-22 07:13:13.000000000 -0400
@@ -7,17 +7,19 @@
#import <MetalPerformanceShadersGraph/MPSGraph.h>
#import <MetalPerformanceShadersGraph/MPSGraphDevice.h>
+#import <MetalPerformanceShadersGraph/MPSGraphExecutable.h>
#import <MetalPerformanceShadersGraph/MPSGraphAutomaticDifferentiation.h>
#import <MetalPerformanceShadersGraph/MPSGraphActivationOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphArithmeticOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphConvolutionOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphConvolutionTransposeOps.h>
+#import <MetalPerformanceShadersGraph/MPSGraphControlFlowOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphDepthwiseConvolutionOps.h>
-#import <MetalPerformanceShadersGraph/MPSGraphGatherNDOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphGatherOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphLossOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphMatrixMultiplicationOps.h>
+#import <MetalPerformanceShadersGraph/MPSGraphSparseOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphMemoryOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphNormalizationOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphOneHotOps.h>
@@ -27,5 +29,5 @@
#import <MetalPerformanceShadersGraph/MPSGraphReductionOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphResizeOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphScatterNDOps.h>
-
+#import <MetalPerformanceShadersGraph/MPSGraphStencilOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphTensorShapeOps.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
- xcode16.2 Binding Status