File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ def cuda_runtime_error():
72
72
def smoke_test_cuda (package : str ) -> None :
73
73
if not torch .cuda .is_available () and is_cuda_system :
74
74
raise RuntimeError (f"Expected CUDA { gpu_arch_ver } . However CUDA is not loaded." )
75
- if torch . cuda . is_available ():
75
+
76
76
if torch .version .cuda != gpu_arch_ver :
77
77
raise RuntimeError (
78
78
f"Wrong CUDA version. Loaded: { torch .version .cuda } Expected: { gpu_arch_ver } "
@@ -81,7 +81,6 @@ def smoke_test_cuda(package: str) -> None:
81
81
# todo add cudnn version validation
82
82
print (f"torch cudnn: { torch .backends .cudnn .version ()} " )
83
83
print (f"cuDNN enabled? { torch .backends .cudnn .enabled } " )
84
- cuda_runtime_error ()
85
84
86
85
if (package == 'all' and is_cuda_system ):
87
86
for module in MODULES :
@@ -152,6 +151,10 @@ def main() -> None:
152
151
if installation_str .find ("nightly" ) != - 1 :
153
152
check_nightly_binaries_date (options .package )
154
153
154
+ # This check has to be run last, since its messing up CUDA runtime
155
+ if torch .cuda .is_available ():
156
+ cuda_runtime_error ()
157
+
155
158
156
159
if __name__ == "__main__" :
157
160
main ()
You can’t perform that action at this time.
0 commit comments