Revert "[MPS] Add support for `MPSDataTypeComplexFloat[16|32]` (#115513)"
This reverts commit a4bb4a237348ff8d688e43ba542ee59a9d7ed4a6.
Reverted https://github.com/pytorch/pytorch/pull/115513 on behalf of https://github.com/malfet due to Broke Mac x86 periodic builds ([comment](https://github.com/pytorch/pytorch/pull/115513#issuecomment-1851398773))
diff --git a/aten/src/ATen/native/mps/OperationUtils.mm b/aten/src/ATen/native/mps/OperationUtils.mm
index d5d5d93..7972cc3 100644
--- a/aten/src/ATen/native/mps/OperationUtils.mm
+++ b/aten/src/ATen/native/mps/OperationUtils.mm
@@ -68,14 +68,6 @@
TORCH_CHECK_TYPE(false,
"Cannot convert a float64 Tensor to MPS as the MPS framework doesn't support float64. "
"Please use float32 instead.")
- case ScalarType::ComplexHalf:
- TORCH_CHECK_TYPE(is_macos_13_or_newer(MacOSVersion::MACOS_VER_14_0_PLUS),
- "MPS complex types are only supported on MacOS 14.0 or newer.");
- return MPSDataTypeComplexFloat16;
- case ScalarType::ComplexFloat:
- TORCH_CHECK_TYPE(is_macos_13_or_newer(MacOSVersion::MACOS_VER_14_0_PLUS),
- "MPS complex types are only supported on MacOS 14.0 or newer.");
- return MPSDataTypeComplexFloat32;
default:
TORCH_CHECK_TYPE(
false, "Trying to convert ", scalar_type, " to the MPS backend but it does not have support for that dtype.")
@@ -142,14 +134,6 @@
return MPSDataTypeUInt8;
case ScalarType::Bool:
return MPSDataTypeBool;
- case ScalarType::ComplexHalf:
- TORCH_CHECK_TYPE(is_macos_13_or_newer(MacOSVersion::MACOS_VER_14_0_PLUS),
- "MPS complex types are only supported on MacOS 14.0 or newer.");
- return MPSDataTypeComplexFloat16;
- case ScalarType::ComplexFloat:
- TORCH_CHECK_TYPE(is_macos_13_or_newer(MacOSVersion::MACOS_VER_14_0_PLUS),
- "MPS complex types are only supported on MacOS 14.0 or newer.");
- return MPSDataTypeComplexFloat32;
default:
TORCH_CHECK_TYPE(
false, "Trying to convert ", scalar_type, " to the MPS backend but it does not have support for that dtype.")
@@ -176,10 +160,6 @@
return short_name ? "u8" : "UInt8";
case ScalarType::Bool:
return short_name ? "b8" : "Bool";
- case ScalarType::ComplexHalf:
- return short_name ? "c16" : "ComplexFloat16";
- case ScalarType::ComplexFloat:
- return short_name ? "c32" : "ComplexFloat32";
default:
return "Undefined";
}