Pytorch 2.0.0a0 wheel needs update to work with torchvision

I have Jetpack 5.1 installed on AGX Orin: R35 (release), REVISION: 2.1 and pytorch 2.0.0a0+8aa34602.nv23.3 from It works fine. Building torchvision from source from GitHub - pytorch/vision: Datasets, Transforms and Models specific to Computer Vision fails due to outdated torch/utils/ file, producing this error:

  File "/home/nick/yolo8/.venv/lib/python3.8/site-packages/torch/utils/", line 1786, in _get_cuda_arch_flags
    raise ValueError(f"Unknown CUDA arch ({arch}) or GPU not supported")
ValueError: Unknown CUDA arch (8.7+PTX) or GPU not supported

Replacing the file with the most current one from pytorch/ at main · pytorch/pytorch · GitHub solves the problem. Could the maintainers build the most current binary of PyTorch 2.0, in order to avoid this problem?

1 Like


Thanks for reporting this to us.

Is the located in PyTorch or TorchVision?
Could you share a way to reproduce the unknown CUA arch error?


Correct file is located at pytorch/ at main · pytorch/pytorch · GitHub. Old (incorrect) file is installed by pytorch wheel.

After installing pytorch, do this:

sudo apt install libpng-dev libjpeg-dev
git clone
cd vision
python3 install

Thanks @pauljurczak, we found what happened is that the PyTorch commit (#13ebff) that fixed this issue didn’t make it into the v2.0.0 branch, which is what we had been basing our v2.0 builds off of. We’ll get this fixed in the upcoming release of the next PyTorch wheel (23.05) - sorry about that. For now, please revert to manually patching it, or use the l4t-pytorch container which has it fixed too.

is this PyTorch wheel(23.05) released? please do send the links to download for the same if release

@gamingjugal21 it’s not been officially released yet, but you can try this rebuilt one here:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.