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

33 lines
1.5 KiB
Diff

diff -Naur ./aten/src/ATen/native/mps/MPSGraphVenturaOps.h ./aten/src/ATen/native/mps/MPSGraphVenturaOps.h
--- ./aten/src/ATen/native/mps/MPSGraphVenturaOps.h 2024-06-05 07:51:01
+++ ./aten/src/ATen/native/mps/MPSGraphVenturaOps.h 2024-06-06 11:04:33
@@ -38,15 +38,19 @@
#if !defined(__MAC_13_0) && \
(!defined(MAC_OS_X_VERSION_13_0) || (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_13_0))
-typedef NS_ENUM(NSUInteger, MPSGraphResizeNearestRoundingMode)
-{
- MPSGraphResizeNearestRoundingModeRoundPreferCeil = 0L,
- MPSGraphResizeNearestRoundingModeRoundPreferFloor = 1L,
- MPSGraphResizeNearestRoundingModeCeil = 2L,
- MPSGraphResizeNearestRoundingModeFloor = 3L,
- MPSGraphResizeNearestRoundingModeRoundToEven = 4L,
- MPSGraphResizeNearestRoundingModeRoundToOdd = 5L,
-};
+// fix on macOS 12, Xcode 14:
+// error: redefinition of 'MPSGraphResizeNearestRoundingMode'
+/*
+ * typedef NS_ENUM(NSUInteger, MPSGraphResizeNearestRoundingMode)
+ * {
+ * MPSGraphResizeNearestRoundingModeRoundPreferCeil = 0L,
+ * MPSGraphResizeNearestRoundingModeRoundPreferFloor = 1L,
+ * MPSGraphResizeNearestRoundingModeCeil = 2L,
+ * MPSGraphResizeNearestRoundingModeFloor = 3L,
+ * MPSGraphResizeNearestRoundingModeRoundToEven = 4L,
+ * MPSGraphResizeNearestRoundingModeRoundToOdd = 5L,
+ * };
+ */
// Define complex enums for MacOS 12
#define MPSDataTypeComplexBit 0x01000000