pytorch / vision

Datasets, Transforms and Models specific to Computer Vision
https://pytorch.org/vision
BSD 3-Clause "New" or "Revised" License
15.95k stars 6.91k forks source link

For the nvidia jetson package , the pytorch and torchvision version compatibility does not work if you follow the compatibility table #7076

Open sumedhvdatar opened 1 year ago

sumedhvdatar commented 1 year ago

📚 The doc issue

When a user has to install something like detectron2 , the user needs torch, torchvision and cuda tool kit. The version for each must be compatible. The compatibility table works very well for Desktop or Linux based machines with GPU. The compatibility table does not work for arm architectures and this information is not provided anywhere

Suggest a potential alternative/fix

A suggestion is to probably have the table modified for arm based architectures.

pmeier commented 1 year ago

I don't think this is on torchvision, but rather on Nvidia to provide this information. Here is what I would do:

  1. Check the Jetson instructions how to install PyTorch. I found https://docs.nvidia.com/deeplearning/frameworks/install-pytorch-jetson-platform-release-notes/pytorch-jetson-rel.html#pytorch-jetson-rel for that.
  2. Clicking the link for the PyTorch version redirects you to the commit on GH, e.g. https://github.com/pytorch/pytorch/commit/936e930. On there you can find the information that this commit was made on Oct 6, 2022.
  3. Now you need to find the corresponding torchvision commit. In general, there is no per-commit compatibility, but only one per date. Meaning the nightly release of PyTorch on Oct 6, 2022 is compatible with the nightly release of torchvision on the same day. Unfortunately, the commit Nvidia chose, i.e. pytorch/pytorch@936e930, is not one that was used for a nightly release. So there is no corresponding torchvision commit. The best we can do here is to select a commit of the same day and hope that it works. You can do so on GH by appending some date filters to https://github.com/pytorch/vision/commits/main, e.g. https://github.com/pytorch/vision/commits/main?since=2022-10-06&until=2022-10-06. That gives you a list of all commits made to torchvision on that day. Pick one of them, e.g. 7eb5d7fcab73afec976907a855d9e63fa31f5579
  4. As a last step you git checkout 7eb5d7fcab73afec976907a855d9e63fa31f5579 and build from source according to our instructions in the README