-
-
Notifications
You must be signed in to change notification settings - Fork 17.3k
[Build] Switch default CUDA to 13.0, update CUDA architecture lists, clean up stale build-args #39878
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
[Build] Switch default CUDA to 13.0, update CUDA architecture lists, clean up stale build-args #39878
Changes from all commits
84b3142
eed9778
bc42dba
e164cc3
96b73dc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -14,7 +14,7 @@ $python_executable -m pip install -r requirements/build/cuda.txt -r requirements | |||||
| # Limit the number of parallel jobs to avoid OOM | ||||||
| export MAX_JOBS=1 | ||||||
| # Make sure release wheels are built for the following architectures | ||||||
| export TORCH_CUDA_ARCH_LIST="7.0 7.5 8.0 8.6 8.9 9.0+PTX" | ||||||
| export TORCH_CUDA_ARCH_LIST="7.5 8.0 8.6 8.9 9.0 10.0 12.0+PTX" | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
see https://developer.nvidia.com/cuda/gpus
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This list is not used anymore since we do not run GitHub actions. It's kept for reference only. |
||||||
|
|
||||||
| bash tools/check_repo.sh | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -94,12 +94,15 @@ find_package(Torch REQUIRED) | |||||||||||||||||||
| # This check must happen after find_package(Torch) because that's when CMAKE_CUDA_COMPILER_VERSION gets defined | ||||||||||||||||||||
| if(DEFINED CMAKE_CUDA_COMPILER_VERSION AND | ||||||||||||||||||||
| CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0) | ||||||||||||||||||||
| set(CUDA_SUPPORTED_ARCHS "7.5;8.0;8.6;8.7;8.9;9.0;10.0;11.0;12.0;12.1") | ||||||||||||||||||||
| # starting from CUDA 12.9 and Blackwell (10.0), we use family-specific targets (10.0f, 12.0f, etc) | ||||||||||||||||||||
| # to support the whole generation without specifying all sub-architectures | ||||||||||||||||||||
| # see: https://developer.nvidia.com/blog/nvidia-blackwell-and-nvidia-cuda-12-9-introduce-family-specific-architecture-features/ | ||||||||||||||||||||
| set(CUDA_SUPPORTED_ARCHS "7.5;8.0;8.6;8.7;8.9;9.0;10.0;11.0;12.0") | ||||||||||||||||||||
| elseif(DEFINED CMAKE_CUDA_COMPILER_VERSION AND | ||||||||||||||||||||
| CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 12.8) | ||||||||||||||||||||
| set(CUDA_SUPPORTED_ARCHS "7.0;7.2;7.5;8.0;8.6;8.7;8.9;9.0;10.0;10.1;12.0;12.1") | ||||||||||||||||||||
| set(CUDA_SUPPORTED_ARCHS "7.5;8.0;8.6;8.7;8.9;9.0;10.0;10.1;10.3;12.0;12.1") | ||||||||||||||||||||
|
Comment on lines
+100
to
+103
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I think the lists need to be flipped.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are only using CUDA 12.9, so it should be safe to use thouse architectures. And please see the comments above that explains why we are not specifying 10.3 and 12.1 since CUDA 13.0
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ack. It could be misleading to users that logic is for cuda 12.8 but in reality it's for cuda 12.9. |
||||||||||||||||||||
| else() | ||||||||||||||||||||
| set(CUDA_SUPPORTED_ARCHS "7.0;7.2;7.5;8.0;8.6;8.7;8.9;9.0") | ||||||||||||||||||||
| set(CUDA_SUPPORTED_ARCHS "7.0;7.5;8.0;8.6;8.7;8.9;9.0") | ||||||||||||||||||||
| endif() | ||||||||||||||||||||
|
|
||||||||||||||||||||
| # | ||||||||||||||||||||
|
|
||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -188,7 +188,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \ | |||||
| # Explicitly set the list to avoid issues with torch 2.2 | ||||||
| # See https://github.com/pytorch/pytorch/pull/123243 | ||||||
| # From versions.json: .torch.cuda_arch_list | ||||||
| ARG torch_cuda_arch_list='7.0 7.5 8.0 8.9 9.0 10.0 12.0' | ||||||
| ARG torch_cuda_arch_list='7.5 8.0 8.6 8.9 9.0 10.0 12.0+PTX' | ||||||
|
Harry-Chen marked this conversation as resolved.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
see https://developer.nvidia.com/cuda/gpus
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above -- 10.3 is absorbed by |
||||||
| ENV TORCH_CUDA_ARCH_LIST=${torch_cuda_arch_list} | ||||||
| #################### BUILD BASE IMAGE #################### | ||||||
|
|
||||||
|
|
@@ -785,7 +785,7 @@ ARG PIP_EXTRA_INDEX_URL UV_EXTRA_INDEX_URL | |||||
| ENV UV_HTTP_TIMEOUT=500 | ||||||
|
|
||||||
| # install kv_connectors if requested | ||||||
| ARG torch_cuda_arch_list='7.0 7.5 8.0 8.9 9.0 10.0 12.0' | ||||||
| ARG torch_cuda_arch_list='7.5 8.0 8.6 8.9 9.0 10.0 12.0+PTX' | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
see https://developer.nvidia.com/cuda/gpus
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above -- 10.3 is absorbed by |
||||||
| ENV TORCH_CUDA_ARCH_LIST=${torch_cuda_arch_list} | ||||||
| RUN --mount=type=cache,target=/root/.cache/uv \ | ||||||
| --mount=type=bind,source=requirements/kv_connectors.txt,target=/tmp/kv_connectors.txt,ro \ | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -32,7 +32,7 @@ | |||||
| "default": "false" | ||||||
| }, | ||||||
| "TORCH_CUDA_ARCH_LIST": { | ||||||
| "default": "7.0 7.5 8.0 8.9 9.0 10.0 12.0" | ||||||
| "default": "7.5 8.0 8.6 8.9 9.0 10.0 12.0+PTX" | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
see https://developer.nvidia.com/cuda/gpus
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above -- 10.3 is absorbed by |
||||||
| }, | ||||||
| "MAX_JOBS": { | ||||||
| "default": "2" | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.