Skip to content

Commit

Permalink
[BE] Provide default value for target_os (#1875)
Browse files Browse the repository at this point in the history
I want to be able to run `smoke_test.py` locally and test torch.compile on my Mac
  • Loading branch information
malfet committed Jun 18, 2024
1 parent 9edba8b commit 86a811f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/smoke_test/smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
gpu_arch_type = os.getenv("MATRIX_GPU_ARCH_TYPE")
channel = os.getenv("MATRIX_CHANNEL")
package_type = os.getenv("MATRIX_PACKAGE_TYPE")
target_os = os.getenv("TARGET_OS")
target_os = os.getenv("TARGET_OS", sys.platform)
BASE_DIR = Path(__file__).parent.parent.parent

is_cuda_system = gpu_arch_type == "cuda"
Expand Down Expand Up @@ -165,7 +165,7 @@ def smoke_test_cuda(package: str, runtime_error_check: str, torch_compile_check:
# torch.compile is available on macos-arm64 and Linux for python 3.8-3.12
if torch_compile_check == "enabled" and sys.version_info < (3, 13, 0) and (
(target_os == "linux" and torch.cuda.is_available()) or
target_os == "macos-arm64"):
target_os in ["macos-arm64", "darwin"]):
smoke_test_compile()

if torch.cuda.is_available():
Expand Down

0 comments on commit 86a811f

Please sign in to comment.