-
Notifications
You must be signed in to change notification settings - Fork 511
MetalPerformanceShadersGraph macOS xcode14.0 rc
Israel Soto edited this page Sep 7, 2022
·
1 revision
#MetalPerformanceShadersGraph.framework
diff -ruN /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraph.h /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraph.h
--- /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraph.h 2022-08-05 15:55:44.000000000 -0500
+++ /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraph.h 2022-08-03 21:06:19.000000000 -0500
@@ -62,18 +62,6 @@
MPSGraphOptimizationProfilePowerEfficiency MPS_ENUM_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4)) = 1L,
};
-/*!
- * @typedef MPSGraphExecutionStage
- * @abstract Execution events that can be used with shared events
- *
- * @constant MPSGraphExecutionStageCompleted execution complete
- */
-typedef NS_ENUM(uint64_t, MPSGraphExecutionStage)
-{
- MPSGraphExecutionStageCompleted MPS_ENUM_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0)) MPS_SWIFT_NAME(completed) = 0L,
-};
-
-
/*! @abstract A dictionary of tensors and correspondiing tensorData for them
*/
MPS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@@ -85,26 +73,19 @@
typedef NSDictionary<MPSGraphTensor*, MPSGraphShapedType *> MPSGraphTensorShapedTypeDictionary;
/*! @abstract A notification when graph execution: has finished
- * @param resultsDictionary If no error, the results dictionary produced by the graph operation.
+ * @param resultsDictionary If no error, the image produced by the graph operation.
* @param error If an error occurs, more information might be found here.
*/
typedef void (^MPSGraphCompletionHandler)(MPSGraphTensorDataDictionary * resultsDictionary,
NSError * _Nullable error);
/*! @abstract A notification when graph execution: has finished
- * @param resultsDictionary If no error, the results dictionary produced by the graph operation.
+ * @param resultsDictionary If no error, the image produced by the graph operation.
* @param error If an error occurs, more information might be found here.
*/
typedef void (^MPSGraphScheduledHandler)(MPSGraphTensorDataDictionary * resultsDictionary,
NSError * _Nullable error);
-/*! @abstract A notification when compilation: has finished
- * @param executable If no error, the executable produced by the compilation
- * @param error If an error occurs, more information might be found here.
- */
-typedef void (^MPSGraphCompilationCompletionHandler)(MPSGraphExecutable* executable,
- NSError * _Nullable error);
-
/*! @class MPSGraphCompilationDescriptor
* @abstract A structure which consists of all the levers users can use to compile their graphs
*
@@ -127,21 +108,6 @@
*/
@property (readwrite, nonatomic) MPSGraphOptimizationProfile optimizationProfile MPS_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4));
-/*! @property waitForCompilationCompletion
- * @discussion makes the compile or specialize call blocking till the entire compilation is completed, defaults to NO
- */
-@property (readwrite, nonatomic) BOOL waitForCompilationCompletion MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*! @property compilationCompletionHandler
- * @discussion compilationCompletionHandler for the compilation, default value is nil, it is called after compilation is completed
- */
-@property (readwrite, atomic) MPSGraphCompilationCompletionHandler compilationCompletionHandler MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*! @property dispatchQueue
- * @discussion dispatchQueue 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));
-
@end
/*! @class MPSGraphExecutionDescriptor
@@ -172,28 +138,6 @@
@property (readwrite, atomic, copy, nullable) MPSGraphCompilationDescriptor *compilationDescriptor
MPS_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4));
-/*!
- * @abstract Executable waits on these shared events before scheduling execution on the HW, this does not include encoding which can still continue.
- *
- * @param event shared event to wait on
- * @param value value for shared event to wait on
- */
--(void) waitForEvent:(id<MTLSharedEvent>) event
- value:(uint64_t) value
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Executable signals these shared events at execution stage and immediately proceeds
- *
- * @param event shared event to signal
- * @param executionStage execution stage to signal event at
- * @param value value for shared event to wait on
- */
--(void) signalEvent:(id<MTLSharedEvent>) event
- atExecutionEvent:(MPSGraphExecutionStage) executionStage
- value:(uint64_t) value
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
@end
/*! @class MPSGraph
@@ -368,7 +312,7 @@
* @abstract Encodes the graph for given feeds to return targetTensor values in the resultsDictionary provided by the user,
* ensuring all target operations also executed. This call is asynchronous and will return immediately if a completionHandler is set.
*
- * @param commandBuffer commandBuffer passed to execute the graph on, commitAndContinue might be called, please don't rely on underlying MTLCommandBuffer to remain uncommitted
+ * @param commandBuffer commandBuffer passed to exectute the graph on, commitAndContinue might be called, please don't rely on underlying MTLCommandBuffer to remain uncommitted
* @param feeds Feeds dictionary for the placeholder tensors
* @param targetOperations Operations to be completed at the end of the run
* @param resultsDictionary MPSGraphTensors dictionary passed by user, these will be filled with graph output data
diff -ruN /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphArithmeticOps.h /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphArithmeticOps.h
--- /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphArithmeticOps.h 2022-08-05 12:40:56.000000000 -0500
+++ /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphArithmeticOps.h 2022-08-03 21:06:19.000000000 -0500
@@ -150,16 +150,6 @@
-(MPSGraphTensor *) erfWithTensor:(MPSGraphTensor *) tensor
name:(NSString * _Nullable) name;
-/*!
- * @abstract Truncate op - floor for positive inputs, ceil for negative.
- * @param tensor The input
- * @param name Name for the operation
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) truncateWithTensor:(MPSGraphTensor *) tensor
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( truncate(_:name:) )
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
#pragma mark - BinaryArithmeticOps
diff -ruN /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCore.h /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCore.h
--- /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCore.h 2022-08-05 15:53:28.000000000 -0500
+++ /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCore.h 2022-08-03 21:06:18.000000000 -0500
@@ -71,11 +71,10 @@
* @typedef MPSGraphPaddingStyle
* @abstract Tensor Layout
*
- * @constant MPSGraphPaddingStyleExplicit Explicit
- * @constant MPSGraphPaddingStyleONNX_SAME_LOWER ONNX_SAME_LOWER
- * @constant MPSGraphPaddingStyleTF_SAME TF_SAME
- * @constant MPSGraphPaddingStyleTF_VALID TF_VALID
- * @constant MPSGraphPaddingStyleExplicitOffset Explicit offsets
+ * @constant MPSGraphPaddingStyleExplicit Explicit
+ * @constant MPSGraphPaddingStyleTF_SAME TF_SAME
+ * @constant MPSGraphPaddingStyleTF_VALID TF_VALID
+ * @constant MPSGraphPaddingStyleExplicitOffset Explicit offsets
*/
typedef NS_ENUM(NSUInteger, MPSGraphPaddingStyle)
{
@@ -83,7 +82,6 @@
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,
- MPSGraphPaddingStyleONNX_SAME_LOWER MPS_ENUM_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0)) = 4L,
};
/*!
diff -ruN /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCumulativeOps.h /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCumulativeOps.h
--- /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCumulativeOps.h 2022-08-05 12:40:56.000000000 -0500
+++ /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphCumulativeOps.h 1969-12-31 18:00:00.000000000 -0600
@@ -1,295 +0,0 @@
-//
-// MPSGraphCumulativeOps.h
-// MetalPerformanceShadersGraph
-//
-// Created on 06/12/22.
-// Copyright © 2022 Apple Inc. All rights reserved.
-//
-
-#ifndef MPSGraphScanOps_h
-#define MPSGraphScanOps_h
-
-#import <MetalPerformanceShadersGraph/MPSGraph.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
-@interface MPSGraph(MPSGraphCumulativeOps)
-
-/*!
- * @abstract Create the cumulative sum op and return the result tensor.
- *
- * @param tensor input tensor
- * @param axis the tensor dimension over which the cumulative operation occurs
- * @param exclusive if true, performs the exclusive cumulative sum operation, and the first element will be equal to zero.
- * @param reverse reverse the direction of the cumulative sum operation along the given axis
- * @param name name for the operation
- *
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) cumulativeSumWithTensor:(MPSGraphTensor *) tensor
- axis:(NSInteger) axis
- exclusive:(BOOL) exclusive
- reverse:(BOOL) reverse
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( cumulativeSum(_:axis:exclusive:reverse:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create the cumulative sum op and return the result tensor.
- *
- * @param tensor input tensor
- * @param axisTensor the tensor dimension over which the cumulative operation occurs
- * @param exclusive if true, performs the exclusive cumulative sum operation, and the first element will be equal to zero.
- * @param reverse reverse the direction of the cumulative sum operation along the given axis
- * @param name name for the operation
- *
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) cumulativeSumWithTensor:(MPSGraphTensor *) tensor
- axisTensor:(MPSGraphTensor *) axisTensor
- exclusive:(BOOL) exclusive
- reverse:(BOOL) reverse
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( cumulativeSum(_:axisTensor:exclusive:reverse:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create the inclusive cumulative sum op and return the result tensor.
- *
- * @param tensor input tensor
- * @param axis the tensor dimension over which the cumulative operation occurs
- * @param name name for the operation
- *
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) cumulativeSumWithTensor:(MPSGraphTensor *) tensor
- axis:(NSInteger) axis
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( cumulativeSum(_:axis:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create the inclusive cumulative sum op and return the result tensor.
- *
- * @param tensor input tensor
- * @param axisTensor the tensor dimension over which the cumulative operation occurs
- * @param name name for the operation
- *
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) cumulativeSumWithTensor:(MPSGraphTensor *) tensor
- axisTensor:(MPSGraphTensor *) axisTensor
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( cumulativeSum(_:axisTensor:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create the cumulative product op and return the result tensor.
- *
- * @param tensor input tensor
- * @param axis the tensor dimension over which the cumulative operation occurs
- * @param exclusive if true, performs the exclusive cumulative product operation, and the first element will be equal to one.
- * @param reverse reverse the direction of the cumulative product operation along the given axis
- * @param name name for the operation
- *
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) cumulativeProductWithTensor:(MPSGraphTensor *) tensor
- axis:(NSInteger) axis
- exclusive:(BOOL) exclusive
- reverse:(BOOL) reverse
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( cumulativeProduct(_:axis:exclusive:reverse:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create the cumulative product op and return the result tensor.
- *
- * @param tensor input tensor
- * @param axisTensor the tensor dimension over which the cumulative operation occurs
- * @param exclusive if true, performs the exclusive cumulative product operation, and the first element will be equal to one.
- * @param reverse reverse the direction of the cumulative product operation along the given axis
- * @param name name for the operation
- *
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) cumulativeProductWithTensor:(MPSGraphTensor *) tensor
- axisTensor:(MPSGraphTensor *) axisTensor
- exclusive:(BOOL) exclusive
- reverse:(BOOL) reverse
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( cumulativeProduct(_:axisTensor:exclusive:reverse:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create the inclusive cumulative product op and return the result tensor.
- *
- * @param tensor input tensor
- * @param axis the tensor dimension over which the cumulative operation occurs
- * @param name name for the operation
- *
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) cumulativeProductWithTensor:(MPSGraphTensor *) tensor
- axis:(NSInteger) axis
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( cumulativeProduct(_:axis:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create the inclusive cumulative product op and return the result tensor.
- *
- * @param tensor input tensor
- * @param axisTensor the tensor dimension over which the cumulative operation occurs
- * @param name name for the operation
- *
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) cumulativeProductWithTensor:(MPSGraphTensor *) tensor
- axisTensor:(MPSGraphTensor *) axisTensor
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( cumulativeProduct(_:axisTensor:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create the cumulative minimum op and return the result tensor.
- *
- * @param tensor input tensor
- * @param axis the tensor dimension over which the cumulative operation occurs
- * @param exclusive if true, performs the exclusive cumulative minimum operation, and the first element will be equal to the highest value of data type.
- * @param reverse reverse the direction of the cumulative minimum operation along the given axis
- * @param name name for the operation
- *
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) cumulativeMinimumWithTensor:(MPSGraphTensor *) tensor
- axis:(NSInteger) axis
- exclusive:(BOOL) exclusive
- reverse:(BOOL) reverse
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( cumulativeMinimum(_:axis:exclusive:reverse:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create the cumulative minimum op and return the result tensor.
- *
- * @param tensor input tensor
- * @param axisTensor the tensor dimension over which the cumulative operation occurs
- * @param exclusive if true, performs the exclusive cumulative minimum operation, and the first element will be equal to the highest value of data type.
- * @param reverse reverse the direction of the cumulative minimum operation along the given axis
- * @param name name for the operation
- *
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) cumulativeMinimumWithTensor:(MPSGraphTensor *) tensor
- axisTensor:(MPSGraphTensor *) axisTensor
- exclusive:(BOOL) exclusive
- reverse:(BOOL) reverse
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( cumulativeMinimum(_:axisTensor:exclusive:reverse:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create the inclusive cumulative minimum op and return the result tensor.
- *
- * @param tensor input tensor
- * @param axis the tensor dimension over which the cumulative operation occurs
- * @param name name for the operation
- *
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) cumulativeMinimumWithTensor:(MPSGraphTensor *) tensor
- axis:(NSInteger) axis
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( cumulativeMinimum(_:axis:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create the inclusive cumulative minimum op and return the result tensor.
- *
- * @param tensor input tensor
- * @param axisTensor the tensor dimension over which the cumulative operation occurs
- * @param name name for the operation
- *
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) cumulativeMinimumWithTensor:(MPSGraphTensor *) tensor
- axisTensor:(MPSGraphTensor *) axisTensor
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( cumulativeMinimum(_:axisTensor:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create the cumulative maximum op and return the result tensor.
- *
- * @param tensor input tensor
- * @param axis the tensor dimension over which the cumulative operation occurs
- * @param exclusive if true, performs the exclusive cumulative maximum operation, and the first element will be equal to the lowest value of data type.
- * @param reverse reverse the direction of the cumulative maximum operation along the given axis
- * @param name name for the operation
- *
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) cumulativeMaximumWithTensor:(MPSGraphTensor *) tensor
- axis:(NSInteger) axis
- exclusive:(BOOL) exclusive
- reverse:(BOOL) reverse
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( cumulativeMaximum(_:axis:exclusive:reverse:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create the cumulative maximum op and return the result tensor.
- *
- * @param tensor input tensor
- * @param axisTensor the tensor dimension over which the cumulative operation occurs
- * @param exclusive if true, performs the exclusive cumulative maximum operation, and the first element will be equal to the lowest value of data type.
- * @param reverse reverse the direction of the cumulative maximum operation along the given axis
- * @param name name for the operation
- *
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) cumulativeMaximumWithTensor:(MPSGraphTensor *) tensor
- axisTensor:(MPSGraphTensor *) axisTensor
- exclusive:(BOOL) exclusive
- reverse:(BOOL) reverse
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( cumulativeMaximum(_:axisTensor:exclusive:reverse:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create the inclusive cumulative maximum op and return the result tensor.
- *
- * @param tensor input tensor
- * @param axis the tensor dimension over which the cumulative operation occurs
- * @param name name for the operation
- *
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) cumulativeMaximumWithTensor:(MPSGraphTensor *) tensor
- axis:(NSInteger) axis
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( cumulativeMaximum(_:axis:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create the inclusive cumulative maximum op and return the result tensor.
- *
- * @param tensor input tensor
- * @param axisTensor the tensor dimension over which the cumulative operation occurs
- * @param name name for the operation
- *
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) cumulativeMaximumWithTensor:(MPSGraphTensor *) tensor
- axisTensor:(MPSGraphTensor *) axisTensor
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( cumulativeMaximum(_:axisTensor:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-#endif /* MPSGraphCumulativeOps_h */
diff -ruN /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphExecutable.h /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphExecutable.h
--- /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphExecutable.h 2022-08-05 15:53:28.000000000 -0500
+++ /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphExecutable.h 2022-08-03 21:06:17.000000000 -0500
@@ -30,7 +30,7 @@
NSError * _Nullable error);
MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
-@interface MPSGraphExecutableExecutionDescriptor : NSObject<NSCopying>
+@interface MPSGraphExecutableExecutionDescriptor : NSObject
/*! @property scheduledHandler
* @discussion scheduledHandler for the graph executable, default value is nil
@@ -47,28 +47,6 @@
*/
@property (readwrite, atomic) BOOL waitUntilCompleted;
-/*!
- * @abstract Executable waits on these shared events before scheduling execution on the HW, this does not include encoding which can still continue.
- *
- * @param event shared event to wait on
- * @param value value for shared event to wait on
- */
--(void) waitForEvent:(id<MTLSharedEvent>) event
- value:(uint64_t) value
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Executable signals these shared events at execution stage and immediately proceeds
- *
- * @param event shared event to signal
- * @param executionStage execution stage to signal event at
- * @param value value for shared event to wait on
- */
--(void) signalEvent:(id<MTLSharedEvent>) event
- atExecutionEvent:(MPSGraphExecutionStage) executionStage
- value:(uint64_t) value
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
@end
/*! @class MPSGraphExecutable
@@ -95,11 +73,10 @@
@property (readonly, atomic, nullable) NSArray<MPSGraphTensor *> *targetTensors;
/*!
- * @abstract Specialize the MPSGraphExecutable and optimize it, use this method to choose when specialization happens, else it occurs at encode time automatically
+ * @abstract Specialize MLIR module and optimize it
*
- * @param device optional MPSGraph device to compile with
- * @param inputTypes input types
- * @param 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
+ * @param device optional MPSGraph device to compile with
+ * @param inputTypes input types
*
*/
-(void) specializeWithDevice:(MPSGraphDevice * _Nullable) device
diff -ruN /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphGatherNDOps.h /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphGatherNDOps.h
--- /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphGatherNDOps.h 1969-12-31 18:00:00.000000000 -0600
+++ /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphGatherNDOps.h 2022-02-22 22:56:07.000000000 -0600
@@ -0,0 +1,14 @@
+//
+// MPSGraphGatherNDOps.h
+// MPSGraph
+//
+// Created by Chris Bayley on 12/2/20.
+// Copyright © 2020 Dhruv Saksena. All rights reserved.
+//
+
+#ifndef MPSGraphGatherNDOps_h
+#define MPSGraphGatherNDOps_h
+
+#import "MPSGraphGatherOps.h"
+
+#endif /* MPSGraphGatherNDOps_h */
diff -ruN /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphMatrixMultiplicationOps.h /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphMatrixMultiplicationOps.h
--- /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphMatrixMultiplicationOps.h 2022-08-05 12:40:56.000000000 -0500
+++ /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphMatrixMultiplicationOps.h 2022-08-03 21:06:19.000000000 -0500
@@ -34,27 +34,6 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( matrixMultiplication(primary:secondary:name:) );
-/*!
- * @abstract Create a Hamming Distance op and return the result tensor, it supports broadcasting as well.
- * @discussion The Hamming Distance is computed between sets of vectors and the last dimension(s) of each
- * input tensor is considered a vector. If the shape of @ref primaryTensor is `[Na, M, K]` and the shape
- * of @ref secondaryTensor is `[Nb, N, K]`, with Na, Nb being any batch dimensions,
- * then the result shape is `[Na/Nb, M, N]`, where `Na/Nb` are the broadcasted batch dimensions.
- * The result datatype is either MPSDataTypeUInt32 or MPSDataTypeUInt16.
- *
- * @param primaryTensor LHS tensor of the binary Op
- * @param secondaryTensor RHS tensor of the binary Op
- * @param resultDataType Must be either MPSDataTypeUInt32 or MPSDataTypeUInt16
- * @param name name for the operation
- *
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) HammingDistanceWithPrimaryTensor:(MPSGraphTensor *) primaryTensor
- secondaryTensor:(MPSGraphTensor *) secondaryTensor
- resultDataType:(MPSDataType) resultDataType
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( HammingDistance(primary:secondary:resultDataType:name:) )
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
@end
diff -ruN /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphOptimizerOps.h /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphOptimizerOps.h
--- /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphOptimizerOps.h 2022-08-06 02:26:54.000000000 -0500
+++ /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphOptimizerOps.h 2022-08-03 21:06:18.000000000 -0500
@@ -38,56 +38,6 @@
name:(NSString * _Nullable) name
MPS_SWIFT_NAME( applyStochasticGradientDescent(learningRate:variable:gradient:name:) );
-/*!
- * @abstract Adam
- * @discussion The adam update ops are added
- *
- * current learning rate:
- * lr[t] = learningRate * sqrt(1 - beta2^t) / (1 - beta1^t)
- *
- * m[t] = beta1 * m[t-1] + (1 - beta1) * g
- * v[t] = beta2 * v[t-1] + (1 - beta2) * (g ^ 2)
- * maxVel[t] = max(maxVel[t-1],v[t])
- * variable = variable - lr[t] * m[t] / (sqrt(maxVel) + epsilon)
- * @return if maximumVelocity is nil array of 3 tensors (update, newMomentum, newVelocity) else array of 4 tensors (update, newMomentum, newVelocity, newMaximumVelocity)
- */
--(NSArray<MPSGraphTensor *> *) adamWithLearningRateTensor:(MPSGraphTensor *) learningRateTensor
- beta1Tensor:(MPSGraphTensor *) beta1Tensor
- beta2Tensor:(MPSGraphTensor *) beta2Tensor
- epsilonTensor:(MPSGraphTensor *) epsilonTensor
- beta1PowerTensor:(MPSGraphTensor *) beta1PowerTensor
- beta2PowerTensor:(MPSGraphTensor *) beta2PowerTensor
- valuesTensor:(MPSGraphTensor *) valuesTensor
- momentumTensor:(MPSGraphTensor *) momentumTensor
- velocityTensor:(MPSGraphTensor *) velocityTensor
- maximumVelocityTensor:(MPSGraphTensor * _Nullable) maximumVelocityTensor
- gradientTensor:(MPSGraphTensor *) gradientTensor
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( adam(learningRate:beta1:beta2:epsilon:beta1Power:beta2Power:values:momentum:velocity:maximumVelocity:gradient:name:) );
-
-
-/*!
- * @abstract Adam
- * @discussion The adam update ops are added
- *
- * m[t] = beta1 * m[t-1] + (1 - beta1) * g
- * v[t] = beta2 * v[t-1] + (1 - beta2) * (g ^ 2)
- * maxVel[t] = max(maxVel[t-1],v[t])
- * variable = variable - lr[t] * m[t] / (sqrt(maxVel) + epsilon)
- * @return if maximumVelocity is nil array of 3 tensors (update, newMomentum, newVelocity) else array of 4 tensors (update, newMomentum, newVelocity, newMaximumVelocity)
- */
--(NSArray<MPSGraphTensor *> *) adamWithCurrentLearningRateTensor:(MPSGraphTensor *) currentLearningRateTensor
- beta1Tensor:(MPSGraphTensor *) beta1Tensor
- beta2Tensor:(MPSGraphTensor *) beta2Tensor
- epsilonTensor:(MPSGraphTensor *) epsilonTensor
- valuesTensor:(MPSGraphTensor *) valuesTensor
- momentumTensor:(MPSGraphTensor *) momentumTensor
- velocityTensor:(MPSGraphTensor *) velocityTensor
- maximumVelocityTensor:(MPSGraphTensor * _Nullable) maximumVelocityTensor
- gradientTensor:(MPSGraphTensor *) gradientTensor
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( adam(currentLearningRate:beta1:beta2:epsilon:values:momentum:velocity:maximumVelocity:gradient:name:) );
-
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphPoolingOps.h /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphPoolingOps.h
--- /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphPoolingOps.h 2022-08-05 15:53:28.000000000 -0500
+++ /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphPoolingOps.h 2022-08-03 21:06:17.000000000 -0500
@@ -262,42 +262,6 @@
descriptor:(MPSGraphPooling2DOpDescriptor *) descriptor
name:(NSString * _Nullable) name;
-/*!
- * @abstract MaxPool2D Gradient API
- * @param gradient Input gradient tensor
- * @param indices Indices tensor returned from maxPooling2DReturnIndicesWithSourceTensor API
- * @param outputShape shape of the destination gradient
- * @param descriptor See corresponding property above.
- * @return Destination gradient tensor
- * @discussion MaxPool2D gradient is computed 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
- */
--(MPSGraphTensor *) maxPooling2DGradientWithGradientTensor:(MPSGraphTensor *) gradient
- indicesTensor:(MPSGraphTensor *) indices
- outputShape:(MPSShape*) outputShape
- descriptor:(MPSGraphPooling2DOpDescriptor *) descriptor
- name:(NSString * _Nullable) name;
-MPS_SWIFT_NAME( maxPooling2DGradient(gradient:indices:outputShape:descriptor:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract MaxPool2D Gradient API
- * @param gradient Input gradient tensor
- * @param indices Indices tensor returned from maxPooling2DReturnIndicesWithSourceTensor API
- * @param outputShape shape of the destination gradient
- * @param descriptor See corresponding property above.
- * @return Destination gradient tensor
- * @discussion MaxPool2D gradient is computed 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
- */
--(MPSGraphTensor *) maxPooling2DGradientWithGradientTensor:(MPSGraphTensor *) gradient
- indicesTensor:(MPSGraphTensor *) indices
- outputShapeTensor:(MPSGraphTensor*) outputShape
- descriptor:(MPSGraphPooling2DOpDescriptor *) descriptor
- name:(NSString * _Nullable) name;
-MPS_SWIFT_NAME( maxPooling2DGradient(gradient:indices:outputShape:descriptor:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-(MPSGraphTensor *) avgPooling2DWithSourceTensor:(MPSGraphTensor *) source
descriptor:(MPSGraphPooling2DOpDescriptor *) descriptor
name:(NSString * _Nullable) name;
@@ -336,44 +300,6 @@
MPS_SWIFT_NAME( maxPooling4DGradient(_:source:descriptor:name:))
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
-/*!
- * @abstract MaxPool4D Gradient API
- * @param gradient Input gradient tensor
- * @param indices Indices tensor returned from maxPooling4DReturnIndicesWithSourceTensor API
- * @param outputShape Shape of source tensor
- * @param descriptor See corresponding property above.
- * @return Destination gradient tensor
- * @discussion MaxPool4D gradient is computed 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
- * This API should be used for NCHW and NHWC layouts
- */
--(MPSGraphTensor *) maxPooling4DGradientWithGradientTensor:(MPSGraphTensor *) gradient
- indicesTensor:(MPSGraphTensor *) indices
- outputShape:(MPSShape*) outputShape
- descriptor:(MPSGraphPooling4DOpDescriptor *) descriptor
- name:(NSString * _Nullable) name;
-MPS_SWIFT_NAME( maxPooling4DGradient(gradient:indices:outputShape:descriptor:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract MaxPool4D Gradient API
- * @param gradient Input gradient tensor
- * @param indices Indices tensor returned from maxPooling4DReturnIndicesWithSourceTensor API
- * @param outputShape Shape of source tensor
- * @param descriptor See corresponding property above.
- * @return Destination gradient tensor
- * @discussion MaxPool4D gradient is computed 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
- * This API should be used for NCHW and NHWC layouts
- */
--(MPSGraphTensor *) maxPooling4DGradientWithGradientTensor:(MPSGraphTensor *) gradient
- indicesTensor:(MPSGraphTensor *) indices
- outputShapeTensor:(MPSGraphTensor*) outputShape
- descriptor:(MPSGraphPooling4DOpDescriptor *) descriptor
- name:(NSString * _Nullable) name;
-MPS_SWIFT_NAME( maxPooling4DGradient(gradient:indices:outputShape:descriptor:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-(MPSGraphTensor *) avgPooling4DWithSourceTensor:(MPSGraphTensor *) source
descriptor:(MPSGraphPooling4DOpDescriptor *) descriptor
name:(NSString * _Nullable) name
diff -ruN /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphRNNOps.h /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphRNNOps.h
--- /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphRNNOps.h 2022-08-05 15:55:44.000000000 -0500
+++ /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphRNNOps.h 2022-08-03 21:06:18.000000000 -0500
@@ -145,80 +145,6 @@
@end
-MPS_CLASS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0))
-@interface MPSGraphGRUDescriptor : NSObject<NSCopying>
-
-/*!
- * @property reverse
- * @discussion If set then the input sequence is passed in reverse time order to the layer.
- * Note: Ignored when @code bidirectional = YES @endcode.
- * Default value: @code NO @endcode
- */
-@property (readwrite, nonatomic) BOOL reverse;
-
-/*!
- * @property bidirectional
- * @discussion If set then the input sequence is traversed in both directions and the two results
- * are concatenated together on the channel-axis.
- * Default value: @code NO @endcode
- */
-@property (readwrite, nonatomic) BOOL bidirectional;
-
-/*!
- * @property training
- * @discussion If set then the layer will produce training state tensor as a secondary or third output.
- * Default value: @code NO @endcode
- */
-@property (readwrite, nonatomic) BOOL training;
-
-/*!
- * @property resetGateFirst
- * @discussion If set then the layer will use the gate-ordering `[ r, z, o ]` instead of default `[ z, r, o ]`.
- * Default value: @code NO @endcode
- */
-@property (readwrite, nonatomic) BOOL resetGateFirst;
-
-/*!
- * @property resetAfter
- * @discussion If set then the layer will compute the intermediate value as `c[t] = ( b + (h[t-1] m ) R^T) r[t]`.
- * Otherwise it's computed as `c[t] = (h[t-1] r[t] m) R^T`.
- * Default value: @code NO @endcode
- */
-@property (readwrite, nonatomic) BOOL resetAfter;
-
-/*!
- * @property flipZ
- * @discussion If set then the layer will compute the final value as `h[t] = z[t] h[t-1] + (1-z[t]) o[t]`.
- * Otherwise it's computed as `h[t] = (1-z[t]) h[t-1] + z[t] o[t]`.
- * Default value: @code NO @endcode
- */
-@property (readwrite, nonatomic) BOOL flipZ;
-
-/*!
- * @property updateGateActivation
- * @discussion Activation function to use with the z-gate of the GRU op.
- * Default value: @code MPSGraphRNNActivationSigmoid @endcode
- */
-@property (readwrite, nonatomic) MPSGraphRNNActivation updateGateActivation;
-
-/*!
- * @property resetGateActivation
- * @discussion Activation function to use with the r-gate of the GRU op.
- * Default value: @code MPSGraphRNNActivationSigmoid @endcode
- */
-@property (readwrite, nonatomic) MPSGraphRNNActivation resetGateActivation;
-
-/*!
- * @property outputGateActivation
- * @discussion Activation function to use with the o-gate of the LSTM op.
- * Default value: @code MPSGraphRNNActivationTanh @endcode
- */
-@property (readwrite, nonatomic) MPSGraphRNNActivation outputGateActivation;
-
-+(nullable instancetype) descriptor;
-
-@end
-
MPS_CLASS_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4))
@interface MPSGraph(MPSGraphRNNOps)
@@ -440,8 +366,8 @@
* @param recurrentWeight Tensor containing the recurrent weights `R`.
* For `bidirectional` the layout is [2,4H,H] and otherwise it is [4H,H].
* @param sourceGradient Input gradient, that is gradient of a tensor wrt. to first output of the forward pass.
- * @param zState The third output of `LSTMWithSourceTensor` with @ref `descriptor.training = true`.
* @param cellOutputFwd The second output of `LSTMWithSourceTensor` with @ref `descriptor.training = true` or `descriptor.produceCell = true`.
+ * @param zState The third output of `LSTMWithSourceTensor` with @ref `descriptor.training = true`.
* @param stateGradient Input gradient for state coming from the future timestep - optional, if missing assumes zeroes.
* @param cellGradient Input gradient for cell coming from the future timestep - optional, if missing assumes zeroes.
* @param inputWeight Tensor containing the input weights matrix `W` - optional, if missing assumes diagonal unit-matrix.
@@ -519,155 +445,6 @@
MPS_SWIFT_NAME( LSTMGradients(_:recurrentWeight:sourceGradient:zState:cellOutputFwd:descriptor:name:))
MPS_AVAILABLE_STARTING(macos(12.3), ios(15.4), tvos(15.4));
-/*!
- * @abstract Create a GRU op and return the value and optionally the training state tensor.
- * @discussion This operation returns tensors `h` and optionally `z` that are defined recursively as follows:
- * @code
- * for t = 0 to T-1
- * z[t] = fz( (h[t-1] m) R^T + x[t] W^T + b ),
- * r[t] = fr( (h[t-1] m) R^T + x[t] W^T + b ),
- * c[t] = (h[t-1] r[t] m) R^T
- * o[t] = fo( c[t] + x[t] W^T + b )
- * h[t] = z[t]h[t-1] + (1-z[t])o[t]
- * @endcode
- * If `resetAfter = YES` then `c[t]` is replaced by
- * @code
- * c[t] = ( (h[t-1] m) R^T + b2 ) r[t]
- * @endcode
- * If `flipZ = YES` then `h[t]` is replaced by
- * @code
- * h[t] = (1-z[t])h[t-1] + z[t]o[t].
- * @endcode
- * `W` is optional @ref inputWeight, `R` is @ref recurrentWeight, `b` is optional @ref bias, `m` is optional @mask,
- * `x[t]` is @ref source `h[t]` is the first output, `z[t]` is the second output (optional) and `h[-1]` is @ref initState.
- * `b2` is an optional `resetBias` vector, only used when `resetAfter = YES`.
- * See @ref MPSGraphGRUDescriptor for different `activation` options for `f()`.
- *
- * @param source Tensor containing the source data `x[t]` - shape should be [T,N,I].
- * In case `inputWeight = nil` and `bidirectional = NO` then the layout is [T,N,3H]
- * and for `inputWeight = nil` and `bidirectional = YES` the layout is [T,N,6H].
- * @param recurrentWeight Tensor containing the recurrent weights `R`.
- * For `bidirectional` the layout is [2,3H,H] and otherwise it is [3H,H].
- * @param inputWeight Tensor containing the input weights matrix `W` - optional, if missing assumes diagonal unit-matrix.
- * For `bidirectional` the layout is [6H,I] and otherwise it is [3H,I].
- * @param bias Tensor containing the bias `b` - optional, if missing assumes zeroes.
- * For `bidirectional` the layout is [6H] and otherwise it is [3H].
- * @param initState Initial internal state of the LSTM `h[-1]` - optional, if missing assumes zeroes.
- * For `bidirectional` the layout is [N,2H] and otherwise it is [N,H].
- * @param mask Tensor containing the mask `m` - optional, if missing assumes ones. Useful for dropout.
- * @param secondaryBias Tensor containing the secondary bias vector `b2` - optional, if missing assumes zeroes.
- * Only used with `reset_after = YES`.
- * Shape is [H], ie. a vector for each gate, or [2H] for bidirectional.
- * @param descriptor The GRU op definition.
- * @param name The name for the operation.
- *
- * @return A valid MPSGraphTensor array of size 1 or 2 depending on value of @ref `descriptor.training`.
- * The layout of the state output is [T,N,H] or [T,N,2H] for bidirectional,
- * and the layout of the trainingState output is [T,N,3H] or [T,N,6H] for bidirectional,.
- */
-
--(NSArray<MPSGraphTensor *> *) GRUWithSourceTensor:(MPSGraphTensor *) source
- recurrentWeight:(MPSGraphTensor *) recurrentWeight
- inputWeight:(MPSGraphTensor * _Nullable) inputWeight
- bias:(MPSGraphTensor * _Nullable) bias
- initState:(MPSGraphTensor * _Nullable) initState
- mask:(MPSGraphTensor * _Nullable) mask
- secondaryBias:(MPSGraphTensor * _Nullable) secondaryBias
- descriptor:(MPSGraphGRUDescriptor *) descriptor
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( GRU(_:recurrentWeight:inputWeight:bias:initState:mask:secondaryBias:descriptor:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
--(NSArray<MPSGraphTensor *> *) GRUWithSourceTensor:(MPSGraphTensor *) source
- recurrentWeight:(MPSGraphTensor *) recurrentWeight
- inputWeight:(MPSGraphTensor * _Nullable) inputWeight
- bias:(MPSGraphTensor * _Nullable) bias
- initState:(MPSGraphTensor * _Nullable) initState
- descriptor:(MPSGraphGRUDescriptor *) descriptor
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( GRU(_:recurrentWeight:inputWeight:bias:initState:descriptor:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
--(NSArray<MPSGraphTensor *> *) GRUWithSourceTensor:(MPSGraphTensor *) source
- recurrentWeight:(MPSGraphTensor *) recurrentWeight
- inputWeight:(MPSGraphTensor * _Nullable) inputWeight
- bias:(MPSGraphTensor * _Nullable) bias
- descriptor:(MPSGraphGRUDescriptor *) descriptor
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( GRU(_:recurrentWeight:inputWeight:bias:descriptor:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create a GRU gradient op and return the gradient tensor values.
- *
- * @param source Tensor containing the source data `x[t]` - shape should be [T,N,I].
- * In case `inputWeight = nil` and `bidirectional = NO` then the layout is [T,N,3H]
- * and for `inputWeight = nil` and `bidirectional = YES` the layout is [T,N,6H].
- * @param recurrentWeight Tensor containing the recurrent weights `R`.
- * For `bidirectional` the layout is [2,3H,H] and otherwise it is [3H,H].
- * @param sourceGradient Input gradient, that is gradient of a tensor wrt. to first output of the forward pass.
- * @param zState The second output of `GRUWithSourceTensor` with @ref `descriptor.training = true`.
- * @param outputFwd The first output of `GRUWithSourceTensor` with @ref `descriptor.training = true`.
- * @param stateGradient Input gradient for state coming from the future timestep - optional, if missing assumes zeroes.
- * @param inputWeight Tensor containing the input weights matrix `W` - optional, if missing assumes diagonal unit-matrix.
- * For `bidirectional` the layout is [6H,I] and otherwise it is [3H,I].
- * @param bias Tensor containing the bias `b` - optional, if missing assumes zeroes.
- * For `bidirectional` the layout is [6H] and otherwise it is [3H].
- * @param initState Initial internal state of the LSTM `h[-1]` - optional, if missing assumes zeroes.
- * For `bidirectional` the layout is [N,2H] and otherwise it is [N,H].
- * @param mask Tensor containing the mask `m` - optional, if missing assumes ones. Useful for dropout.
- * @param secondaryBias Tensor containing the secondary bias vector `b2` - optional, if missing assumes zeroes.
- * Only used with `reset_after = YES`.
- * Shape is [H], ie. a vector for each gate, or [2H] for bidirectional.
- * @param descriptor The GRU op definition.
- * @param name The name for the operation.
- *
- * @return A valid MPSGraphTensor array containing gradients for each input tensor, except for `sourceGradient` and `mask`.
- * In case an input is nil, no gradient will be returned for it.
- * The order of the gradients will be: for source, for recurrentWeight, for inputWeight, for bias, for initState, for secondaryBias.
- */
-
--(NSArray<MPSGraphTensor *> *) GRUGradientsWithSourceTensor:(MPSGraphTensor *) source
- recurrentWeight:(MPSGraphTensor *) recurrentWeight
- sourceGradient:(MPSGraphTensor *) sourceGradient
- zState:(MPSGraphTensor *) zState
- outputFwd:(MPSGraphTensor *) outputFwd
- stateGradient:(MPSGraphTensor * _Nullable) stateGradient
- inputWeight:(MPSGraphTensor * _Nullable) inputWeight
- bias:(MPSGraphTensor * _Nullable) bias
- initState:(MPSGraphTensor * _Nullable) initState
- mask:(MPSGraphTensor * _Nullable) mask
- secondaryBias:(MPSGraphTensor * _Nullable) secondaryBias
- descriptor:(MPSGraphGRUDescriptor *) descriptor
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( GRUGradients(_:recurrentWeight:sourceGradient:zState:outputFwd:stateGradient:inputWeight:bias:initState:mask:secondaryBias:descriptor:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
--(NSArray<MPSGraphTensor *> *) GRUGradientsWithSourceTensor:(MPSGraphTensor *) source
- recurrentWeight:(MPSGraphTensor *) recurrentWeight
- sourceGradient:(MPSGraphTensor *) sourceGradient
- zState:(MPSGraphTensor *) zState
- outputFwd:(MPSGraphTensor *) outputFwd
- inputWeight:(MPSGraphTensor * _Nullable) inputWeight
- bias:(MPSGraphTensor * _Nullable) bias
- initState:(MPSGraphTensor * _Nullable) initState
- descriptor:(MPSGraphGRUDescriptor *) descriptor
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( GRUGradients(_:recurrentWeight:sourceGradient:zState:outputFwd:inputWeight:bias:initState:descriptor:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
--(NSArray<MPSGraphTensor *> *) GRUGradientsWithSourceTensor:(MPSGraphTensor *) source
- recurrentWeight:(MPSGraphTensor *) recurrentWeight
- sourceGradient:(MPSGraphTensor *) sourceGradient
- zState:(MPSGraphTensor *) zState
- outputFwd:(MPSGraphTensor *) outputFwd
- inputWeight:(MPSGraphTensor * _Nullable) inputWeight
- bias:(MPSGraphTensor * _Nullable) bias
- descriptor:(MPSGraphGRUDescriptor *) descriptor
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( GRUGradients(_:recurrentWeight:sourceGradient:zState:outputFwd:inputWeight:bias:descriptor:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphResizeOps.h /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphResizeOps.h
--- /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphResizeOps.h 2022-08-06 02:26:54.000000000 -0500
+++ /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphResizeOps.h 2022-08-03 21:06:18.000000000 -0500
@@ -17,14 +17,6 @@
MPSGraphResizeBilinear MPS_ENUM_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0)) = 1L,
};
-typedef NS_ENUM(NSUInteger, MPSGraphResizeNearestRoundingMode)
-{
- MPSGraphResizeNearestRoundingModeRoundPreferCeil MPS_ENUM_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0)) MPS_SWIFT_NAME(roundPreferCeil) = 0L,
- MPSGraphResizeNearestRoundingModeRoundPreferFloor MPS_ENUM_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0)) = 1L,
- MPSGraphResizeNearestRoundingModeCeil MPS_ENUM_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0)) = 2L,
- MPSGraphResizeNearestRoundingModeFloor MPS_ENUM_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0)) = 3L,
-};
-
MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
@interface MPSGraph(MPSGraphResizeOps)
@@ -32,7 +24,7 @@
* @abstract Create Resize op and return the result tensor
* @discussion 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
+ * Nearest Neighnor - 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.
@@ -55,7 +47,7 @@
*
* @param imagesTensor Tensor containing input images.
* @param size A 2-element shape as [newHeight, newWidth]
- * @param mode The resampling mode to use. If nearest sampling is specifed, RoundPreferCeil mode will be used.
+ * @param mode The resampling mode to use.
* @param centerResult Controls if the result image is centered on the input image. When NO, the result will have the top left corner aligned
* @param alignCorners When YES, the result image will have the same value as the input image in the corners
* @param layout Specifies what layout the provided tensor is in. The returned tensor will follow the same layout.
@@ -77,7 +69,7 @@
* @abstract Create Resize op and return the result tensor
* @discussion 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
+ * Nearest Neighnor - 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.
@@ -98,14 +90,14 @@
* centerResult = NO;
* @endcode
*
- * @param imagesTensor Tensor containing input images.
- * @param size 1D Int32 or Int64 tensor. A 2-element shape as [newHeight, newWidth]
- * @param mode The resampling mode to use. If nearest sampling is specifed, RoundPreferCeil mode will be used.
- * @param centerResult Controls if the result image is centered on the input image. When NO, the result will have the top left corner aligned
- * @param alignCorners When YES, the result image will have the same value as the input image in the corners
- * @param 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.
- * @param name The name for the operation
+ * @param imagesTensor Tensor containing input images.
+ * @param size 1D Int32 or Int64 tensor. A 2-element shape as [newHeight, newWidth]
+ * @param mode The resampling mode to use.
+ * @param centerResult Controls if the result image is centered on the input image. When NO, the result will have the top left corner aligned
+ * @param alignCorners When YES, the result image will have the same value as the input image in the corners
+ * @param 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.
+ * @param name The name for the operation
*
* @return A valid MPSGraphTensor object
*/
@@ -116,149 +108,23 @@
alignCorners:(BOOL) alignCorners
layout:(MPSGraphTensorNamedDataLayout) layout
name:(NSString * _Nullable) name
-MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
+MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
MPS_SWIFT_NAME( resize(_:sizeTensor:mode:centerResult:alignCorners:layout:name:) );
-/*!
- * @abstract Create Resize op and return the result tensor
- * @discussion 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.
- *
- * @param imagesTensor Tensor containing input images.
- * @param size 1D Int32 or Int64 tensor. A 2-element shape as [newHeight, newWidth]
- * @param nearestRoundingMode The rounding mode to use when using nearest resampling. Default is roundPreferCeil.
- * @param centerResult Controls if the result image is centered on the input image. When NO, the result will have the top left corner aligned
- * @param alignCorners When YES, the result image will have the same value as the input image in the corners
- * @param 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.
- * @param name The name for the operation
- *
- * @return A valid MPSGraphTensor object
- */
--(MPSGraphTensor *) resizeNearestWithTensor:(MPSGraphTensor *) imagesTensor
- sizeTensor:(MPSGraphTensor *) size
- nearestRoundingMode:(MPSGraphResizeNearestRoundingMode) nearestRoundingMode
- centerResult:(BOOL) centerResult
- alignCorners:(BOOL) alignCorners
- layout:(MPSGraphTensorNamedDataLayout) layout
- name:(NSString * _Nullable) name
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0))
-MPS_SWIFT_NAME( resizeNearest(_:sizeTensor:nearestRoundingMode:centerResult:alignCorners:layout:name:) );
-
-/*!
- * @abstract Create Resize op and return the result tensor
- * @discussion Resamples input images to given size using bilinear sampling.
- * See above discussion for more details.
- *
- * @param imagesTensor Tensor containing input images.
- * @param size 1D Int32 or Int64 tensor. A 2-element shape as [newHeight, newWidth]
- * @param centerResult Controls if the result image is centered on the input image. When NO, the result will have the top left corner aligned
- * @param alignCorners When YES, the result image will have the same value as the input image in the corners
- * @param 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.
- * @param name The name for the operation
- *
- * @return A valid MPSGraphTensor object
- */
--(MPSGraphTensor *) resizeBilinearWithTensor:(MPSGraphTensor *) imagesTensor
- sizeTensor:(MPSGraphTensor *) size
- centerResult:(BOOL) centerResult
- alignCorners:(BOOL) alignCorners
- layout:(MPSGraphTensorNamedDataLayout) layout
- name:(NSString * _Nullable) name
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0))
-MPS_SWIFT_NAME( resizeBilinear(_:sizeTensor:centerResult:alignCorners:layout:name:) );
-
-/*!
- * @abstract Create Resize op and return the result tensor
- * @discussion Resamples input images to given size using the provided scale and offset.
- * Destination indices are computed using
- * @code
- * dst_indices = (src_indices * scale) + offset
- * @endcode
- * For most use cases passing the scale and offset directly is unnecessary, and it is
- * preferable to use the API specifying centerResult and alignCorners.
- *
- * @param imagesTensor Tensor containing input images.
- * @param size 1D Int32 or Int64 tensor. A 2-element shape as [newHeight, newWidth]
- * @param scaleOffset 1D float tensor. A 4-element shape as [scaleY, scaleX, offsetY, offsetX]
- * @param mode The resampling mode to use. If nearest sampling is specifed, RoundPreferCeil mode will be used.
- * @param 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.
- * @param name The name for the operation
- *
- * @return A valid MPSGraphTensor object
- */
--(MPSGraphTensor *) resizeTensor:(MPSGraphTensor *) imagesTensor
- sizeTensor:(MPSGraphTensor *) size
- scaleOffsetTensor:(MPSGraphTensor *) scaleOffset
- mode:(MPSGraphResizeMode) mode
- layout:(MPSGraphTensorNamedDataLayout) layout
- name:(NSString * _Nullable) name
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0))
-MPS_SWIFT_NAME( resize(_:sizeTensor:scaleOffsetTensor:mode:layout:name:) );
-
-/*!
- * @abstract Create Resize op and return the result tensor
- * @discussion Resamples input images to given size using the provided scale and offset and nearest neighbor sampling
- * See above discussion for more details.
- *
- * @param imagesTensor Tensor containing input images.
- * @param size 1D Int32 or Int64 tensor. A 2-element shape as [newHeight, newWidth]
- * @param scaleOffset 1D float tensor. A 4-element shape as [scaleY, scaleX, offsetY, offsetX]
- * @param nearestRoundingMode The rounding mode to use when using nearest resampling.
- * @param 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.
- * @param name The name for the operation
- *
- * @return A valid MPSGraphTensor object
- */
--(MPSGraphTensor *) resizeNearestWithTensor:(MPSGraphTensor *) imagesTensor
- sizeTensor:(MPSGraphTensor *) size
- scaleOffsetTensor:(MPSGraphTensor *) scaleOffset
- nearestRoundingMode:(MPSGraphResizeNearestRoundingMode) nearestRoundingMode
- layout:(MPSGraphTensorNamedDataLayout) layout
- name:(NSString * _Nullable) name
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0))
-MPS_SWIFT_NAME( resizeNearest(_:sizeTensor:scaleOffsetTensor:nearestRoundingMode:layout:name:) );
-
-/*!
- * @abstract Create Resize op and return the result tensor
- * @discussion Resamples input images to given size using the provided scale and offset and bilinear sampling
- * See above discussion for more details.
- *
- * @param imagesTensor Tensor containing input images.
- * @param size 1D Int32 or Int64 tensor. A 2-element shape as [newHeight, newWidth]
- * @param scaleOffset 1D float tensor. A 4-element shape as [scaleY, scaleX, offsetY, offsetX]
- * @param nearestRoundingMode The rounding mode to use when using nearest resampling.
- * @param 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.
- * @param name The name for the operation
- *
- * @return A valid MPSGraphTensor object
- */
--(MPSGraphTensor *) resizeBilinearWithTensor:(MPSGraphTensor *) imagesTensor
- sizeTensor:(MPSGraphTensor *) size
- scaleOffsetTensor:(MPSGraphTensor *) scaleOffset
- layout:(MPSGraphTensorNamedDataLayout) layout
- name:(NSString * _Nullable) name
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0))
-MPS_SWIFT_NAME( resizeBilinear(_:sizeTensor:scaleOffsetTensor:layout:name:) );
/*!
* @abstract Create Resize gradient op and return the result tensor
* @discussion Computes the gradient for the forward pass Resize op with identical parameters.
* See discussion of resizeTensor for more in depth description of resize paramters.
*
- * @param gradient Incoming gradient tensor
- * @param input Forward pass input tensor
- * @param mode The resampling mode to use. If nearest sampling is specifed, RoundPreferCeil mode will be used.
- * @param centerResult Controls if the result image is centered on the input image. When NO, the result will have the top left corner aligned
- * @param alignCorners When YES, the result image will have the same value as the input image in the corners
- * @param 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.
- * @param name The name for the operation
+ * @param gradient Incoming gradient tensor
+ * @param input Forward pass input tensor
+ * @param mode The resampling mode to use.
+ * @param centerResult Controls if the result image is centered on the input image. When NO, the result will have the top left corner aligned
+ * @param alignCorners When YES, the result image will have the same value as the input image in the corners
+ * @param 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.
+ * @param name The name for the operation
*
* @return A valid MPSGraphTensor object
*/
@@ -270,123 +136,6 @@
layout:(MPSGraphTensorNamedDataLayout) layout
name:(NSString * _Nullable) name;
-/*!
- * @abstract Create Resize gradient op and return the result tensor
- * @discussion Computes the gradient for the forward pass Resize op with identical parameters.
- * See discussion of resizeTensor for more in depth description of resize paramters.
- *
- * @param gradient Incoming gradient tensor
- * @param input Forward pass input tensor
- * @param nearestRoundingMode The rounding mode to use when using nearest resampling.
- * @param centerResult Controls if the result image is centered on the input image. When NO, the result will have the top left corner aligned
- * @param alignCorners When YES, the result image will have the same value as the input image in the corners
- * @param 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.
- * @param name The name for the operation
- *
- * @return A valid MPSGraphTensor object
- */
--(MPSGraphTensor *) resizeNearestWithGradientTensor:(MPSGraphTensor *) gradient
- input:(MPSGraphTensor *) input
- nearestRoundingMode:(MPSGraphResizeNearestRoundingMode) nearestRoundingMode
- centerResult:(BOOL) centerResult
- alignCorners:(BOOL) alignCorners
- layout:(MPSGraphTensorNamedDataLayout) layout
- name:(NSString * _Nullable) name
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create Resize gradient op and return the result tensor
- * @discussion Computes the gradient for the forward pass Resize op with identical parameters.
- * See discussion of resizeTensor for more in depth description of resize paramters.
- *
- * @param gradient Incoming gradient tensor
- * @param input Forward pass input tensor
- * @param centerResult Controls if the result image is centered on the input image. When NO, the result will have the top left corner aligned
- * @param alignCorners When YES, the result image will have the same value as the input image in the corners
- * @param 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.
- * @param name The name for the operation
- *
- * @return A valid MPSGraphTensor object
- */
--(MPSGraphTensor *) resizeBilinearWithGradientTensor:(MPSGraphTensor *) gradient
- input:(MPSGraphTensor *) input
- centerResult:(BOOL) centerResult
- alignCorners:(BOOL) alignCorners
- layout:(MPSGraphTensorNamedDataLayout) layout
- name:(NSString * _Nullable) name
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-
-/*!
- * @abstract Create Resize gradient op and return the result tensor
- * @discussion Computes the gradient for the forward pass Resize op with identical parameters.
- * See discussion of resizeTensor for more in depth description of resize paramters.
- *
- * @param gradient Incoming gradient tensor
- * @param input Forward pass input tensor
- * @param scaleOffset 1D float tensor. A 4-element shape as [scaleY, scaleX, offsetY, offsetX]
- * @param mode The resampling mode to use. If nearest sampling is specifed, RoundPreferCeil mode will be used.
- * @param 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.
- * @param name The name for the operation
- *
- * @return A valid MPSGraphTensor object
- */
--(MPSGraphTensor *) resizeWithGradientTensor:(MPSGraphTensor *) gradient
- input:(MPSGraphTensor *) input
- scaleOffsetTensor:(MPSGraphTensor *) scaleOffset
- mode:(MPSGraphResizeMode) mode
- layout:(MPSGraphTensorNamedDataLayout) layout
- name:(NSString * _Nullable) name
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create Resize gradient op and return the result tensor
- * @discussion Computes the gradient for the forward pass Resize op with identical parameters.
- * See discussion of resizeTensor for more in depth description of resize paramters.
- *
- * @param gradient Incoming gradient tensor
- * @param input Forward pass input tensor
- * @param scaleOffset 1D float tensor. A 4-element shape as [scaleY, scaleX, offsetY, offsetX]
- * @param nearestRoundingMode The rounding mode to use when using nearest resampling.
- * @param 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.
- * @param name The name for the operation
- *
- * @return A valid MPSGraphTensor object
- */
--(MPSGraphTensor *) resizeNearestWithGradientTensor:(MPSGraphTensor *) gradient
- input:(MPSGraphTensor *) input
- scaleOffsetTensor:(MPSGraphTensor *) scaleOffset
- nearestRoundingMode:(MPSGraphResizeNearestRoundingMode) nearestRoundingMode
- layout:(MPSGraphTensorNamedDataLayout) layout
- name:(NSString * _Nullable) name
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create Resize gradient op and return the result tensor
- * @discussion Computes the gradient for the forward pass Resize op with identical parameters.
- * See discussion of resizeTensor for more in depth description of resize paramters.
- *
- * @param gradient Incoming gradient tensor
- * @param input Forward pass input tensor
- * @param scaleOffset 1D float tensor. A 4-element shape as [scaleY, scaleX, offsetY, offsetX]
- * @param nearestRoundingMode The rounding mode to use when using nearest resampling.
- * @param 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.
- * @param name The name for the operation
- *
- * @return A valid MPSGraphTensor object
- */
--(MPSGraphTensor *) resizeBilinearWithGradientTensor:(MPSGraphTensor *) gradient
- input:(MPSGraphTensor *) input
- scaleOffsetTensor:(MPSGraphTensor *) scaleOffset
- layout:(MPSGraphTensorNamedDataLayout) layout
- name:(NSString * _Nullable) name
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphSortOps.h /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphSortOps.h
--- /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphSortOps.h 2022-08-05 12:40:56.000000000 -0500
+++ /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphSortOps.h 1969-12-31 18:00:00.000000000 -0600
@@ -1,87 +0,0 @@
-//
-// MPSGraphSortOps.h
-// MPSGraph
-//
-// Created by Matteo Franciolini on 6/30/22.
-// Copyright © 2022 Apple Inc. All rights reserved.
-//
-
-#ifndef MPSGraphSortOps_h
-#define MPSGraphSortOps_h
-
-#import <MetalPerformanceShadersGraph/MPSGraph.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-MPS_CLASS_AVAILABLE_STARTING(macos(11.0), ios(14.0), tvos(14.0))
-@interface MPSGraph(MPSGraphSortOps)
-
-/*!
- * @abstract Create a sort operation and return the result tensor.
- *
- * @param tensor input tensor
- * @param axis the tensor dimension over which the sort occurs
- * @param descending wether to sort or not in descending order
- * @param name name for the operation
- *
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) sortWithTensor:(MPSGraphTensor *) tensor
- axis:(NSInteger) axis
- descending:(BOOL) descending
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( sort(_:axis:descending:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create a sort operation and return the result tensor.
- *
- * @param tensor input tensor
- * @param axisTensor the tensor dimension over which the sort occurs
- * @param descending wether to sort or not in descending order
- * @param name name for the operation
- *
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) sortWithTensor:(MPSGraphTensor *) tensor
- axisTensor:(MPSGraphTensor *) axisTensor
- descending:(BOOL) descending
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( sort(_:axisTensor:descending:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create an ascending sort operation and return the result tensor.
- *
- * @param tensor input tensor
- * @param axis the tensor dimension over which the sort occurs
- * @param name name for the operation
- *
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) sortWithTensor:(MPSGraphTensor *) tensor
- axis:(NSInteger) axis
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( sort(_:axis:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-/*!
- * @abstract Create an ascending sort operation and return the result tensor.
- *
- * @param tensor input tensor
- * @param axisTensor the tensor dimension over which the sort occurs
- * @param name name for the operation
- *
- * @return A valid MPSGraphTensor object.
- */
--(MPSGraphTensor *) sortWithTensor:(MPSGraphTensor *) tensor
- axisTensor:(MPSGraphTensor *) axisTensor
- name:(NSString * _Nullable) name
-MPS_SWIFT_NAME( sort(_:axisTensor:name:))
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0));
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-#endif /* MPSGraphSortOps_h */
diff -ruN /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorShapeOps.h /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorShapeOps.h
--- /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorShapeOps.h 2022-08-05 15:55:44.000000000 -0500
+++ /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorShapeOps.h 2022-08-03 21:06:19.000000000 -0500
@@ -49,7 +49,7 @@
-(MPSGraphTensor *) reshapeTensor:(MPSGraphTensor *) tensor
withShapeTensor:(MPSGraphTensor *) shapeTensor
name:(NSString * _Nullable) name
-MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
+MPS_CLASS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0))
MPS_SWIFT_NAME( reshape(_:shapeTensor:name:) );
-(MPSGraphTensor *) transposeTensor:(MPSGraphTensor *) tensor
@@ -57,12 +57,6 @@
withDimension:(NSUInteger) dimensionIndex2
name:(NSString * _Nullable) name;
--(MPSGraphTensor *) transposeTensor:(MPSGraphTensor *) tensor
- permutation:(NSArray<NSNumber *> *) permutation
- name:(NSString * _Nullable) name
-MPS_AVAILABLE_STARTING(macos(13.0), ios(16.0), tvos(16.0))
-MPS_SWIFT_NAME( transpose(_:permutation:name:) );
-
-(MPSGraphTensor *) sliceTensor:(MPSGraphTensor *) tensor
dimension:(NSUInteger) dimensionIndex
start:(NSInteger) start
@@ -430,7 +424,7 @@
*/
-(MPSGraphTensor *)castTensor:(MPSGraphTensor *)tensor
toType:(MPSDataType)type
- name:(NSString * _Nullable)name
+ name:(NSString *)name
MPS_AVAILABLE_STARTING(macos(12.0), ios(15.0), tvos(15.0));
/*!
diff -ruN /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MetalPerformanceShadersGraph.h /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MetalPerformanceShadersGraph.h
--- /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MetalPerformanceShadersGraph.h 2022-08-01 05:08:12.000000000 -0500
+++ /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MetalPerformanceShadersGraph.h 2022-02-22 22:56:07.000000000 -0600
@@ -15,7 +15,6 @@
#import <MetalPerformanceShadersGraph/MPSGraphConvolutionOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphConvolutionTransposeOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphControlFlowOps.h>
-#import <MetalPerformanceShadersGraph/MPSGraphCumulativeOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphDepthwiseConvolutionOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphGatherOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphLinearAlgebraOps.h>
@@ -30,9 +29,7 @@
#import <MetalPerformanceShadersGraph/MPSGraphRandomOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphReductionOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphResizeOps.h>
-#import <MetalPerformanceShadersGraph/MPSGraphRNNOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphScatterNDOps.h>
-#import <MetalPerformanceShadersGraph/MPSGraphSortOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphStencilOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphTensorShapeOps.h>
#import <MetalPerformanceShadersGraph/MPSGraphTopKOps.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