Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pytorch 2.0, Cuda 11.8 and future 12.0 & 12.1 compatible #4868

Closed
wants to merge 61 commits into from
Closed

Pytorch 2.0, Cuda 11.8 and future 12.0 & 12.1 compatible #4868

wants to merge 61 commits into from

Conversation

johnnynunez
Copy link

I have been able to compile with CUDA 11.8 and CUDA 12.0 & 12.1 using PyTorch 1.13.1, PyTorch dev 2.0 and python 3.10.6(In local)

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 18, 2023
@johnnynunez
Copy link
Author

@ppwwyyxx @wat3rBro @thiagocrepaldi Now, the changes is clearer.

@gianscarpe
Copy link

Up

@LeonidAlekseev
Copy link

up

1 similar comment
@CanKorkut
Copy link

up

@elvizlai
Copy link

PTAL

@wadhah101
Copy link

Why this PR is not merged yet ? The current pytorch has some serious vulnerabilities

@wqh17101
Copy link

Please merge it in.

@johnnynunez
Copy link
Author

Great work!
Are there any known backward incompatibilities (requiring reconfiguration or retraining)?
Are you perhaps also going to address any of the following?

  • INSTALL.md: update table of prebuilt wheels
  • docker/Dockerfile: update versions, maybe drop nvidia/cuda base image (as Pytorch does not use apt packages for CUDA and cuDNN anyway)
  • setup.py treats torch as a setup-time dependency #4472 (i.e. fixing source distribution for platforms not covered by wheels, and adding torch as an overt dependency)

I'm not from Meta so I don't have access from links. But I updated the Install.md. @ppwwyyxx @facebook-github-bot merge it. It generates artifacts from macOS, Linux automatically.

Why do you need docker here? It should be in another PR

do you mean this?
image

@bertsky
Copy link

bertsky commented Jun 16, 2023

Why do you need docker here? It should be in another PR

Yes, maybe off-topic. But if it's not too much work, would be great to update as well (currently trying myself, will perhaps make a differential PR)

do you mean this?

Not quite. Since Pytorch (esp. the CUDA releases) may need a different index, and the dependency_links mechanism of setuptools has been dropped for good, I don't know how to cover this correctly. But in the very least, one would need to avoid the import torch statements further up in setup.py.

@johnnynunez
Copy link
Author

johnnynunez commented Jun 16, 2023

for cuda releases you need extra index url

--extra-index-url https://download.pytorch.org/whl/cu118
onnx==1.14.0
torch==2.0.1+cu118; sys_platform != 'darwin'
torch==2.0.1; sys_platform == 'darwin'
onnxruntime==1.15.0; sys_platform == 'darwin' and platform_machine != 'arm64'
onnxruntime-silicon==1.13.1; sys_platform == 'darwin' and platform_machine == 'arm64'
onnxruntime-gpu==1.15.0; sys_platform != 'darwin'

@johnnynunez johnnynunez reopened this Jun 16, 2023
@ZekunZh
Copy link

ZekunZh commented Jul 18, 2023

Up, @ppwwyyxx could you please approve and merge this PR ?

@janzd
Copy link

janzd commented Aug 9, 2023

Could you please explain how to install using your wheels? Or if you have any installation instructions anywhere, could you send a link to it?

@johnnynunez
Copy link
Author

Could you please explain how to install using your wheels? Or if you have any installation instructions anywhere, could you send a link to it?

download it and pip install name.whl

@danieltudosiu
Copy link

Any update on this?

@johnnynunez johnnynunez closed this by deleting the head repository Sep 22, 2023
@lijain
Copy link

lijain commented Jan 19, 2024

I have been able to compile with CUDA 11.8 and CUDA 12.0 & 12.1 using PyTorch 1.13.1, PyTorch dev 2.0 and python 3.10.6(In local)

Excuse me, how do I download version 0.7?

@mac6894
Copy link

mac6894 commented Jan 20, 2024

hi, I am using Ubuntu 22.04, CUDA 12.3, and would like to install detectron2. I did "python3 -m pip install 'git+https://github.com/johnnynunez/detectron2.git' ", but, I still get this runtime error:

"RuntimeError:
The detected CUDA version (12.3) mismatches the version that was used to compile
PyTorch (11.7). Please make sure to use the same CUDA versions.

  [end of output]"

Do you know how I can fix this? Thanks.

@johnnynunez
Copy link
Author

hi, I am using Ubuntu 22.04, CUDA 12.3, and would like to install detectron2. I did "python3 -m pip install 'git+https://github.com/johnnynunez/detectron2.git' ", but, I still get this runtime error:

"RuntimeError: The detected CUDA version (12.3) mismatches the version that was used to compile PyTorch (11.7). Please make sure to use the same CUDA versions.

  [end of output]"

Do you know how I can fix this? Thanks.

First install pytorch:

pip3 install -U torch torchvision torchaudio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet