diff --git a/src/MetalPerformanceShaders/MPSEnums.cs b/src/MetalPerformanceShaders/MPSEnums.cs index bd9abd6ff762..294ed69119a8 100644 --- a/src/MetalPerformanceShaders/MPSEnums.cs +++ b/src/MetalPerformanceShaders/MPSEnums.cs @@ -75,6 +75,8 @@ public enum MPSDataType : uint { // uint32_t ComplexFloat32 = FloatBit | ComplexBit | 64, [iOS (16, 2), MacCatalyst (16, 2), TV (16, 2)] ComplexFloat16 = FloatBit | ComplexBit | 32, + [iOS (26, 4), MacCatalyst (26, 4), TV (26, 4)] + ComplexBFloat16 = AlternateEncodingBit | FloatBit | ComplexBit | 32, /// To be added. SignedBit = 0x20000000, diff --git a/src/metalperformanceshadersgraph.cs b/src/metalperformanceshadersgraph.cs index fea8823fc4aa..baa504eebcb3 100644 --- a/src/metalperformanceshadersgraph.cs +++ b/src/metalperformanceshadersgraph.cs @@ -441,6 +441,11 @@ interface MPSGraph_MPSGraphArithmeticOps { [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("complexTensorWithRealTensor:imaginaryTensor:name:")] MPSGraphTensor ComplexTensor (MPSGraphTensor realTensor, MPSGraphTensor imaginaryTensor, [NullAllowed] string name); + + /// Creates a planar tensor from a complex tensor, extracting the real and imaginary parts into a planar format. + [TV (26, 3), Mac (26, 3), iOS (26, 3), MacCatalyst (26, 3)] + [Export ("planarTensorWithComplexTensor:name:")] + MPSGraphTensor PlanarTensor (MPSGraphTensor tensor, [NullAllowed] string name); } // @interface MPSGraphConvolution2DOpDescriptor : NSObject @@ -2024,6 +2029,11 @@ interface MPSGraphCompilationDescriptor : NSCopying { [iOS (26, 0), TV (26, 0), MacCatalyst (26, 0), Mac (26, 0)] [Export ("reducedPrecisionFastMath")] MPSGraphReducedPrecisionFastMath ReducedPrecisionFastMath { get; set; } + + /// Converts the graph layout to NHWC (batch, height, width, channels) format. + [iOS (26, 4), TV (26, 4), MacCatalyst (26, 4), Mac (26, 4)] + [Export ("convertLayoutToNHWC")] + void ConvertLayoutToNhwc (); } // @interface MPSGraphDevice : NSObject @@ -2950,6 +2960,8 @@ interface MPSGraph_MPSGraphScatterAlongAxisOps { enum MPSGraphReducedPrecisionFastMath : ulong { None = 0, AllowFP16Conv2DWinogradTransformIntermediate = 1 << 1, + /// Allows converting operands from FP32 to FP19 format for reduced precision fast math operations. + AllowConvertingOperandsFromFP32ToFP19 = 1 << 2, AllowFP16Intermediates = AllowFP16Conv2DWinogradTransformIntermediate, Default = None, } diff --git a/tests/cecil-tests/Documentation.KnownFailures.txt b/tests/cecil-tests/Documentation.KnownFailures.txt index dcd92d75a6b0..00f26d5373d5 100644 --- a/tests/cecil-tests/Documentation.KnownFailures.txt +++ b/tests/cecil-tests/Documentation.KnownFailures.txt @@ -5217,6 +5217,7 @@ F:MetalPerformanceShaders.MPSCustomKernelIndex.UserDataIndex F:MetalPerformanceShaders.MPSDataType.AlternateEncodingBit F:MetalPerformanceShaders.MPSDataType.BFloat16 F:MetalPerformanceShaders.MPSDataType.Bool +F:MetalPerformanceShaders.MPSDataType.ComplexBFloat16 F:MetalPerformanceShaders.MPSDataType.ComplexBit F:MetalPerformanceShaders.MPSDataType.ComplexFloat16 F:MetalPerformanceShaders.MPSDataType.ComplexFloat32 @@ -10101,9 +10102,9 @@ M:CarPlay.CPMapTemplateDelegate_Extensions.DidReceiveRequestForDestination(CarPl M:CarPlay.CPMapTemplateDelegate_Extensions.DidReceiveUpdatedRouteSource(CarPlay.ICPMapTemplateDelegate,CarPlay.CPMapTemplate,CarPlay.CPRouteSource) M:CarPlay.CPMapTemplateDelegate_Extensions.DidRequestToInsertWaypoint(CarPlay.ICPMapTemplateDelegate,CarPlay.CPMapTemplate,CarPlay.CPNavigationWaypoint,CarPlay.CPRouteSegment,CarPlay.CPMapTemplateDidRequestToInsertWaypointHandler) M:CarPlay.CPMapTemplateDelegate_Extensions.DidShareDestination(CarPlay.ICPMapTemplateDelegate,CarPlay.CPMapTemplate,CarPlay.CPTrip) +M:CarPlay.CPMapTemplateDelegate_Extensions.MapTemplateWaypoint(CarPlay.ICPMapTemplateDelegate,CarPlay.CPMapTemplate,CarPlay.CPNavigationWaypoint,System.Boolean,CarPlay.CPRouteSegment) M:CarPlay.CPMapTemplateDelegate_Extensions.ShouldProvideNavigationMetadata(CarPlay.ICPMapTemplateDelegate,CarPlay.CPMapTemplate) M:CarPlay.CPMapTemplateDelegate_Extensions.ShouldProvideRouteSharing(CarPlay.ICPMapTemplateDelegate,CarPlay.CPMapTemplate) -M:CarPlay.CPMapTemplateDelegate_Extensions.MapTemplateWaypoint(CarPlay.ICPMapTemplateDelegate,CarPlay.CPMapTemplate,CarPlay.CPNavigationWaypoint,System.Boolean,CarPlay.CPRouteSegment) M:CarPlay.CPMapTemplateDelegate_Extensions.WillShareDestination(CarPlay.ICPMapTemplateDelegate,CarPlay.CPMapTemplate,CarPlay.CPTrip) M:CarPlay.CPMessageListItem.#ctor(System.String,System.String,CarPlay.CPMessageListItemLeadingConfiguration,CarPlay.CPMessageListItemTrailingConfiguration,System.String,System.String,CarPlay.CPMessageListItemType) M:CarPlay.CPMessageListItem.#ctor(System.String,System.String,CarPlay.CPMessageListItemLeadingConfiguration,CarPlay.CPMessageListItemTrailingConfiguration,System.String,System.String) @@ -10189,9 +10190,9 @@ M:CarPlay.ICPMapTemplateDelegate.DidReceiveRequestForDestination(CarPlay.CPMapTe M:CarPlay.ICPMapTemplateDelegate.DidReceiveUpdatedRouteSource(CarPlay.CPMapTemplate,CarPlay.CPRouteSource) M:CarPlay.ICPMapTemplateDelegate.DidRequestToInsertWaypoint(CarPlay.CPMapTemplate,CarPlay.CPNavigationWaypoint,CarPlay.CPRouteSegment,CarPlay.CPMapTemplateDidRequestToInsertWaypointHandler) M:CarPlay.ICPMapTemplateDelegate.DidShareDestination(CarPlay.CPMapTemplate,CarPlay.CPTrip) +M:CarPlay.ICPMapTemplateDelegate.MapTemplateWaypoint(CarPlay.CPMapTemplate,CarPlay.CPNavigationWaypoint,System.Boolean,CarPlay.CPRouteSegment) M:CarPlay.ICPMapTemplateDelegate.ShouldProvideNavigationMetadata(CarPlay.CPMapTemplate) M:CarPlay.ICPMapTemplateDelegate.ShouldProvideRouteSharing(CarPlay.CPMapTemplate) -M:CarPlay.ICPMapTemplateDelegate.MapTemplateWaypoint(CarPlay.CPMapTemplate,CarPlay.CPNavigationWaypoint,System.Boolean,CarPlay.CPRouteSegment) M:CarPlay.ICPMapTemplateDelegate.WillShareDestination(CarPlay.CPMapTemplate,CarPlay.CPTrip) M:CarPlay.ICPNowPlayingTemplateObserver.AlbumArtistButtonTapped(CarPlay.CPNowPlayingTemplate) M:CarPlay.ICPNowPlayingTemplateObserver.UpNextButtonTapped(CarPlay.CPNowPlayingTemplate) diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-MetalPerformanceShaders.todo b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-MetalPerformanceShaders.todo deleted file mode 100644 index c9deac74d56c..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-MetalPerformanceShaders.todo +++ /dev/null @@ -1 +0,0 @@ -!missing-enum-value! MPSDataType native value MPSDataTypeComplexBFloat16 = 2432696352 not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-MetalPerformanceShadersGraph.todo b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-MetalPerformanceShadersGraph.todo deleted file mode 100644 index c0272ebf6253..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-MetalPerformanceShadersGraph.todo +++ /dev/null @@ -1,3 +0,0 @@ -!missing-enum-value! MPSGraphReducedPrecisionFastMath native value MPSGraphReducedPrecisionFastMathAllowConvertingOperandsFromFP32ToFP19 = 4 not bound -!missing-selector! MPSGraph::planarTensorWithComplexTensor:name: not bound -!missing-selector! MPSGraphCompilationDescriptor::convertLayoutToNHWC not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-MetalPerformanceShaders.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-MetalPerformanceShaders.todo deleted file mode 100644 index c9deac74d56c..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-MetalPerformanceShaders.todo +++ /dev/null @@ -1 +0,0 @@ -!missing-enum-value! MPSDataType native value MPSDataTypeComplexBFloat16 = 2432696352 not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-MetalPerformanceShadersGraph.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-MetalPerformanceShadersGraph.todo deleted file mode 100644 index c0272ebf6253..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-MetalPerformanceShadersGraph.todo +++ /dev/null @@ -1,3 +0,0 @@ -!missing-enum-value! MPSGraphReducedPrecisionFastMath native value MPSGraphReducedPrecisionFastMathAllowConvertingOperandsFromFP32ToFP19 = 4 not bound -!missing-selector! MPSGraph::planarTensorWithComplexTensor:name: not bound -!missing-selector! MPSGraphCompilationDescriptor::convertLayoutToNHWC not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-MetalPerformanceShaders.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-MetalPerformanceShaders.todo deleted file mode 100644 index c9deac74d56c..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-MetalPerformanceShaders.todo +++ /dev/null @@ -1 +0,0 @@ -!missing-enum-value! MPSDataType native value MPSDataTypeComplexBFloat16 = 2432696352 not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-MetalPerformanceShadersGraph.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-MetalPerformanceShadersGraph.todo deleted file mode 100644 index c0272ebf6253..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-MetalPerformanceShadersGraph.todo +++ /dev/null @@ -1,3 +0,0 @@ -!missing-enum-value! MPSGraphReducedPrecisionFastMath native value MPSGraphReducedPrecisionFastMathAllowConvertingOperandsFromFP32ToFP19 = 4 not bound -!missing-selector! MPSGraph::planarTensorWithComplexTensor:name: not bound -!missing-selector! MPSGraphCompilationDescriptor::convertLayoutToNHWC not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-MetalPerformanceShaders.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-MetalPerformanceShaders.todo deleted file mode 100644 index c9deac74d56c..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-MetalPerformanceShaders.todo +++ /dev/null @@ -1 +0,0 @@ -!missing-enum-value! MPSDataType native value MPSDataTypeComplexBFloat16 = 2432696352 not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-MetalPerformanceShadersGraph.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-MetalPerformanceShadersGraph.todo deleted file mode 100644 index c0272ebf6253..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-MetalPerformanceShadersGraph.todo +++ /dev/null @@ -1,3 +0,0 @@ -!missing-enum-value! MPSGraphReducedPrecisionFastMath native value MPSGraphReducedPrecisionFastMathAllowConvertingOperandsFromFP32ToFP19 = 4 not bound -!missing-selector! MPSGraph::planarTensorWithComplexTensor:name: not bound -!missing-selector! MPSGraphCompilationDescriptor::convertLayoutToNHWC not bound