Repository navigation
Add cublas drop-in fix for 13.0 - #178333
Add cublas drop-in fix for 13.0 #178333tinglvv wants to merge 11 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/178333
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ⏳ No Failures, 224 PendingAs of commit d97739f with merge base d5a36c2 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchmergebot label ciflow/trunk ciflow/h100 ciflow/b200 |
| "13.0": ( | ||
| "cuda-toolkit[nvrtc,cudart,cupti,cufft,curand,cusolver,cusparse,cublas,cufile,nvjitlink,nvtx]==13.0.2; platform_system == 'Linux' | " # noqa: B950 | ||
| "cuda-toolkit[nvrtc,cudart,cupti,cufft,curand,cusolver,cusparse,cufile,nvjitlink,nvtx]==13.0.2; platform_system == 'Linux' | " # noqa: B950 | ||
| "nvidia-cublas==13.1.1.3; platform_system == 'Linux' | " |
There was a problem hiding this comment.
👋🏻 sorry for the random comment... I'm James, I work on RAPIDS (https://github.com/rapidsai). Coming here from an offline conversation with @tinglvv to note ... separating out nvidia-cublas like this will make these wheels uninstallable alongside any version of cuda-toolkit[cublas]
cuda-toolkitwheels contain strict pins, e.g.cuda-toolkit[cublas]==13.0.2requiresnvidia-cublas== 13.1.0.3.*- there is no
cuda-toolkittoday that allowsnvidia-cublas==13.1.1.3 - even if one became available, it'd conflict with requirement
cuda-toolkit==13.0.2
Some projects these torch wheels would no longer be installable alongside:
- RAFT (https://github.com/rapidsai/raft)
- cuGraph (https://github.com/rapidsai/cugraph)
- cuML (https://github.com/rapidsai/cuml)
- cuVS (https://github.com/rapidsai/cuvs)
cuda-pathfinder[cu13](NVIDIA/cuda-python code link)cupy-cuda13x[ctk](cupy/cupy code link)
... unless they all also split their nvidia-cublas dependency out separately like this.
This PR is the best solution available today if you want to guarantee that these newer nvidia-cublas wheels are always used, but that comes at the cost of not being installable alongside those projects I listed above (and probably more).
Listing some alternatives, though I understand they may be more permissive than you're comfortable with at this time:
# only allow the nvidia-cublas from CTK 13.0.2 or the new one with this fix
cuda-toolkit[nvrtc,cudart,cupti,cufft,curand,cusolver,cusparse,cufile,nvjitlink,nvtx]==13.0.2
nvidia-cublas>=13.1.0.3,<=13.1.1.3
# only allow nvidia-cublas newer than the one from CTK 13.0.2
cuda-toolkit[nvrtc,cudart,cupti,cufft,curand,cusolver,cusparse,cufile,nvjitlink,nvtx]==13.0.2
nvidia-cublas==13.1.*,>=13.1.0.3
Thanks for listening 😊
malfet
left a comment
There was a problem hiding this comment.
We should never introduce any --extra-index-url changes into the codebase
(The rest looks fine though)
Let's indeed figure out our story. Also, this is really bad for 2.11 release I guess
|
Hi @tinglvv is there an issue related to: cublas drop-in fix for TMEM issue may result in silent data corruption on Blackwel ? Could you please post a link or some document describing the issue ? |
|
@atalman from the cuBLAS release notes: https://docs.nvidia.com/cuda/cublas-patch-release-notes/
|
|
The only remaining error exists on 12.8 aarch64 builds: https://github.com/pytorch/pytorch/actions/runs/23821339236/job/69445967627 This seems to be an issue with the actual wheel that wheel-stub is downloading: inside the nvidia-cublas-cu12==12.8.5.5 source tarball is trying to download the actual pre-built wheel from NVIDIA's servers, but the SHA256 hash of the downloaded file doesn't match what's embedded in the tarball metadata. However, the x86 12.8 builds are passing. |
|
@pytorchbot rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
Successfully rebased |
e1bf787 to
d2ccf6e
Compare
|
Latest failures look to be flaky, failed at "Calculate Docker Image" step, retrigger. |
|
@pytorchbot rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
Successfully rebased |
d2ccf6e to
f9b18f3
Compare
|
@pytorchbot rebase -b viable/strict |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
The one pending failure is https://github.com/pytorch/pytorch/actions/runs/24153748765/job/70487740316 This should be infra issue as this job passed in previous runs. Retriggering the job. |
| "13.0": ( | ||
| "cuda-toolkit[nvrtc,cudart,cupti,cufft,curand,cusolver,cusparse,cublas,cufile,nvjitlink,nvtx]==13.0.2; platform_system == 'Linux' | " # noqa: B950 | ||
| "cuda-toolkit[nvrtc,cudart,cupti,cufft,curand,cusolver,cusparse,cufile,nvjitlink,nvtx]==13.0.2; platform_system == 'Linux' | " # noqa: B950 | ||
| "nvidia-cublas>=13.1.0.3,<=13.1.1.3; platform_system == 'Linux' | " |
There was a problem hiding this comment.
| "nvidia-cublas>=13.1.0.3,<=13.1.1.3; platform_system == 'Linux' | " | |
| "nvidia-cublas==13.1.1.3; platform_system == 'Linux' | " |
There was a problem hiding this comment.
There was a problem hiding this comment.
We have to do the relaxed range as requested by the RAPIDS team here - #178333 (comment).
Quote "separating out nvidia-cublas like this will make these wheels uninstallable alongside any version of cuda-toolkit[cublas]".
A quick explanation here:
cuda-toolkit==13.0.2 is a meta-package. When installed with the cublas extra (cuda-toolkit[cublas]==13.0.2), it declares a dependency on nvidia-cublas==13.1.0.3 — the cublas version that shipped with CUDA toolkit 13.0.2. If we pin it to a higher version, any package that depends on cuda-toolkit[cublas]==13.0.2 (cuGraph, cuML, cuVS, RAFT, etc.) would conflict with torch which requires a higher cublas package.
Example:
If exact pin ==13.1.1.3 , breaks co-installation:
torch requires: nvidia-cublas==13.1.1.3
cuda-toolkit[cublas]==13.0.2 requires: nvidia-cublas==13.1.0.3
pip can only install ONE version → CONFLICT → uninstallable
After relaxing, >=13.1.0.3,<=13.1.1.3 :
torch requires: nvidia-cublas>=13.1.0.3,<=13.1.1.3
cuda-toolkit[cublas]==13.0.2 requires: nvidia-cublas==13.1.0.3
pip picks 13.1.0.3 → satisfies BOTH → no conflict
Summary:
When torch is installed alone, pip picks 13.1.1.3 (latest in range, gets the bugfix). When installed alongside cuGraph/cuML/etc., pip resolves to 13.1.0.3 (satisfies both constraints, misses the bugfix but at least everything installs).
| ] | ||
|
|
||
|
|
||
| # WARNING: For CUDA 12.8 and 13.0, cublas is pinned to a version range rather |
There was a problem hiding this comment.
Please remove CUDA 12.8 mention. These builds are deprectaed
|
@pytorchmergebot merge -f "lint is green, binary builds where already tested" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
CUDA 13.0.3 is released which includes the 1. patch release fix from cublas that fixes the below issue: Quote from [CUBLAS Patch Release notes](https://docs.nvidia.com/cuda/cublas-patch-release-notes/) Fixed an issue in cublasLtMatmul() that could lead to incorrect results when it ran concurrently with another kernel that used Tensor Memory. This issue affected only algorithms with CUBLASLT_ALGO_CONFIG_ID equal to 66 on GPUs with Compute Capability 10.x and 11.x, and had existed since cuBLAS 12.8. [5807900, 5943783] 2. nvjitlink is set to a lower bound, rather than a pin, for better compatibility for RAPIDS wheels nvcc/nvvm/crt compiler stack are pinned to the same CL for better compatibility. It will pull the latest nvjitlink available rather than the one that is pinned to the released CTK. Updating the CTK version to 13.0.3 in place of the drop in fix in #178333 Component | 13.0.2 | 13.0.3 -- | -- | -- CUDA cuBLAS | 13.1.0.3 | 13.1.1.3 CUDA nvsdm | 580.95.05 | 580.126.20 Pull Request resolved: #179758 Approved by: https://github.com/malfet, https://github.com/atalman
CUDA 13.0.3 is released which includes the 1. patch release fix from cublas that fixes the below issue: Quote from [CUBLAS Patch Release notes](https://docs.nvidia.com/cuda/cublas-patch-release-notes/) Fixed an issue in cublasLtMatmul() that could lead to incorrect results when it ran concurrently with another kernel that used Tensor Memory. This issue affected only algorithms with CUBLASLT_ALGO_CONFIG_ID equal to 66 on GPUs with Compute Capability 10.x and 11.x, and had existed since cuBLAS 12.8. [5807900, 5943783] 2. nvjitlink is set to a lower bound, rather than a pin, for better compatibility for RAPIDS wheels nvcc/nvvm/crt compiler stack are pinned to the same CL for better compatibility. It will pull the latest nvjitlink available rather than the one that is pinned to the released CTK. Updating the CTK version to 13.0.3 in place of the drop in fix in pytorch#178333 Component | 13.0.2 | 13.0.3 -- | -- | -- CUDA cuBLAS | 13.1.0.3 | 13.1.1.3 CUDA nvsdm | 580.95.05 | 580.126.20 Pull Request resolved: pytorch#179758 Approved by: https://github.com/malfet, https://github.com/atalman
[CD] Bump 13.0 builds to 13.0.3 (#179758) CUDA 13.0.3 is released which includes the 1. patch release fix from cublas that fixes the below issue: Quote from [CUBLAS Patch Release notes](https://docs.nvidia.com/cuda/cublas-patch-release-notes/) Fixed an issue in cublasLtMatmul() that could lead to incorrect results when it ran concurrently with another kernel that used Tensor Memory. This issue affected only algorithms with CUBLASLT_ALGO_CONFIG_ID equal to 66 on GPUs with Compute Capability 10.x and 11.x, and had existed since cuBLAS 12.8. [5807900, 5943783] 2. nvjitlink is set to a lower bound, rather than a pin, for better compatibility for RAPIDS wheels nvcc/nvvm/crt compiler stack are pinned to the same CL for better compatibility. It will pull the latest nvjitlink available rather than the one that is pinned to the released CTK. Updating the CTK version to 13.0.3 in place of the drop in fix in #178333 Component | 13.0.2 | 13.0.3 -- | -- | -- CUDA cuBLAS | 13.1.0.3 | 13.1.1.3 CUDA nvsdm | 580.95.05 | 580.126.20 Pull Request resolved: #179758 Approved by: https://github.com/malfet, https://github.com/atalman (cherry picked from commit 99fd1c8) Co-authored-by: Ting Lu <[email protected]>
cublas drop-in fix for TMEM issue may result in silent data corruption on Blackwell, cuBLAS may return silent wrong results/NaNs under concurrent workloads (overlapping streams) when TMEM is used on the same SM [Cublas 13.1.0.3](https://pypi.org/project/nvidia-cublas/13.1.0.3/) for 13.0 builds [Cublas 12.8.5.5](https://pypi.org/project/nvidia-cublas-cu12/12.8.5.5/) for 12.8 builds Pull Request resolved: pytorch#178333 Approved by: https://github.com/eqy, https://github.com/atalman
…)" This reverts commit cb81f45. Reverted pytorch#178333 on behalf of https://github.com/malfet due to Install rules in binary test should remain simple and mimick install instructions ([comment](pytorch#178333 (comment)))
cublas drop-in fix for TMEM issue may result in silent data corruption on Blackwell, cuBLAS may return silent wrong results/NaNs under concurrent workloads (overlapping streams) when TMEM is used on the same SM [Cublas 13.1.0.3](https://pypi.org/project/nvidia-cublas/13.1.0.3/) for 13.0 builds Quote from [CUBLAS Patch Release notes]( https://docs.nvidia.com/cuda/cublas-patch-release-notes/) > Fixed an issue in cublasLtMatmul() that could lead to incorrect results when it ran concurrently with another kernel that used Tensor Memory. This issue affected only algorithms with CUBLASLT_ALGO_CONFIG_ID equal to 66 on GPUs with Compute Capability 10.x and 11.x, and had existed since cuBLAS 12.8. [5807900, 5943783] Pull Request resolved: pytorch#178333 Approved by: https://github.com/eqy, https://github.com/atalman Co-authored-by: Andrey Talman <[email protected]>
CUDA 13.0.3 is released which includes the 1. patch release fix from cublas that fixes the below issue: Quote from [CUBLAS Patch Release notes](https://docs.nvidia.com/cuda/cublas-patch-release-notes/) Fixed an issue in cublasLtMatmul() that could lead to incorrect results when it ran concurrently with another kernel that used Tensor Memory. This issue affected only algorithms with CUBLASLT_ALGO_CONFIG_ID equal to 66 on GPUs with Compute Capability 10.x and 11.x, and had existed since cuBLAS 12.8. [5807900, 5943783] 2. nvjitlink is set to a lower bound, rather than a pin, for better compatibility for RAPIDS wheels nvcc/nvvm/crt compiler stack are pinned to the same CL for better compatibility. It will pull the latest nvjitlink available rather than the one that is pinned to the released CTK. Updating the CTK version to 13.0.3 in place of the drop in fix in pytorch#178333 Component | 13.0.2 | 13.0.3 -- | -- | -- CUDA cuBLAS | 13.1.0.3 | 13.1.1.3 CUDA nvsdm | 580.95.05 | 580.126.20 Pull Request resolved: pytorch#179758 Approved by: https://github.com/malfet, https://github.com/atalman
cublas drop-in fix for TMEM issue may result in silent data corruption on Blackwell, cuBLAS may return silent wrong results/NaNs under concurrent workloads (overlapping streams) when TMEM is used on the same SM [Cublas 13.1.0.3](https://pypi.org/project/nvidia-cublas/13.1.0.3/) for 13.0 builds [Cublas 12.8.5.5](https://pypi.org/project/nvidia-cublas-cu12/12.8.5.5/) for 12.8 builds Pull Request resolved: pytorch#178333 Approved by: https://github.com/eqy, https://github.com/atalman
…)" This reverts commit cb81f45. Reverted pytorch#178333 on behalf of https://github.com/malfet due to Install rules in binary test should remain simple and mimick install instructions ([comment](pytorch#178333 (comment)))
cublas drop-in fix for TMEM issue may result in silent data corruption on Blackwell, cuBLAS may return silent wrong results/NaNs under concurrent workloads (overlapping streams) when TMEM is used on the same SM [Cublas 13.1.0.3](https://pypi.org/project/nvidia-cublas/13.1.0.3/) for 13.0 builds Quote from [CUBLAS Patch Release notes]( https://docs.nvidia.com/cuda/cublas-patch-release-notes/) > Fixed an issue in cublasLtMatmul() that could lead to incorrect results when it ran concurrently with another kernel that used Tensor Memory. This issue affected only algorithms with CUBLASLT_ALGO_CONFIG_ID equal to 66 on GPUs with Compute Capability 10.x and 11.x, and had existed since cuBLAS 12.8. [5807900, 5943783] Pull Request resolved: pytorch#178333 Approved by: https://github.com/eqy, https://github.com/atalman Co-authored-by: Andrey Talman <[email protected]>
CUDA 13.0.3 is released which includes the 1. patch release fix from cublas that fixes the below issue: Quote from [CUBLAS Patch Release notes](https://docs.nvidia.com/cuda/cublas-patch-release-notes/) Fixed an issue in cublasLtMatmul() that could lead to incorrect results when it ran concurrently with another kernel that used Tensor Memory. This issue affected only algorithms with CUBLASLT_ALGO_CONFIG_ID equal to 66 on GPUs with Compute Capability 10.x and 11.x, and had existed since cuBLAS 12.8. [5807900, 5943783] 2. nvjitlink is set to a lower bound, rather than a pin, for better compatibility for RAPIDS wheels nvcc/nvvm/crt compiler stack are pinned to the same CL for better compatibility. It will pull the latest nvjitlink available rather than the one that is pinned to the released CTK. Updating the CTK version to 13.0.3 in place of the drop in fix in pytorch#178333 Component | 13.0.2 | 13.0.3 -- | -- | -- CUDA cuBLAS | 13.1.0.3 | 13.1.1.3 CUDA nvsdm | 580.95.05 | 580.126.20 Pull Request resolved: pytorch#179758 Approved by: https://github.com/malfet, https://github.com/atalman
cublas drop-in fix for TMEM issue may result in silent data corruption on Blackwell, cuBLAS may return silent wrong results/NaNs under concurrent workloads (overlapping streams) when TMEM is used on the same SM
Cublas 13.1.0.3 for 13.0 builds
Quote from CUBLAS Patch Release notes
cc @ptrblck @nWEIdia @eqy @atalman @malfet