Skip to content

Commit f423915

Browse files
committed
Adds missing line
1 parent 59f8d5b commit f423915

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

setup.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ def __init__(self):
9393
default=(self._is_arm64() and self._is_macos()),
9494
)
9595
if self.build_cpu_aarch64:
96-
assert (
97-
self._is_arm64()
98-
), "TORCHAO_BUILD_CPU_AARCH64 requires an arm64 machine"
96+
assert self._is_arm64(), (
97+
"TORCHAO_BUILD_CPU_AARCH64 requires an arm64 machine"
98+
)
9999

100100
# TORCHAO_BUILD_KLEIDIAI is disabled by default for now because
101101
# 1) It increases the build time
@@ -104,9 +104,9 @@ def __init__(self):
104104
"TORCHAO_BUILD_KLEIDIAI", default=False
105105
)
106106
if self.build_kleidi_ai:
107-
assert (
108-
self.build_cpu_aarch64
109-
), "TORCHAO_BUILD_KLEIDIAI requires TORCHAO_BUILD_CPU_AARCH64 be set"
107+
assert self.build_cpu_aarch64, (
108+
"TORCHAO_BUILD_KLEIDIAI requires TORCHAO_BUILD_CPU_AARCH64 be set"
109+
)
110110

111111
# TORCHAO_BUILD_EXPERIMENTAL_MPS is disabled by default.
112112
self.build_experimental_mps = self._os_bool_var(
@@ -115,9 +115,9 @@ def __init__(self):
115115
if self.build_experimental_mps:
116116
assert self._is_macos(), "TORCHAO_BUILD_EXPERIMENTAL_MPS requires MacOS"
117117
assert self._is_arm64(), "TORCHAO_BUILD_EXPERIMENTAL_MPS requires arm64"
118-
assert (
119-
torch.mps.is_available()
120-
), "TORCHAO_BUILD_EXPERIMENTAL_MPS requires MPS be available"
118+
assert torch.mps.is_available(), (
119+
"TORCHAO_BUILD_EXPERIMENTAL_MPS requires MPS be available"
120+
)
121121

122122
# TORCHAO_PARALLEL_BACKEND specifies which parallel backend to use
123123
# Possible values: aten_openmp, executorch, openmp, pthreadpool, single_threaded
@@ -130,19 +130,19 @@ def __init__(self):
130130
default=(self._is_arm64() and self._is_macos()),
131131
)
132132
if self.enable_arm_neon_dot:
133-
assert (
134-
self.build_cpu_aarch64
135-
), "TORCHAO_ENABLE_ARM_NEON_DOT requires TORCHAO_BUILD_CPU_AARCH64 be set"
133+
assert self.build_cpu_aarch64, (
134+
"TORCHAO_ENABLE_ARM_NEON_DOT requires TORCHAO_BUILD_CPU_AARCH64 be set"
135+
)
136136

137137
# TORCHAO_ENABLE_ARM_I8MM enable ARM 8-bit Integer Matrix Multiply instructions
138138
# Not enabled by default on macOS as not all silicon mac supports it
139139
self.enable_arm_i8mm = self._os_bool_var(
140140
"TORCHAO_ENABLE_ARM_I8MM", default=False
141141
)
142142
if self.enable_arm_i8mm:
143-
assert (
144-
self.build_cpu_aarch64
145-
), "TORCHAO_ENABLE_ARM_I8MM requires TORCHAO_BUILD_CPU_AARCH64 be set"
143+
assert self.build_cpu_aarch64, (
144+
"TORCHAO_ENABLE_ARM_I8MM requires TORCHAO_BUILD_CPU_AARCH64 be set"
145+
)
146146

147147
def _is_arm64(self) -> bool:
148148
return platform.machine().startswith("arm64") or platform.machine() == "aarch64"

0 commit comments

Comments
 (0)