-
Notifications
You must be signed in to change notification settings - Fork 76
Cuda update policy and guide #74
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
base: master
Are you sure you want to change the base?
Conversation
- Aligned decision policy provides transparent decision making; | ||
- Incorporate decision points in the early release process to stagger CUDA migration from the RC release integration work. | ||
|
||
## **Proposed Policy and Process** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is an existing policy, in the past year when has this resulted in us deciding to not do a cuda upgrade?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is a history of decisions we took for past year #74 (comment)
We supported CUDA: 11.8, 12.1, 12.4, 12.6 and 12.8 .
RFC-0039-cuda-support.md
Outdated
### Detailed Process of Introducing new CUDA version | ||
|
||
1. Evaluate CUDA update necessity | ||
Goal: When Any of this is true: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there examples of cuda version updates that do not meet this criteria?
The hard decisions are going to be when someone wants to argue that a upgrade does NOT meet the bar, so having real-world examples of those will help guide those future discussions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I believe the history for the updates are here:
pytorch/pytorch#147383
pytorch/pytorch#145544
pytorch/pytorch#138609
pytorch/pytorch#134015
pytorch/pytorch#123456
|
||
1. Evaluate deprecation of legacy CUDA version from CI/CD | ||
When: We completed CUDA update and previous experimental CUDA version is qualified to be stable and we have 3 supported versions (legacy, stable and experimental) | ||
Goal: Make sure we support 2 versions of CUDA, supporting 3 versions can be an exception for certain release where we need to keep legacy version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
supporting 3 versions can be an exception for certain release where we need to keep legacy version
Can you share examples of when we have needed to keep a legacy version around in the past? Sounds like we might incur a significant CI cost to test 50% more CUDA versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this is current situation with CUDA 11.8: pytorch/pytorch#147383
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add this as an example here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
2. Deprecate legacy CUDA version from CI/CD | ||
When: Evaluate deprecation of legacy CUDA version from CI/CD is complete | ||
Goal: Support for legacy CUDA versions is dropped, starting from PyTorch Domain Libraries and then in PyTorch core. First we drop CD support and then CI support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First we drop CD support and then CI support.
Is the order important?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, dropping CD support is easy to do. When Dropping CI support is most likely a migration of these CI jobs to next CUDA version and may take somewhat longer.
RFC-0039-cuda-support.md
Outdated
As soon as we introduce a new Experimental Version we should consider moving the previous Experimental Version to Stable, and decommission the previous Stable version. Typically we want to support 2-3 versions of CUDA as follows: | ||
|
||
- Optional Legacy Version: If we need to have 1 version for backend compatibility or to work around the current limitation. For example: CUDA older driver is incompatible with newer CUDA version | ||
- Stable Version: This is a stable CUDA version that is used most of the time. This is the version we want to upload to PyPI. Please note that if the stable version is equal or slightly older to the version then the version fbcode is using, we probably need to keep it in CI/CD system as Optional Legacy Version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see why we should talk about fbcode here?
If anything we can have partners ask for a temporary legacy version as above
RFC-0039-cuda-support.md
Outdated
|
||
- Optional Legacy Version: If we need to have 1 version for backend compatibility or to work around the current limitation. For example: CUDA older driver is incompatible with newer CUDA version | ||
- Stable Version: This is a stable CUDA version that is used most of the time. This is the version we want to upload to PyPI. Please note that if the stable version is equal or slightly older to the version then the version fbcode is using, we probably need to keep it in CI/CD system as Optional Legacy Version. | ||
- Latest Experimental Version: This is the latest version of CUDA that we want to support. Minimal requirement is to have it available in nightly releases (CD) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minimal requirement for what?
RFC-0039-cuda-support.md
Outdated
|
||
### We would deprecate version of CUDA when | ||
|
||
As soon as we introduce a new Experimental Version we should consider moving the previous Experimental Version to Stable, and decommission the previous Stable version. Typically we want to support 2-3 versions of CUDA as follows: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say 2 versions with an optional exception to make it clear that 3 is not the expected number.
RFC-0039-cuda-support.md
Outdated
|
||
### Detailed Process of Introducing new CUDA version | ||
|
||
1. Evaluate CUDA update necessity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this is duplicated with the policy above, you can just point to it
RFC-0039-cuda-support.md
Outdated
- It significantly reduces binary/memory footprint | ||
|
||
2. Evaluate if we have all packages for update | ||
When: As soon as Update determined to be necessary. Start by creating RFC [issue](https://github.com/pytorch/pytorch/issues/145544) with possible CUDA matrix to support for next release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When: As soon as Update determined to be necessary. Start by creating RFC [issue](https://github.com/pytorch/pytorch/issues/145544) with possible CUDA matrix to support for next release. | |
When: As soon as Update determined to be necessary. Start by creating RFC issue (see [example](https://github.com/pytorch/pytorch/issues/145544)) with possible CUDA matrix to support for next release. |
RFC-0039-cuda-support.md
Outdated
@@ -0,0 +1,197 @@ | |||
|
|||
# [CUDA version support] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is some ambiguity below on what it means to "support" a give version of cuda.
In particular make it clear that this is always about full releases, unless specified otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also add that we are defining the PyTorch binary support. Source builds are most of the time supported at CUDA release.
|
||
1. Evaluate deprecation of legacy CUDA version from CI/CD | ||
When: We completed CUDA update and previous experimental CUDA version is qualified to be stable and we have 3 supported versions (legacy, stable and experimental) | ||
Goal: Make sure we support 2 versions of CUDA, supporting 3 versions can be an exception for certain release where we need to keep legacy version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add this as an example here
|
||
This completes CUDA and CUDNN upgrade. Congrats! PyTorch now has support for a new CUDA version and you made it happen! | ||
|
||
## Upgrade CUDNN version only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any broad policy we want to set for cudnn upgrade?
|
||
## **Motivation** | ||
|
||
The proposal is to provide two main benefits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a bit curious why we didn't go for "prodictability" as a motivation here?
Given that cuda versions are released at a relatively stable cadence, why wouldn't we want to align to that (with some delay) to enable partners to predict when these upgrades will happen?
(note that I'm not arguing we should do this, just want to hear the reasoning on your end)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe @ptrblck can also chime in for this. I believe for CUDA version updates we would like to first evaluate if update is necessary and there are no major regressions in new version of CUDA, this is why we have a delay and evaluation step. For example we added support for CUDA 12.4, 12.6 and 12.8, skipping 12.5 and 12.7 versions.
RFC-0039-cuda-support.md
Outdated
|
||
As soon as we introduce a new Experimental Version we should consider moving the previous Experimental Version to Stable, and decommission the previous Stable version. Typically we want to support 2-3 versions of CUDA as follows: | ||
|
||
- Optional Legacy Version: If we need to have 1 version for backend compatibility or to work around the current limitation. For example: CUDA older driver is incompatible with newer CUDA version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example: CUDA older driver is incompatible with newer CUDA version
This is always the case for major updates in the CUDA toolkit. We kept CUDA 11.8 alive for the entire lifetime of CUDA 12.x as an unknown number of users supposedly could not update their NVIDIA driver in 2+ years (I don't know how many users). I would suggest keeping the "legacy" version as static as possible (i.e. no cuDNN, NCCL, etc. updates) to avoid mixing the legacy stack with latest libs and to reduce the churn in keeping the stable stack up-to-date.
RFC-0039-cuda-support.md
Outdated
Goal: Support for legacy CUDA versions is dropped, starting from PyTorch Domain Libraries and then in PyTorch core. First we drop CD support and then CI support. | ||
|
||
|
||
# CUDA/CUDNN Upgrade Runbook |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: cuDNN
| CUDA | CUDNN | architectures supported | additional details | | ||
| --- | --- | --- | --- | | ||
| 11.8.0 | 9.1.0.70 | Kepler(3.7), Maxwell(5.0), Pascal(6.0), Volta(7.0), Turing(7.5), Ampere(8.0, 8.6), Hopper(9.0) | Legacy CUDA Release | | ||
| 12.6.3 | 9.5.1.17 | Maxwell(5.0), Pascal(6.0), Volta(7.0), Turing(7.5), Ampere(8.0, 8.6), Hopper(9.0) | Stable CUDA Release | | ||
| 12.8.0 | 9.7.1.26 | Turing(7.5), Ampere(8.0, 8.6), Hopper(9.0), Blackwell(10.0, 12.0+PTX) | Latest CUDA Release | | ||
| | 9.8.0.87 | Turing(7.5), Ampere(8.0, 8.6), Hopper(9.0), Blackwell(10.0, 12.0+PTX) | Latest CUDA Nightly | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add this matrix to the install matrix on https://pytorch.org/get-started/locally/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets add it to RELEASE.md as well
RFC-0039-cuda-support.md
Outdated
https://developer.download.nvidia.com/compute/cuda/12.8.0/local_installers/cuda_12.8.0_570.86.10_linux_sbsa.run (aarch64) | ||
https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/ | ||
|
||
2) CUDA is available on Docker hub images : https://hub.docker.com/r/nvidia/cuda |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need this? I thought we moved to plain Linux containers and are using our install_cuda.sh
script?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is still used, however should be deprecated soon once we migrate focal->jammy
in our CI/CD https://github.com/pytorch/pytorch/blob/main/.ci/docker/build.sh#L73
4. After merging the CI PR, Please open temporary issues for new builds and tests marking them unstable, example [issue](https://github.com/pytorch/pytorch/issues/127104). These issues should be closed after few days of opening, when newly added CI jobs are constantly green. | ||
|
||
## 9. Update Linux Nvidia driver used during runner provisioning | ||
If linux driver update is required. The driver should be updated during the runner provisioning otherwise nightly workflows will fail with multiple Nova workflows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NVIDIA driver updates should not be required during the lifetime of a major CUDA release as minor version compatibility will be used. If we add driver API calls, we should use cudaGetDriverEntryPoint
making sure this API is available on the driver we are using. Keeping older driver on CI nodes will also give us a better signal what users would expect. Updating the driver is of course still valid, but might not be necessary in each CUDA toolkit update.
This PR introduces CUDA update policy followed by PyTorch team and consolidates CUDA update guilde from pytorch/builder repo:
https://github.com/pytorch/builder/blob/main/CUDA_UPGRADE_GUIDE.MD
Related RFCs for CUDA update:
pytorch/pytorch#147383
pytorch/pytorch#145544
pytorch/pytorch#138609
pytorch/pytorch#134015
pytorch/pytorch#123456