Skip to content

Commit a14a70a

Browse files
authored
Limit MacOS libtorch to just one flavor (#4707)
As one can not really build pre-CXX11 binaries for MacOS, and to the best of my knowledge static-with-deps binaries were never generated Test plan: ``` $ python3 tools/scripts/generate_binary_build_matrix.py --package-type libtorch --operating-system macos --channel nightly|jq { "include": [ { "gpu_arch_type": "cpu", "gpu_arch_version": "", "desired_cuda": "cpu", "libtorch_variant": "shared-with-deps", "libtorch_config": "", "devtoolset": "cxx11-abi", "container_image": "pytorch/libtorch-cxx11-builder:cpu", "package_type": "libtorch", "build_name": "libtorch-cpu-shared-with-deps-cxx11-abi", "validation_runner": "macos-12", "installation": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-latest.zip", "channel": "nightly", "stable_version": "2.1.0" } ] } ```
1 parent adf904e commit a14a70a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/scripts/generate_binary_build_matrix.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -379,16 +379,16 @@ def generate_libtorch_matrix(
379379
abi_versions = [RELEASE, DEBUG]
380380
elif os == LINUX:
381381
abi_versions = [PRE_CXX11_ABI, CXX11_ABI]
382-
elif os == MACOS:
383-
abi_versions = [PRE_CXX11_ABI, CXX11_ABI]
382+
elif os in [MACOS, MACOS_ARM64]:
383+
abi_versions = [CXX11_ABI]
384384

385385
if libtorch_variants is None:
386386
libtorch_variants = [
387387
"shared-with-deps",
388388
"shared-without-deps",
389389
"static-with-deps",
390390
"static-without-deps",
391-
]
391+
] if os not in [MACOS, MACOS_ARM64] else ["shared-with-deps"]
392392

393393
for abi_version in abi_versions:
394394
for arch_version in arches:

0 commit comments

Comments
 (0)