Files
macports-ports/python/py-pytorch/files/patch-macOS13-xcode14.diff
2024-07-05 10:15:06 -04:00

42 lines
1.5 KiB
Diff

diff -Naur ./aten/src/ATen/native/mps/MPSGraphSonomaOps.h ./aten/src/ATen/native/mps/MPSGraphSonomaOps.h
--- ./aten/src/ATen/native/mps/MPSGraphSonomaOps.h 2024-06-05 07:25:16
+++ ./aten/src/ATen/native/mps/MPSGraphSonomaOps.h 2024-06-06 13:56:47
@@ -5,21 +5,29 @@
#if !defined(__MAC_14_0) && \
(!defined(MAC_OS_X_VERSION_14_0) || (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_14_0))
-typedef NS_ENUM(NSUInteger, MPSGraphFFTScalingMode)
-{
- MPSGraphFFTScalingModeNone = 0L,
- MPSGraphFFTScalingModeSize = 1L,
- MPSGraphFFTScalingModeUnitary = 2L,
-};
+// fix on macOS 13, Xcode 14
+// error: redefinition of 'MPSGraphFFTScalingMode'
+/*
+ * typedef NS_ENUM(NSUInteger, MPSGraphFFTScalingMode)
+ * {
+ * MPSGraphFFTScalingModeNone = 0L,
+ * MPSGraphFFTScalingModeSize = 1L,
+ * MPSGraphFFTScalingModeUnitary = 2L,
+ * };
+ */
@interface FakeMPSGraphFFTDescriptor : NSObject<NSCopying>
@property (readwrite, nonatomic) BOOL inverse;
-@property (readwrite, nonatomic) MPSGraphFFTScalingMode scalingMode;
+/*
+ * @property (readwrite, nonatomic) MPSGraphFFTScalingMode scalingMode;
+ */
@property (readwrite, nonatomic) BOOL roundToOddHermitean;
+(nullable instancetype) descriptor;
@end
-@compatibility_alias MPSGraphFFTDescriptor FakeMPSGraphFFTDescriptor;
+/*
+ * @compatibility_alias MPSGraphFFTDescriptor FakeMPSGraphFFTDescriptor;
+ */
@interface MPSGraph (SonomaOps)
-(MPSGraphTensor * _Nonnull) conjugateWithTensor:(MPSGraphTensor * _Nonnull) tensor