Skip to content

Commit

Permalink
Move cuda runtime error to end
Browse files Browse the repository at this point in the history
  • Loading branch information
atalman committed Feb 15, 2023
1 parent ba37e4e commit b03e75f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/smoke_test/smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def cuda_runtime_error():
def smoke_test_cuda(package: str) -> None:
if not torch.cuda.is_available() and is_cuda_system:
raise RuntimeError(f"Expected CUDA {gpu_arch_ver}. However CUDA is not loaded.")

if torch.cuda.is_available():
if torch.version.cuda != gpu_arch_ver:
raise RuntimeError(
f"Wrong CUDA version. Loaded: {torch.version.cuda} Expected: {gpu_arch_ver}"
Expand Down

0 comments on commit b03e75f

Please sign in to comment.