Skip to content

Commit

Permalink
first try
Browse files Browse the repository at this point in the history
  • Loading branch information
weiwangmeta committed Sep 22, 2022
1 parent 770311c commit ce4a2e3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/smoke_test/smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ def smoke_test_cuda() -> None:
print(f"torch cuda: {torch.version.cuda}")
# todo add cudnn version validation
print(f"torch cudnn: {torch.backends.cudnn.version()}")
# check torchvision's cuda version against system cuda version
if(torch.ops.torchvision.__cuda__version() != gpu_arch_ver):
raise RuntimeError(f"Wrong CUDA version. Loaded: {torch.version.cuda} Expected: {gpu_arch_ver}")
# check torchaudio's cuda version against system cuda version
if 'cu'+str(gpu_arch_ver).replace(".", "") not in torchaudio.__version__.split("+")
raise RuntimeError(f"Wrong CUDA version. Loaded: {torchaudio.__version__} Expected: {gpu_arch_ver}



def smoke_test_conv2d() -> None:
import torch.nn as nn
Expand Down

0 comments on commit ce4a2e3

Please sign in to comment.