From 633adad32534c53220122a8c8b20fc585cfb2058 Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 1 Dec 2023 09:47:53 -0800 Subject: [PATCH 1/3] Fix for: Dynamo is not supported on Python 3.12+ error --- test/smoke_test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/smoke_test.py b/test/smoke_test.py index 529ed774143..5bb2598046a 100644 --- a/test/smoke_test.py +++ b/test/smoke_test.py @@ -13,7 +13,7 @@ def smoke_test_torchvision() -> None: print( - "Is torchvision usable?", + "Is torchvision usable?",ƒ all(x is not None for x in [torch.ops.image.decode_png, torch.ops.torchvision.roi_align]), ) @@ -90,7 +90,9 @@ def main() -> None: if torch.cuda.is_available(): smoke_test_torchvision_decode_jpeg("cuda") smoke_test_torchvision_resnet50_classify("cuda") - smoke_test_compile() + + if sys.version_info < (3, 12, 0): + smoke_test_compile() if torch.backends.mps.is_available(): smoke_test_torchvision_resnet50_classify("mps") From 7ef6aaa1170dcdc8d3c854af72303c0e7e41530e Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 1 Dec 2023 09:49:01 -0800 Subject: [PATCH 2/3] remove_typo --- test/smoke_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/smoke_test.py b/test/smoke_test.py index 5bb2598046a..e1cbfa1e66c 100644 --- a/test/smoke_test.py +++ b/test/smoke_test.py @@ -13,7 +13,7 @@ def smoke_test_torchvision() -> None: print( - "Is torchvision usable?",ƒ + "Is torchvision usable?", all(x is not None for x in [torch.ops.image.decode_png, torch.ops.torchvision.roi_align]), ) From 5f31b1dae74ec462b5113b7bd0980339fa87c1b3 Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 1 Dec 2023 10:17:56 -0800 Subject: [PATCH 3/3] add_todo --- test/smoke_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/smoke_test.py b/test/smoke_test.py index e1cbfa1e66c..b7a0f076da0 100644 --- a/test/smoke_test.py +++ b/test/smoke_test.py @@ -91,6 +91,7 @@ def main() -> None: smoke_test_torchvision_decode_jpeg("cuda") smoke_test_torchvision_resnet50_classify("cuda") + # TODO: remove once pytorch/pytorch#110436 is resolved if sys.version_info < (3, 12, 0): smoke_test_compile()