diff --git a/test/run_test.py b/test/run_test.py index 965a55bf94e..eb39fa8ae59 100644 --- a/test/run_test.py +++ b/test/run_test.py @@ -913,7 +913,7 @@ def get_selected_tests(options): # This is exception thats caused by this issue https://github.com/pytorch/pytorch/issues/69460 # This below code should be removed once this issue is solved - if LooseVersion(torch.version.cuda) >= LooseVersion("11.5"): + if torch.version.cuda is not None and LooseVersion(torch.version.cuda) >= "11.5": WINDOWS_BLOCKLIST.append("test_cpp_extensions_aot") WINDOWS_BLOCKLIST.append("test_cpp_extensions_aot_ninja") WINDOWS_BLOCKLIST.append("test_cpp_extensions_aot_no_ninja")