You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.
Workaround
Installing torch+cuda with pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 solves the issue.
Possible solutions:
Add some logic to skip these models if CUDA is not installed, like if not torch.cuda.is_available(): return
See if the models can be fixed with something like model.device("cpu")
Remove models from the turnkey corpus that require CUDA
Models that expect CUDA to be installed do not work by default on tkml.
Reproduction
turnkey onnxmodelzoo\toolchain\models\torch_hub\mealv1_resnest50.py
Workaround
Installing torch+cuda with
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
solves the issue.Possible solutions:
if not torch.cuda.is_available(): return
cc @danielholanda @ramkrishna2910 @andyluo7
The text was updated successfully, but these errors were encountered: