Skip to content

Instantly share code, notes, and snippets.

@vs-mobiletools-engineering-service2
Created September 12, 2024 15:58
Show Gist options
  • Save vs-mobiletools-engineering-service2/d45177c822a15a3c09b28ad287ec2c53 to your computer and use it in GitHub Desktop.
Save vs-mobiletools-engineering-service2/d45177c822a15a3c09b28ad287ec2c53 to your computer and use it in GitHub Desktop.
previous-api-comparison/diff/dotnet/Microsoft.macOS.Ref/ref/net8.0/Microsoft.macOS.md

API diff: Microsoft.macOS.dll

Microsoft.macOS.dll

Namespace MetalPerformanceShaders

Type Changed: MetalPerformanceShaders.MPSDataType

Added values:

Int4 = 536870916,
UInt4 = 4,

Type Changed: MetalPerformanceShaders.MPSNDArray

Added constructor:

public MPSNDArray (Metal.IMTLBuffer buffer, UIntPtr offset, MPSNDArrayDescriptor descriptor);

Added property:

public virtual Metal.IMTLBuffer UserBuffer { get; }

Added methods:

public virtual MPSNDArray Create (MPSNDArrayDescriptor descriptor);
public virtual MPSNDArray Create (IntPtr[] shape, IntPtr[] strides);
public MPSNDArray Create (UIntPtr numberOfDimensions, UIntPtr[] dimensionSizes, UIntPtr[] dimStrides);

Type Changed: MetalPerformanceShaders.MPSNDArrayDescriptor

Added property:

public virtual bool PreferPackedRows { get; set; }

Added methods:

public virtual UIntPtr[] GetShape ();
public void PermuteWithDimensionOrder (UIntPtr[] dimensionOrder);

New Type: MetalPerformanceShaders.MPSNDArrayAffineInt4Dequantize

public class MPSNDArrayAffineInt4Dequantize : MetalPerformanceShaders.MPSNDArrayMultiaryKernel {
	// constructors
	public MPSNDArrayAffineInt4Dequantize (Foundation.NSCoder coder);
	protected MPSNDArrayAffineInt4Dequantize (Foundation.NSObjectFlag t);
	protected MPSNDArrayAffineInt4Dequantize (ObjCRuntime.NativeHandle handle);
	public MPSNDArrayAffineInt4Dequantize (Metal.IMTLDevice device, MPSNDArrayAffineQuantizationDescriptor quantizationDescriptor);
	// properties
	public override ObjCRuntime.NativeHandle ClassHandle { get; }
}

New Type: MetalPerformanceShaders.MPSNDArrayAffineQuantizationDescriptor

public class MPSNDArrayAffineQuantizationDescriptor : MetalPerformanceShaders.MPSNDArrayQuantizationDescriptor {
	// constructors
	public MPSNDArrayAffineQuantizationDescriptor ();
	protected MPSNDArrayAffineQuantizationDescriptor (Foundation.NSObjectFlag t);
	protected MPSNDArrayAffineQuantizationDescriptor (ObjCRuntime.NativeHandle handle);
	public MPSNDArrayAffineQuantizationDescriptor (MPSDataType quantizationDataType, bool hasZeroPoint, bool hasMinValue);
	// properties
	public override ObjCRuntime.NativeHandle ClassHandle { get; }
	public virtual bool HasMinValue { get; set; }
	public virtual bool HasZeroPoint { get; set; }
	public virtual bool ImplicitZeroPoint { get; set; }
}

New Type: MetalPerformanceShaders.MPSNDArrayIdentity

public class MPSNDArrayIdentity : MetalPerformanceShaders.MPSNDArrayUnaryKernel {
	// constructors
	public MPSNDArrayIdentity (Foundation.NSCoder coder);
	protected MPSNDArrayIdentity (Foundation.NSObjectFlag t);
	public MPSNDArrayIdentity (Metal.IMTLDevice device);
	protected MPSNDArrayIdentity (ObjCRuntime.NativeHandle handle);
	// properties
	public override ObjCRuntime.NativeHandle ClassHandle { get; }
	// methods
	public virtual MPSNDArray Reshape (Metal.IMTLCommandBuffer commandBuffer, MPSNDArray sourceArray, int[] shape, MPSNDArray destinationArray);
	public MPSNDArray Reshape (Metal.IMTLCommandBuffer commandBuffer, MPSNDArray sourceArray, UIntPtr[] dimensionSizes, MPSNDArray destinationArray);
	public virtual MPSNDArray Reshape (Metal.IMTLComputeCommandEncoder encoder, Metal.IMTLCommandBuffer commandBuffer, MPSNDArray sourceArray, int[] shape, MPSNDArray destinationArray);
	public MPSNDArray Reshape (Metal.IMTLComputeCommandEncoder encoder, Metal.IMTLCommandBuffer commandBuffer, MPSNDArray sourceArray, UIntPtr[] dimensionSizes, MPSNDArray destinationArray);
}

New Type: MetalPerformanceShaders.MPSNDArrayLutDequantize

public class MPSNDArrayLutDequantize : MetalPerformanceShaders.MPSNDArrayMultiaryKernel {
	// constructors
	public MPSNDArrayLutDequantize (Foundation.NSCoder coder);
	protected MPSNDArrayLutDequantize (Foundation.NSObjectFlag t);
	public MPSNDArrayLutDequantize (Metal.IMTLDevice device);
	protected MPSNDArrayLutDequantize (ObjCRuntime.NativeHandle handle);
	// properties
	public override ObjCRuntime.NativeHandle ClassHandle { get; }
}

New Type: MetalPerformanceShaders.MPSNDArrayLutQuantizationDescriptor

public class MPSNDArrayLutQuantizationDescriptor : MetalPerformanceShaders.MPSNDArrayQuantizationDescriptor {
	// constructors
	protected MPSNDArrayLutQuantizationDescriptor (Foundation.NSObjectFlag t);
	public MPSNDArrayLutQuantizationDescriptor (MPSDataType quantizationDataType);
	protected MPSNDArrayLutQuantizationDescriptor (ObjCRuntime.NativeHandle handle);
	public MPSNDArrayLutQuantizationDescriptor (MPSDataType quantizationDataType, UIntPtr vectorAxis);
	// properties
	public override ObjCRuntime.NativeHandle ClassHandle { get; }
}

New Type: MetalPerformanceShaders.MPSNDArrayMatrixMultiplication

public class MPSNDArrayMatrixMultiplication : MetalPerformanceShaders.MPSNDArrayMultiaryKernel {
	// constructors
	public MPSNDArrayMatrixMultiplication (Foundation.NSCoder coder);
	protected MPSNDArrayMatrixMultiplication (Foundation.NSObjectFlag t);
	protected MPSNDArrayMatrixMultiplication (ObjCRuntime.NativeHandle handle);
	// properties
	public virtual double Alpha { get; set; }
	public virtual double Beta { get; set; }
	public override ObjCRuntime.NativeHandle ClassHandle { get; }
}

New Type: MetalPerformanceShaders.MPSNDArrayMultiaryBase

public class MPSNDArrayMultiaryBase : MetalPerformanceShaders.MPSKernel {
	// constructors
	public MPSNDArrayMultiaryBase (Foundation.NSCoder coder);
	protected MPSNDArrayMultiaryBase (Foundation.NSObjectFlag t);
	protected MPSNDArrayMultiaryBase (ObjCRuntime.NativeHandle handle);
	public MPSNDArrayMultiaryBase (Foundation.NSCoder aDecoder, Metal.IMTLDevice device);
	public MPSNDArrayMultiaryBase (Metal.IMTLDevice device, UIntPtr count);
	// properties
	public override ObjCRuntime.NativeHandle ClassHandle { get; }
	public virtual IMPSNDArrayAllocator DestinationArrayAllocator { get; set; }
	// methods
	public virtual MPSMatrixNeuron Copy (Foundation.NSZone zone, Metal.IMTLDevice device);
	public virtual void EncodeTo (Foundation.NSCoder coder);
	public virtual MPSNDArrayDescriptor GetDestinationArray (MPSNDArray[] sources, MPSState state);
	public virtual MPSNDArraySizes GetDilationRates (UIntPtr sourceIndex);
	public virtual MPSImageEdgeMode GetEdgeMode (UIntPtr sourceIndex);
	public virtual MPSNDArraySizes GetKernelSizes (UIntPtr sourceIndex);
	public virtual MPSNDArrayOffsets GetOffsets (UIntPtr sourceIndex);
	public virtual MPSState GetResultState (MPSNDArray[] sourceArrays, MPSState[] sourceStates, MPSNDArray destinationArray);
	public virtual MPSNDArrayOffsets GetStrides (UIntPtr sourceIndex);
}

New Type: MetalPerformanceShaders.MPSNDArrayMultiaryKernel

public class MPSNDArrayMultiaryKernel : MetalPerformanceShaders.MPSNDArrayMultiaryBase {
	// constructors
	public MPSNDArrayMultiaryKernel (Foundation.NSCoder coder);
	protected MPSNDArrayMultiaryKernel (Foundation.NSObjectFlag t);
	protected MPSNDArrayMultiaryKernel (ObjCRuntime.NativeHandle handle);
	public MPSNDArrayMultiaryKernel (Foundation.NSCoder aDecoder, Metal.IMTLDevice device);
	public MPSNDArrayMultiaryKernel (Metal.IMTLDevice device, UIntPtr count);
	// properties
	public override ObjCRuntime.NativeHandle ClassHandle { get; }
	// methods
	public virtual MPSNDArray EncodeToCommandBuffer (Metal.IMTLCommandBuffer commandBuffer, MPSNDArray[] sourceArrays);
	public virtual MPSNDArray EncodeToCommandBuffer (Metal.IMTLCommandBuffer commandBuffer, MPSNDArray[] sourceArrays, MPSNDArray destinationArray);
	public virtual MPSNDArray EncodeToCommandBuffer (Metal.IMTLCommandBuffer commandBuffer, MPSNDArray[] sourceArrays, MPSState gradientState, MPSNDArray destinationArray);
	public virtual MPSNDArray EncodeToCommandBuffer (Metal.IMTLCommandBuffer commandBuffer, MPSNDArray[] sourceArrays, out MPSState gradientState, bool outputStateIsTemporary);
	public virtual MPSNDArray EncodeToCommandEncoder (Metal.IMTLComputeCommandEncoder encoder, Metal.IMTLCommandBuffer commandBuffer, MPSNDArray[] sourceArrays, MPSNDArray destinationArray);
}

New Type: MetalPerformanceShaders.MPSNDArrayOffsets

public struct MPSNDArrayOffsets {
	// properties
	public IntPtr[] Dimensions { get; set; }
}

New Type: MetalPerformanceShaders.MPSNDArrayQuantizationDescriptor

public class MPSNDArrayQuantizationDescriptor : Foundation.NSObject, Foundation.INSCopying, ObjCRuntime.INativeObject, System.IDisposable {
	// constructors
	protected MPSNDArrayQuantizationDescriptor ();
	protected MPSNDArrayQuantizationDescriptor (Foundation.NSObjectFlag t);
	protected MPSNDArrayQuantizationDescriptor (ObjCRuntime.NativeHandle handle);
	// properties
	public override ObjCRuntime.NativeHandle ClassHandle { get; }
	public virtual MPSDataType QuantizationDataType { get; }
	public virtual MPSNDArrayQuantizationScheme QuantizationScheme { get; }
	// methods
	public virtual Foundation.NSObject Copy (Foundation.NSZone zone);
}

New Type: MetalPerformanceShaders.MPSNDArrayQuantizationScheme

[Serializable]
public enum MPSNDArrayQuantizationScheme {
	Affine = 1,
	Lut = 2,
	None = 0,
}

New Type: MetalPerformanceShaders.MPSNDArrayQuantizedMatrixMultiplication

public class MPSNDArrayQuantizedMatrixMultiplication : MetalPerformanceShaders.MPSNDArrayMatrixMultiplication {
	// constructors
	public MPSNDArrayQuantizedMatrixMultiplication (Foundation.NSCoder coder);
	protected MPSNDArrayQuantizedMatrixMultiplication (Foundation.NSObjectFlag t);
	protected MPSNDArrayQuantizedMatrixMultiplication (ObjCRuntime.NativeHandle handle);
	public MPSNDArrayQuantizedMatrixMultiplication (Metal.IMTLDevice device, MPSNDArrayQuantizationDescriptor leftQuantizationDescriptor, MPSNDArrayQuantizationDescriptor rightQuantizationDescriptor);
	// properties
	public override ObjCRuntime.NativeHandle ClassHandle { get; }
}

New Type: MetalPerformanceShaders.MPSNDArraySizes

public struct MPSNDArraySizes {
	// properties
	public UIntPtr[] Dimensions { get; set; }
}

New Type: MetalPerformanceShaders.MPSNDArrayUnaryKernel

public class MPSNDArrayUnaryKernel : MetalPerformanceShaders.MPSNDArrayMultiaryKernel {
	// constructors
	public MPSNDArrayUnaryKernel (Foundation.NSCoder coder);
	protected MPSNDArrayUnaryKernel (Foundation.NSObjectFlag t);
	public MPSNDArrayUnaryKernel (Metal.IMTLDevice device);
	protected MPSNDArrayUnaryKernel (ObjCRuntime.NativeHandle handle);
	// properties
	public override ObjCRuntime.NativeHandle ClassHandle { get; }
	public virtual MPSNDArraySizes DilationRates { get; }
	public virtual MPSImageEdgeMode EdgeMode { get; }
	public virtual MPSNDArraySizes KernelSizes { get; }
	public virtual MPSNDArrayOffsets Offsets { get; }
	public virtual MPSNDArrayOffsets Strides { get; }
	// methods
	public virtual MPSNDArray EncodeToCommandBuffer (Metal.IMTLCommandBuffer commandBuffer, MPSNDArray sourceArray);
	public virtual MPSNDArray EncodeToCommandBuffer (Metal.IMTLCommandBuffer commandBuffer, MPSNDArray sourceArray, MPSNDArray destinationArray);
	public virtual MPSNDArray EncodeToCommandBuffer (Metal.IMTLCommandBuffer commandBuffer, MPSNDArray sourceArray, MPSState gradientState, MPSNDArray destinationArray);
	public virtual MPSNDArray EncodeToCommandBuffer (Metal.IMTLCommandBuffer commandBuffer, MPSNDArray sourceArray, out MPSState gradientState, bool outputStateIsTemporary);
}

New Type: MetalPerformanceShaders.MPSNDArrayVectorLutDequantize

public class MPSNDArrayVectorLutDequantize : MetalPerformanceShaders.MPSNDArrayMultiaryKernel {
	// constructors
	public MPSNDArrayVectorLutDequantize (Foundation.NSCoder coder);
	protected MPSNDArrayVectorLutDequantize (Foundation.NSObjectFlag t);
	protected MPSNDArrayVectorLutDequantize (ObjCRuntime.NativeHandle handle);
	public MPSNDArrayVectorLutDequantize (Metal.IMTLDevice device, UIntPtr axis);
	// properties
	public override ObjCRuntime.NativeHandle ClassHandle { get; }
	public virtual UIntPtr VectorAxis { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment