Skip to content

MetalPerformanceShadersGraph iOS xcode16.2 b2

Rolf Bjarne Kvinge edited this page Nov 29, 2024 · 2 revisions

#MetalPerformanceShadersGraph.framework https://github.com/xamarin/xamarin-macios/pull/21731

diff -ruN /Applications/Xcode_16.1.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorShapeOps.h /Applications/Xcode_16.2.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorShapeOps.h
--- /Applications/Xcode_16.1.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorShapeOps.h	2024-09-29 03:03:16
+++ /Applications/Xcode_16.2.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorShapeOps.h	2024-10-21 15:45:40
@@ -139,6 +139,52 @@
                     squeezeMask:(uint32_t) squeezeMask
                            name:(NSString * _Nullable) name;
 
+/// Creates a strided-slice operation and returns the result tensor.
+///
+/// Slices a tensor starting from `startTensor`, stopping short before `endTensor` stepping
+/// `strideTensor` paces between each value. Semantics based on
+/// [TensorFlow Strided Slice Op](https://www.tensorflow.org/api_docs/python/tf/strided_slice).
+///
+/// - Parameters:
+///   - tensor: The Tensor to be sliced.
+///   - startTensor: The tensor that specifies the starting points for each dimension.
+///   - endTensor: The tensor that specifies the ending points for each dimension.
+///   - strideTensor: The tensor that specifies the strides for each dimension.
+///   - startMask: A bitmask that indicates dimensions whose `starts` values the operation should ignore.
+///   - endMask: A bitmask that indicates dimensions whose `ends` values the operation should ignore.
+///   - squeezeMask: A bitmask that indicates dimensions the operation will squeeze out from the result.
+///   - name: The name for the operation.
+/// - Returns: A valid MPSGraphTensor object.
+-(MPSGraphTensor *) sliceTensor:(MPSGraphTensor *) tensor
+                    startTensor:(MPSGraphTensor *) startTensor
+                      endTensor:(MPSGraphTensor *) endTensor
+                   strideTensor:(MPSGraphTensor *) strideTensor
+                      startMask:(uint32_t) startMask
+                        endMask:(uint32_t) endMask
+                    squeezeMask:(uint32_t) squeezeMask
+                           name:(NSString * _Nullable) name
+MPS_AVAILABLE_STARTING(macos(15.4), ios(18.4), macCatalyst(18.4), tvos(18.4));
+
+/// Creates a slice operation and returns the result tensor.
+///
+/// Slices a tensor starting from `startTensor`, stopping short before `startTensor + endTensor` stepping
+/// a single pace between each value. Semantics based on
+/// [TensorFlow Strided Slice Op](https://www.tensorflow.org/api_docs/python/tf/strided_slice).
+///
+/// - Parameters:
+///   - tensor: The Tensor to be sliced.
+///   - startTensor: The tensor that specifies the starting points for each dimension.
+///   - sizeTensor: The tensor that specifies the size of the result for each dimension.
+///   - squeezeMask: A bitmask that indicates dimensions the operation will squeeze out from the result.
+///   - name: The name for the operation.
+/// - Returns: A valid MPSGraphTensor object.
+-(MPSGraphTensor *) sliceTensor:(MPSGraphTensor *) tensor
+                    startTensor:(MPSGraphTensor *) startTensor
+                     sizeTensor:(MPSGraphTensor *) sizeTensor
+                    squeezeMask:(uint32_t) squeezeMask
+                           name:(NSString * _Nullable) name
+MPS_AVAILABLE_STARTING(macos(15.4), ios(18.4), macCatalyst(18.4), tvos(18.4));
+
 /// Creates a strided-slice gradient operation and returns the result tensor.
 ///
 /// - Parameters:
@@ -155,6 +201,48 @@
                                    ends:(NSArray<NSNumber *> *) ends
                                 strides:(NSArray<NSNumber *> *) strides
                                    name:(NSString * _Nullable) name;
+
+/// Creates a strided-slice gradient operation and returns the result tensor.
+///
+/// - Parameters:
+///   - inputGradientTensor: The input gradient.
+///   - fwdInShapeTensor: The shape of the forward pass input, that is the shape of the gradient output.
+///   - startTensor: The tensor that specifies the starting points for each dimension.
+///   - endTensor: The tensor that specifies the ending points for each dimension.
+///   - strideTensor: The tensor that specifies the strides for each dimension.
+///   - startMask: A bitmask that indicates dimensions whose `starts` values the operation should ignore.
+///   - endMask: A bitmask that indicates dimensions whose `ends` values the operation should ignore.
+///   - squeezeMask: A bitmask that indicates dimensions the operation will squeeze out from the result.
+///   - name: The name for the operation.
+/// - Returns: A valid MPSGraphTensor object
+-(MPSGraphTensor *) sliceGradientTensor:(MPSGraphTensor *) inputGradientTensor
+                       fwdInShapeTensor:(MPSGraphTensor *) fwdInShapeTensor
+                            startTensor:(MPSGraphTensor *) startTensor
+                              endTensor:(MPSGraphTensor *) endTensor
+                           strideTensor:(MPSGraphTensor *) strideTensor
+                              startMask:(uint32_t) startMask
+                                endMask:(uint32_t) endMask
+                            squeezeMask:(uint32_t) squeezeMask
+                                   name:(NSString * _Nullable) name
+MPS_AVAILABLE_STARTING(macos(15.4), ios(18.4), macCatalyst(18.4), tvos(18.4));
+
+/// Creates a slice gradient operation and returns the result tensor.
+///
+/// - Parameters:
+///   - inputGradientTensor: The input gradient.
+///   - fwdInShapeTensor: The shape of the forward pass input, that is the shape of the gradient output.
+///   - startTensor: The tensor that specifies the starting points for each dimension.
+///   - sizeTensor: The tensor that specifies the size of the forward result for each dimension.
+///   - squeezeMask: A bitmask that indicates dimensions the operation will squeeze out from the result.
+///   - name: The name for the operation.
+/// - Returns: A valid MPSGraphTensor object
+-(MPSGraphTensor *) sliceGradientTensor:(MPSGraphTensor *) inputGradientTensor
+                       fwdInShapeTensor:(MPSGraphTensor *) fwdInShapeTensor
+                            startTensor:(MPSGraphTensor *) startTensor
+                             sizeTensor:(MPSGraphTensor *) sizeTensor
+                            squeezeMask:(uint32_t) squeezeMask
+                                   name:(NSString * _Nullable) name
+MPS_AVAILABLE_STARTING(macos(15.4), ios(18.4), macCatalyst(18.4), tvos(18.4));
 
 /// Creates a strided-slice gradient operation and returns the result tensor.
 ///
Clone this wiki locally