From 8a8969a04c6f33c4d9326828647956a7659927b7 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Thu, 24 Oct 2024 03:23:44 -0400 Subject: [PATCH] only apply linux_x86_64 Signed-off-by: Jinzhe Zeng --- backend/find_pytorch.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/find_pytorch.py b/backend/find_pytorch.py index ff645de458..6ca4ddb0ab 100644 --- a/backend/find_pytorch.py +++ b/backend/find_pytorch.py @@ -1,6 +1,7 @@ # SPDX-License-Identifier: LGPL-3.0-or-later import importlib import os +import platform import site from functools import ( lru_cache, @@ -107,7 +108,11 @@ def get_pt_requirement(pt_version: str = "") -> dict: """ if pt_version is None: return {"torch": []} - if os.environ.get("CIBUILDWHEEL", "0") == "1": + if ( + os.environ.get("CIBUILDWHEEL", "0") == "1" + and platform.system() == "Linux" + and platform.machine() == "x86_64" + ): cuda_version = os.environ.get("CUDA_VERSION", "12.2") if cuda_version == "" or cuda_version in SpecifierSet(">=12,<13"): # CUDA 12.2, cudnn 9