legged_gym
legged_gym copied to clipboard
RuntimeError: nvrtc: error: invalid value for --gpu-architecture (-arch)
legged_gym) leo@leo-pc:~/legged_gym$ python legged_gym/scripts/train.py --task=anymal_c_flat
Importing module 'gym_38' (/home/leo/isaacgym/python/isaacgym/_bindings/linux-x86_64/gym_38.so)
Setting GYM_USD_PLUG_INFO_PATH to /home/leo/isaacgym/python/isaacgym/_bindings/linux-x86_64/usd/plugInfo.json
PyTorch version 1.10.0+cu113
Device count 1
/home/leo/isaacgym/python/isaacgym/_bindings/src/gymtorch
Using /home/leo/.cache/torch_extensions/py38_cu113 as PyTorch extensions root...
Emitting ninja build file /home/leo/.cache/torch_extensions/py38_cu113/gymtorch/build.ninja...
Building extension module gymtorch...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
ninja: no work to do.
Loading extension module gymtorch...
Setting seed: 1
Not connected to PVD
+++ Using GPU PhysX
Physics Engine: PhysX
Physics Device: cuda:0
GPU Pipeline: enabled
/home/leo/miniforge3/envs/legged_gym/lib/python3.8/site-packages/torch/functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:2157.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
Traceback (most recent call last):
File "legged_gym/scripts/train.py", line 47, in
Your gpu may be too new, not supporting cuda 11.3 - this was my issue with a 4060 recently.
Actually newer version of Pytorch and torchvision is working fine for me. I suggest you check your Cuda version with nvidia-smi and install the corresponding version. For me the cuda is 12.1 and I installed the newest pytorch1
python legged_gym/scripts/train.py --task=anymal_c_flat
Thank you, it helps! I didn't know the change the pytorch version given my cuda version, and it works well now.
Your gpu may be too new, not supporting cuda 11.3 - this was my issue with a 4060 recently.
Thank your comments! I found it's about the imcompatibility between the pytorch and cuda.
Solved by: pip3 uninstall torch torchvision torchaudio pip3 install torch torchvision torchaudio -f https://download.pytorch.org/whl/cu123/torch_stable.html #My cuda version is 12.3
cuda 12.0 RTX4090 ubuntu22.04 python3.7.12 torch 1.8 then I uninstalled torch pip uninstall torch torchvision torchaudio and installed torch 1.13 fixed
cuda 12.2 RTX4060 TI ubuntu20.04 python3.8 torch 1.10 then I uninstalled torch pip uninstall torch torchvision torchaudio and installed torch 2.3.0+cu121 fixed
RTX4060 Ti
Ubuntu20.04
Python3.8
At first, I installed cuda11.3 and install torch using pip3 install torch==1.10.0+cu113 torchvision==0.11.1+cu113 torchaudio==0.10.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
(This version I works well on RTX3090)
It failed.
Then, I uninstall cuda 11.3 and install cuda12.1
uninstall torch using pip uninstall torch torchvision torchaudio
install torch using pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
torch.__version__
: 2.3.1+cu121
It works