From 7b25e899ebe7a266051a530b76e9755e121c5681 Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 14 Sep 2023 08:09:50 -0700 Subject: [PATCH 1/3] Enable torch compile for python 3.11 smoke tests --- test/smoke_test/smoke_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/smoke_test/smoke_test.py b/test/smoke_test/smoke_test.py index 3ae4d9421..1dea1200b 100644 --- a/test/smoke_test/smoke_test.py +++ b/test/smoke_test/smoke_test.py @@ -128,8 +128,8 @@ def smoke_test_cuda(package: str, runtime_error_check: str) -> None: print(f"torch cudnn: {torch.backends.cudnn.version()}") print(f"cuDNN enabled? {torch.backends.cudnn.enabled}") - # torch.compile is available only on Linux and python 3.8-3.10 - if (sys.platform == "linux" or sys.platform == "linux2") and sys.version_info < (3, 11, 0): + # torch.compile is available only on Linux + if (sys.platform == "linux" or sys.platform == "linux2"): smoke_test_compile() if(runtime_error_check == "enabled"): From d25102c4e6e7bede2dd583f9ab22e85402c00a12 Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 14 Sep 2023 08:20:21 -0700 Subject: [PATCH 2/3] Make sure release is covered --- test/smoke_test/smoke_test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/smoke_test/smoke_test.py b/test/smoke_test/smoke_test.py index 1dea1200b..70b21dc89 100644 --- a/test/smoke_test/smoke_test.py +++ b/test/smoke_test/smoke_test.py @@ -128,8 +128,10 @@ def smoke_test_cuda(package: str, runtime_error_check: str) -> None: print(f"torch cudnn: {torch.backends.cudnn.version()}") print(f"cuDNN enabled? {torch.backends.cudnn.enabled}") - # torch.compile is available only on Linux - if (sys.platform == "linux" or sys.platform == "linux2"): + # torch.compile is available only on Linux and python 3.8-3.10 + if (sys.platform == "linux" or sys.platform == "linux2") and sys.version_info < (3, 11, 0) and channel == "release": + smoke_test_compile() + elif (sys.platform == "linux" or sys.platform == "linux2") and channel != "release: smoke_test_compile() if(runtime_error_check == "enabled"): From ad463103ce6cd400e836ece114c8f8e034a3c271 Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 14 Sep 2023 11:45:51 -0700 Subject: [PATCH 3/3] Fix typo --- test/smoke_test/smoke_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/smoke_test/smoke_test.py b/test/smoke_test/smoke_test.py index 70b21dc89..539f1ba1b 100644 --- a/test/smoke_test/smoke_test.py +++ b/test/smoke_test/smoke_test.py @@ -131,7 +131,7 @@ def smoke_test_cuda(package: str, runtime_error_check: str) -> None: # torch.compile is available only on Linux and python 3.8-3.10 if (sys.platform == "linux" or sys.platform == "linux2") and sys.version_info < (3, 11, 0) and channel == "release": smoke_test_compile() - elif (sys.platform == "linux" or sys.platform == "linux2") and channel != "release: + elif (sys.platform == "linux" or sys.platform == "linux2") and channel != "release": smoke_test_compile() if(runtime_error_check == "enabled"):