Skip to content

Metal iOS xcode27.0 b4

Alex Soto edited this page Jul 23, 2026 · 2 revisions

#Metal.framework

diff -ruN /Applications/Xcode_27.0.0-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningPipeline.h /Applications/Xcode_27.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningPipeline.h
--- /Applications/Xcode_27.0.0-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningPipeline.h	2026-06-27 05:05:49
+++ /Applications/Xcode_27.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningPipeline.h	2026-07-11 02:39:39
@@ -30,6 +30,9 @@
 
 /// Sets the dimension of an input tensor at a buffer index.
 ///
+/// When the compiled model declares the input as unranked (unknown rank), any concrete `dimensions` are accepted.
+/// Otherwise `dimensions.rank` must equal the model's input rank, and each static (non `-1`) dimension must match.
+///
 /// - Parameters:
 ///   - dimensions: the dimensions of the tensor.
 ///   - bufferIndex: Index of the tensor to modify.
diff -ruN /Applications/Xcode_27.0.0-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h /Applications/Xcode_27.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h
--- /Applications/Xcode_27.0.0-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h	2026-06-28 03:18:42
+++ /Applications/Xcode_27.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h	2026-07-11 02:12:36
@@ -2,8 +2,7 @@
 //  MTLTensor.h
 //  Metal
 //
-//  Created by Vatsin Suchak on 2024/9/17.
-//  Copyright © 2024 Apple, Inc. All rights reserved.
+//  Copyright © 2024 Apple Inc. All rights reserved.
 //
 
 #ifndef MTLTensor_h
@@ -27,7 +26,7 @@
     /// A half-precision floating point data type.
     MTLTensorDataTypeFloat16  = MTLDataTypeHalf,
     
-    /// A 16-bit floating point data type with 8 exponent bits, 7 mantissa bits and 1 sign bit.
+    /// A 16-bit floating point data type with 8 exponent bits, 7 mantissa bits, and 1 sign bit.
     MTLTensorDataTypeBFloat16 = MTLDataTypeBFloat,
     
     /// An 8-bit signed integer data type.
@@ -42,66 +41,68 @@
     /// A 16-bit unsigned integer data type.
     MTLTensorDataTypeUInt16   = MTLDataTypeUShort,
     
-    /// A 32-bit integer data type.
+    /// A 32-bit signed integer data type.
     MTLTensorDataTypeInt32    = MTLDataTypeInt,
     
     /// A 32-bit unsigned integer data type.
     MTLTensorDataTypeUInt32   = MTLDataTypeUInt,
     
-    /// A 4-bit signed integer format data type.
+    /// A 4-bit signed integer data type.
     MTLTensorDataTypeInt4 API_AVAILABLE(macos(26.4), ios(26.4))  = 143,
     
-    /// A 4-bit unsigned integer format data type.
+    /// A 4-bit unsigned integer data type.
     MTLTensorDataTypeUInt4 API_AVAILABLE(macos(26.4), ios(26.4)) = 144,
     
-    /// An 8-bit floating point format data type with 8 exponent bits.
+    /// An 8-bit floating point data type with 8 exponent bits, 0 mantissa bits, and no sign bit.
     MTLTensorDataTypeMetalFloat8UE8M0 API_AVAILABLE(macos(27.0), ios(27.0)) = 145,
     
-    /// A 2-bit unsigned integer format data type.
+    /// A 2-bit unsigned integer data type.
     MTLTensorDataTypeUInt2 API_AVAILABLE(macos(27.0), ios(27.0)) = 149,
     
-    /// A 2-bit signed integer format data type.
+    /// A 2-bit signed integer data type.
     MTLTensorDataTypeInt2 API_AVAILABLE(macos(27.0), ios(27.0)) = 150,
     
-    /// An 8-bit floating point format data type with 5 exponent bits, 2 mantissa bits and 1 sign bit.
+    /// An 8-bit floating point data type with 5 exponent bits, 2 mantissa bits, and 1 sign bit.
     MTLTensorDataTypeMetalFloat8E5M2 API_AVAILABLE(macos(27.0), ios(27.0)) = 141,
     
-    /// An 8-bit floating point format data type with 4 exponent bits, 3 mantissa bits and 1 sign bit.
+    /// An 8-bit floating point data type with 4 exponent bits, 3 mantissa bits, and 1 sign bit.
     MTLTensorDataTypeMetalFloat8E4M3 API_AVAILABLE(macos(27.0), ios(27.0)) = 142,
     
-    /// A 4-bit floating point format data type with 2 exponent bits, 1 mantissa bit and 1 sign bit.
+    /// A 4-bit floating point data type with 2 exponent bits, 1 mantissa bit, and 1 sign bit.
     MTLTensorDataTypeMetalFloat4E2M1 API_AVAILABLE(macos(27.0), ios(27.0)) = 148,
 } API_AVAILABLE(macos(26.0), ios(26.0));
 
 /// The largest rank a tensor can have.
 #define MTL_TENSOR_MAX_RANK 16
 
-/// An array of length matching the rank, holding the dimensions of a tensor.
+/// An integer array that holds per-dimension values such as tensor sizes, strides, or block factors
 ///
-/// Supports rank up to ``MTL_TENSOR_MAX_RANK``.
+/// Supports a rank between `0` and ``MTL_TENSOR_MAX_RANK``.
 MTL_EXPORT API_AVAILABLE(macos(26.0), ios(26.0))
 @interface MTLTensorExtents : NSObject <NSCopying>
 
-/// Creates a new tensor extents with the rank and extent values you provide.
+/// Creates an extents object with the rank and values you provide.
 ///
 /// Zero rank extents represent scalars. `values` can only be `nil` if `rank` is 0.
 /// - Parameters:
-///   - rank: the number of dimensions.
-///   - values: an array of length `rank` that specifies the size of each dimension. The first dimension is the innermost dimension.
-/// - Returns: Tensor extents with the rank and extent values you provide. Returns `nil` if `rank` exceeds 0 and `values` is `nil` or if `rank` exceeds ``MTL_TENSOR_MAX_RANK``.
+///   - rank: The number of values in the extents. Pass `0` to create a scalar (rank-zero) extents.
+///   - values: A C array of `rank` integer values, or `nil` when `rank` is `0`. The first element
+///     corresponds to the innermost dimension.
+/// - Returns: A new extents instance, or `nil` if `rank` exceeds 0 and `values` is `nil`,
+///   or if `rank` exceeds ``MTL_TENSOR_MAX_RANK``.
 - (nullable instancetype)initWithRank:(NSUInteger)rank values:(nullable const NSInteger *)values;
 
 
-/// Obtains the rank of the tensor.
-///
-/// The rank represents the number of dimensions.
+/// The number of values in the extents object.
 @property (readonly) NSUInteger rank;
 
-/// Returns the extent at an index.
+/// Returns the value at the specified dimension index.
 ///
 /// - Parameters:
-///   - dimensionIndex: the index of the dimension. The first dimension is the innermost dimension.
-/// - Returns: the extent at `dimensionIndex`. This method returns -1 if `dimensionIndex` is greater than or equal to `rank`.
+///   - dimensionIndex: The index of the value to retrieve. The first index corresponds
+///     to the innermost dimension.
+/// - Returns: The value at `dimensionIndex`, or `-1` if `dimensionIndex` is greater than or
+///   equal to ``rank``.
 - (NSInteger)extentAtDimensionIndex:(NSUInteger)dimensionIndex;
 
 @end
@@ -117,12 +118,17 @@
 /// The error codes that Metal can raise when you create a tensor.
 typedef NS_ENUM(NSInteger, MTLTensorError)
 {
+    /// No error occurred.
     MTLTensorErrorNone              = 0,
+    
+    /// An internal Metal error occurred.
     MTLTensorErrorInternalError     = 1,
+    
+    /// The tensor descriptor is invalid.
     MTLTensorErrorInvalidDescriptor = 2,
 } API_AVAILABLE(macos(26.0), ios(26.0));
 
-/// The type that represents the different contexts for a tensor.
+/// The contexts in which you can use a tensor.
 typedef NS_OPTIONS(NSUInteger, MTLTensorUsage)
 {
     /// A tensor context that applies to compute encoders.
@@ -143,10 +149,10 @@
 /// The possible tensor plane types.
 typedef NS_ENUM(NSInteger, MTLTensorPlaneType)
 {
-    /// The data plane. This is the main plane of a tensor. Tensors always have a data plane.
+    /// The main data plane, which every tensor has
     MTLTensorPlaneTypeData = 0,
     
-    /// The scale auxiliary plane. Contains scale factors for elements in the data plane.
+    /// The auxiliary plane that stores scale factors for elements in the data plane.
     MTLTensorPlaneTypeScales = 1,
 } API_AVAILABLE(macos(27.0), ios(27.0));
 
@@ -159,18 +165,19 @@
 
 /// The data format of all elements in the plane.
 ///
-/// The default value of this property is ``MTLTensorDataType/MTLTensorDataTypeFloat8UE8M0``.
+/// The default value of this property is ``MTLTensorDataType/MTLTensorDataTypeMetalFloat8UE8M0``.
 @property (readwrite, nonatomic) MTLTensorDataType dataType;
 
-/// A ``MTLTensorExtents`` instance that describes how many data plane elements correspond to one element in this plane.
+/// An extents instance that represents the number of data plane elements which correspond to one element in
+/// a plane you create with this descriptor.
 ///
-/// The rank of the block factors must match the rank of the tensor's
+/// The number of dimensions in the extents needs to match the number of the tensor's
 /// dimensions.
 ///
-/// The first element of the block factors must be 32. All remaining elements
-/// must be 1.
+/// The first element of the block factors needs to be `32`. All remaining elements
+/// need to be `1`.
 ///
-/// The default value is a 1D block size of width 32.
+/// The default value is a 1D block size of width `32`.
 @property (readwrite, nonatomic, copy) MTLTensorExtents *blockFactors;
 
 @end
@@ -189,7 +196,7 @@
 /// The data plane is always present, and you configure it directly on ``MTLTensorDescriptor``.
 ///
 /// ``MTLTensorPlaneType/MTLTensorPlaneTypeScales`` auxiliary planes only support
-/// ``MTLTensorDataType/MTLTensorDataTypeFloat8UE8M0`` as a data type.
+/// ``MTLTensorDataType/MTLTensorDataTypeMetalFloat8UE8M0`` as a data type.
 ///
 /// - Parameters:
 ///   - descriptor: The descriptor configuring the auxiliary plane.
@@ -216,26 +223,45 @@
 
 /// An array of sizes, in elements, one for each dimension of the tensors you create with this descriptor.
 ///
-/// You are responsible for ensuring `dimensions` meets the following requirements:
-/// - `dimensions[i]` must be greater than 0.
-/// - If ``dataType`` is a format ``MTLTensorDataType``, `dimensions[0]` must be a multiple of 32 elements.
+/// Every element of the array needs to be greater than `0`.
 ///
+/// When ``dataType`` is ``MTLTensorDataType/MTLTensorDataTypeInt2``, ``MTLTensorDataType/MTLTensorDataTypeUInt2``,
+/// ``MTLTensorDataType/MTLTensorDataTypeInt4``, ``MTLTensorDataType/MTLTensorDataTypeUInt4``,
+/// ``MTLTensorDataType/MTLTensorDataTypeMetalFloat4E2M1``, ``MTLTensorDataType/MTLTensorDataTypeMetalFloat8E4M3``,
+/// ``MTLTensorDataType/MTLTensorDataTypeMetalFloat8E5M2``, or ``MTLTensorDataType/MTLTensorDataTypeMetalFloat8UE8M0``:
+/// - The dimension value of the array's first element needs to be a multiple of 32 elements.
+/// - The extents needs to have at least one dimension.
+///
+/// If the tensor has auxiliary planes, each dimension needs to be evenly divisible by its corresponding block factor.
+///
 /// The default value of this property is a rank one extents with size one.
 @property (readwrite, nonatomic, copy) MTLTensorExtents *dimensions;
 
-/// An array of strides, in elements, one for each dimension in the tensors you create with this descriptor, if applicable.
+/// An array of strides, in elements, one for each dimension of this tensor, if applicable.
 ///
-/// You are responsible for ensuring `strides` meets the following requirements:
-/// - The first element of `strides` is one.
-/// - If ``usage`` contains ``MTLTensorUsage/MTLTensorUsageMachineLearning``, the second element of `strides` is aligned to 64 bytes, and for any `i` larger than one, `strides[i]` is equal to `strides[i-1] * dimensions[i-1]`.
-/// - If ``dataType`` is a format ``MTLTensorDataType``, for any `i` greater than or equal to 1, `strides[i]` is aligned to 128 bytes. This is not a requirement for non-format data types, but following this convention improves performance.
+/// The stride value of the array's first element needs to be exactly `1`, because it is the innermost dimension.
+/// The strides for the subsequent dimensions can have different requirements based on the value of other properties.
+/// When the ``usage`` property includes the ``MTLTensorUsage/MTLTensorUsageMachineLearning`` option:
+/// - The second element of the array needs to be a multiple of 64 bytes.
+/// - The rest of the elements in the array need to equal the product of the previous stride multiplied with the size of
+///   the previous dimension. For example: `strides[i] = strides[i - 1] * dimensions[i - 1]`.
 ///
+/// When ``dataType`` is ``MTLTensorDataType/MTLTensorDataTypeInt2``, ``MTLTensorDataType/MTLTensorDataTypeUInt2``,
+/// ``MTLTensorDataType/MTLTensorDataTypeInt4``, ``MTLTensorDataType/MTLTensorDataTypeUInt4``,
+/// ``MTLTensorDataType/MTLTensorDataTypeMetalFloat4E2M1``, ``MTLTensorDataType/MTLTensorDataTypeMetalFloat8E4M3``,
+/// ``MTLTensorDataType/MTLTensorDataTypeMetalFloat8E5M2``, or ``MTLTensorDataType/MTLTensorDataTypeMetalFloat8UE8M0``,
+/// all elements of the array, except for the first element, need to be a multiple of 128 bytes.
+///
+/// > Tip: You can improve runtime performance by using strides that are multiples of 128, even when it's not a requirement.
+///
 /// Only set this property when creating tensors from a buffer.
 @property (readwrite, nonatomic, copy, nullable) MTLTensorExtents *strides;
 
 /// The data format of all elements in the data plane.
 ///
 /// The default value of this property is ``MTLTensorDataType/MTLTensorDataTypeFloat32``.
+///
+/// ``MTLTensorDataType/MTLTensorDataTypeMetalFloat8UE8M0`` is not a valid data type for this property.
 @property (readwrite, nonatomic) MTLTensorDataType dataType;
 
 /// A set of contexts in which you can use tensors you create with this descriptor.
@@ -254,13 +280,15 @@
 /// Multi-plane tensors do not support ``MTLTensorUsage/MTLTensorUsageMachineLearning``.
 /// Use ``MTLTensorUsage/MTLTensorUsageCompute`` or ``MTLTensorUsage/MTLTensorUsageRender``.
 ///
-/// Multi-plane tensors do not support data types larger than one byte as the data plane type
+/// Multi-plane tensors do not support data types larger than one byte as the data plane type.
 ///
+/// Multi-plane tensors do not support rank zero.
+///
 /// The default value is `nil`.
 @property (nullable, retain, nonatomic) MTLTensorAuxiliaryPlaneDescriptorMap *auxiliaryPlanes API_AVAILABLE(macos(27.0), ios(27.0));
 
 
-/// A packed set of the `storageMode`, `cpuCacheMode` and `hazardTrackingMode` properties.
+/// A packed set of the ``storageMode``, ``cpuCacheMode``, and ``hazardTrackingMode`` properties.
 @property (readwrite, nonatomic) MTLResourceOptions resourceOptions;
 
 /// A value that configures the cache mode of CPU mapping of tensors you create with this descriptor.
@@ -270,7 +298,7 @@
 
 /// A value that configures the memory location and access permissions of tensors you create with this descriptor.
 ///
-/// The default value of this property defaults to ``MTLStorageMode/MTLStorageModeShared``.
+/// The default value of this property is ``MTLStorageMode/MTLStorageModeShared``.
 @property (readwrite, nonatomic) MTLStorageMode storageMode;
 
 /// A value that configures the hazard tracking of tensors you create with this descriptor.
@@ -281,19 +309,18 @@
 @end
 
 
-/// Per-plane buffer backing storage for multi-plane tensor creation.
-///
-/// Use this type to associate each plane of a tensor with a
-/// ``MTLBuffer`` and byte offset, then pass it to the tensor
-/// creation API on ``MTLDevice``.
+/// An object that associates each plane of a tensor with a buffer and byte offset for buffer-backed tensor creation.
 MTL_EXPORT API_AVAILABLE(macos(27.0), ios(27.0))
 @interface MTLTensorBufferAttachments : NSObject <NSCopying>
 
 /// Sets the buffer and byte offset to use as backing storage for the given
 /// plane.
 ///
-/// The buffer must not be `nil`. The offset must be aligned to 128 bytes if
-/// the plane uses a format ``MTLTensorDataType``, otherwise it must be aligned
+/// The offset needs to be aligned to 128 bytes if the plane uses ``MTLTensorDataType/MTLTensorDataTypeInt2``,
+/// ``MTLTensorDataType/MTLTensorDataTypeUInt2``, ``MTLTensorDataType/MTLTensorDataTypeInt4``,
+/// ``MTLTensorDataType/MTLTensorDataTypeUInt4``, ``MTLTensorDataType/MTLTensorDataTypeMetalFloat4E2M1``,
+/// ``MTLTensorDataType/MTLTensorDataTypeMetalFloat8E4M3``, ``MTLTensorDataType/MTLTensorDataTypeMetalFloat8E5M2``,
+/// or ``MTLTensorDataType/MTLTensorDataTypeMetalFloat8UE8M0``, otherwise it needs to be aligned
 /// to the size of the plane's data type in bytes.
 ///
 /// - Parameters:
@@ -330,13 +357,13 @@
 /// The data format of all elements in the plane.
 @property (readonly) MTLTensorDataType dataType;
 
-/// Describes how many data plane elements correspond to one element in this plane.
+/// The number of data plane elements that correspond to one element in this auxiliary plane.
 @property (readonly) MTLTensorExtents *blockFactors;
 
 /// The buffer that provides the underlying storage for this plane, or `nil` if no buffer was provided at initialization.
 @property (readonly, nullable) id<MTLBuffer> buffer;
 
-/// Byte offset into `buffer` where this plane's data begins, or 0 if no buffer was provided at initialization.
+/// The byte offset into ``buffer`` where this plane's data begins, or `0` if no buffer was provided at initialization.
 @property (readonly) NSUInteger bufferOffset;
 
 /// The type of information this plane stores.
@@ -359,34 +386,10 @@
 
 /// An array of strides, in elements, one for each dimension of this tensor, if applicable.
 ///
-/// You are responsible for ensuring `strides` meets the following
-/// requirements:
-/// - The first element of `strides` must be 1.
-/// - If ``usage`` contains ``MTLTensorUsage/MTLTensorUsageMachineLearning``,
-///   the second element of `strides` must be aligned to 64 bytes, and for any
-///   `i` larger than 1, `strides[i]` must equal
-///   `strides[i-1] * dimensions[i-1]`.
-/// - If ``dataType`` is a format ``MTLTensorDataType``, for any `i`
-///   greater than or equal to 1, `strides[i]` must be aligned to 128 bytes.
-///   This is not a requirement for non-format data types, but following this
-///   convention improves performance.
-///
 /// This property is non-nil only for tensors created from a buffer.
 @property (nullable, readonly) MTLTensorExtents *strides;
 
 /// An array of sizes, in elements, one for each dimension of this tensor.
-///
-/// You are responsible for ensuring `dimensions` meets the following
-/// requirements:
-/// - `dimensions[i]` must be greater than 0.
-/// - If ``dataType`` is a format ``MTLTensorDataType``,
-///   `dimensions[0]` must be a multiple of 32 elements.
-/// - If the tensor has auxiliary planes, each dimension must be evenly
-///   divisible by its corresponding block factor.
-/// - If ``dataType`` is a format ``MTLTensorDataType``, or the tensor has
-///   auxiliary planes, the tensor must have rank 1 or higher.
-///
-/// The default value of this property is a rank one extents with size one.
 @property (readonly) MTLTensorExtents *dimensions;
 
 /// The underlying data format of the data plane.
@@ -405,15 +408,16 @@
 
 
 
-/// Replaces a slice of the data plane plane of this tensor with data from a pointer you
-/// provide.
+/// Replaces a slice of the data plane of this tensor with data from a pointer you provide.
 ///
-/// Create the tensor with ``MTLResourceOptions/MTLResourceStorageModeShared`` for CPU access via this method.
-/// Strides must be monotonically non-decreasing: for any `i > 0`, `strides[i] >= strides[i-1] * dimensions[i-1]`.
+/// Create the tensor with ``MTLResourceOptions/MTLResourceStorageModeShared``
+/// for CPU access via this method.
 ///
-/// The first dimension of `sliceOrigin` and `sliceDimensions` must be
-/// byte aligned.
+/// Strides need to be monotonically non-decreasing: for any `i > 0`,
+/// `strides[i] >= strides[i-1] * dimensions[i-1]`.
 ///
+/// The first dimension of `sliceOrigin` and `sliceDimensions` needs to be byte aligned.
+///
 /// - Parameters:
 ///   - sliceOrigin: An array of per-dimension offsets that together locate the first element
 ///     to write to in the tensor. Each element in this array corresponds to the dimension at the
@@ -431,15 +435,16 @@
                  withBytes:(const void *)bytes
                    strides:(MTLTensorExtents *)strides;
 
-/// Copies data from a slice of the data plane of this tensor into a pointer you
-/// provide.
+/// Copies data from a slice of the data plane of this tensor into a pointer you provide.
 ///
-/// Create the tensor with ``MTLResourceOptions/MTLResourceStorageModeShared`` for CPU access via this method.
-/// Strides must be monotonically non-decreasing: for any `i > 0`, `strides[i] >= strides[i-1] * dimensions[i-1]`.
+/// Create the tensor with ``MTLResourceOptions/MTLResourceStorageModeShared``
+/// for CPU access via this method.
 ///
-/// The first dimension of `sliceOrigin` and `sliceDimensions` must be
-/// byte aligned.
+/// Strides need to be monotonically non-decreasing: for any `i > 0`,
+/// `strides[i] >= strides[i-1] * dimensions[i-1]`.
 ///
+/// The first dimension of `sliceOrigin` and `sliceDimensions` needs to be byte aligned.
+///
 /// - Parameters:
 ///   - bytes: A pointer to bytes of data that this method copies the slice
 ///     into.
@@ -461,17 +466,18 @@
 
 
 
-/// Copies data from a slice of a plane of this tensor into a pointer you
-/// provide.
+/// Copies data from a slice of a plane of this tensor into a pointer you provide.
 ///
-/// When reading from auxiliary planes, specify `sliceOrigin` and
-/// `sliceDimensions` in plane coordinates by applying the auxiliary plane's
-/// block factors.
+/// When reading from auxiliary planes, specify `sliceOrigin` and `sliceDimensions`
+/// in plane coordinates by applying the auxiliary plane's block factors.
 ///
-/// Create the tensor with ``MTLResourceOptions/MTLResourceStorageModeShared`` for CPU access via this method.
-/// Strides must be monotonically non-decreasing: for any `i > 0`, `strides[i] >= strides[i-1] * dimensions[i-1]`.
+/// Create the tensor with ``MTLResourceOptions/MTLResourceStorageModeShared``
+/// for CPU access via this method.
 ///
-/// The first dimension of `sliceOrigin` and `sliceDimensions` must be
+/// Strides need to be monotonically non-decreasing: for any `i > 0`,
+/// `strides[i] >= strides[i-1] * dimensions[i-1]`.
+///
+/// The first dimension of `sliceOrigin` and `sliceDimensions` needs to be
 /// byte aligned.
 ///
 /// - Parameters:
@@ -494,17 +500,18 @@
  sliceDimensions:(MTLTensorExtents *)sliceDimensions
            plane:(MTLTensorPlaneType)plane API_AVAILABLE(macos(27.0), ios(27.0));
 
-/// Replaces a slice of a plane of this tensor with data from a pointer you
-/// provide.
+/// Replaces a slice of a plane of this tensor with data from a pointer you provide.
 ///
-/// When writing to auxiliary planes, specify `sliceOrigin` and
-/// `sliceDimensions` in plane coordinates by applying the auxiliary plane's
-/// block factors.
+/// When writing to auxiliary planes, specify `sliceOrigin` and `sliceDimensions`
+/// in plane coordinates by applying the auxiliary plane's block factors.
 ///
-/// Create the tensor with ``MTLResourceOptions/MTLResourceStorageModeShared`` for CPU access via this method.
-/// Strides must be monotonically non-decreasing: for any `i > 0`, `strides[i] >= strides[i-1] * dimensions[i-1]`.
+/// Create the tensor with ``MTLResourceOptions/MTLResourceStorageModeShared``
+/// for CPU access via this method.
 ///
-/// The first dimension of `sliceOrigin` and `sliceDimensions` must be
+/// Strides need to be monotonically non-decreasing: for any `i > 0`,
+/// `strides[i] >= strides[i-1] * dimensions[i-1]`.
+///
+/// The first dimension of `sliceOrigin` and `sliceDimensions` needs to be
 /// byte aligned.
 ///
 /// - Parameters:

Clone this wiki locally