Skip to content

MetalPerformanceShadersGraph tvOS xcode16.2 b2

Alex Soto edited this page Nov 6, 2024 · 1 revision

#MetalPerformanceShadersGraph.framework

diff -ruN /Applications/Xcode_16.1.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorShapeOps.h /Applications/Xcode_16.2.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Headers/MPSGraphTensorShapeOps.h
--- /Applications/Xcode_16.1.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.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/AppleTVOS.platform/Developer/SDKs/AppleTVOS.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