Another attempt to fix version comparison check (#69939)

Summary:
Fixes #{issue number}

Pull Request resolved: https://github.com/pytorch/pytorch/pull/69939

Reviewed By: atalman

Differential Revision: D33108135

Pulled By: malfet

fbshipit-source-id: cadadfe5b04c4378f149136f8e1f8e8d6266775c
This commit is contained in:
Nikita Shulga 2021-12-14 14:45:47 -08:00 committed by Facebook GitHub Bot
parent d4f8313497
commit 24ee1d13f6

View file

@ -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")