From bb9d98356c8270a9d5edb2ea5b55c366aa949c4c Mon Sep 17 00:00:00 2001 From: Nikita Shulga Date: Tue, 7 Nov 2023 14:51:11 +0000 Subject: [PATCH] Add libtorch-arm64 to the matrix --- tools/scripts/generate_binary_build_matrix.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/scripts/generate_binary_build_matrix.py b/tools/scripts/generate_binary_build_matrix.py index a85ca54c77..9c06c32698 100644 --- a/tools/scripts/generate_binary_build_matrix.py +++ b/tools/scripts/generate_binary_build_matrix.py @@ -235,8 +235,9 @@ def get_libtorch_install_command( else f"{prefix}-{_libtorch_variant}-latest.zip" ) - if os == MACOS: - build_name = "libtorch-macos-latest.zip" + if os in [MACOS, MACOS_ARM64]: + arch = "x86_64" if os == MACOS else "arm64" + build_name = f"libtorch-macos-{arch}-latest.zip" if channel == RELEASE: build_name = f"libtorch-macos-{mod.CURRENT_VERSION}.zip" elif os == LINUX and (channel == RELEASE or channel == TEST): @@ -357,7 +358,7 @@ def generate_libtorch_matrix( ret: List[Dict[str, str]] = [] # macos-arm64 does not have any libtorch builds - if os == MACOS_ARM64: + if os == MACOS_ARM64 and channel != "nightly": return ret if arches is None: