pytorch
8275e5d2 - [cpp_extension.py] fix bogus `_check_cuda_version` (#97602)

Commit
2 years ago
[cpp_extension.py] fix bogus `_check_cuda_version` (#97602) Currently if `setuptools<49.4.0` and there is a minor version mismatch `_check_cuda_version` fails with a misleading non-actionable error: ``` 2023-03-24T20:21:35.0625644Z RuntimeError: 2023-03-24T20:21:35.0628441Z The detected CUDA version (11.2) mismatches the version that was used to compile 2023-03-24T20:21:35.0630681Z PyTorch (11.3). Please make sure to use the same CUDA versions. ``` This condition shouldn't be failing since minor version match isn't required. It fails because the other condition to have a certain version of `setuptools` isn't met. But that condition is written in a comment (!!!). So this PR changes it to actually tell the user how to fix the problem. While at it, I adjusted the version number as a lower `setuptools>=49.4.0` is sufficient for this to work. Thanks. p.s. this problem manifests on `nvidia/cuda:11.2.2-cudnn8-devel-ubuntu20.04` docker image. Pull Request resolved: https://github.com/pytorch/pytorch/pull/97602 Approved by: https://github.com/ezyang
Author
Committer
Parents
Loading