Use -compress-mode=size for CUDA 13 build for binary size reduction#161316
Use -compress-mode=size for CUDA 13 build for binary size reduction#161316tinglvv wants to merge 2 commits intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/161316
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 3 Unrelated FailuresAs of commit be55214 with merge base c8bb0e4 ( NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 5 checks: windows-arm64-binary-libtorch-release / libtorch-cpu-shared-with-deps-release-build, windows-arm64-binary-libtorch-debug / libtorch-cpu-shared-with-deps-debug-build, macos-arm64-binary-wheel / wheel-py3_14-cpu-build, windows-binary-wheel / wheel-py3_14-xpu-build, windows-arm64-binary-wheel / wheel-py3_12-cpu-build Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
Wheel size saving comparson: 146 MB saved — ~20.1% smaller |
…ytorch#161316) pytorch#159779 CUDA 13 added the support for --compress-mode flag for nvcc across all drivers of CUDA 13.X toolkits, enabling the possibility to use --compress-mode=size for significant size reduction (~71% less for CUDA Math APIs for example). https://developer.nvidia.com/blog/whats-new-and-important-in-cuda-toolkit-13-0/ Why we have to add for CUDA 13 only, quote from @ptrblck : Any usage of --compress-mode=size/balance will drop the support of older CUDA drivers and will bump the min. driver requirement to CUDA 12.4. pytorch#157791 (comment) Default for CUDA 13 will be --compress-mode=balance which gives smaller binaries than LZ4 speed mode used in previous CUDA versions. Related - pytorch#157791 Pull Request resolved: pytorch#161316 Approved by: https://github.com/nWEIdia, https://github.com/Skylion007
#159779
CUDA 13 added the support for --compress-mode flag for nvcc across all drivers of CUDA 13.X toolkits, enabling the possibility to use --compress-mode=size for significant size reduction (~71% less for CUDA Math APIs for example). https://developer.nvidia.com/blog/whats-new-and-important-in-cuda-toolkit-13-0/
Why we have to add for CUDA 13 only, quote from @ptrblck : Any usage of --compress-mode=size/balance will drop the support of older CUDA drivers and will bump the min. driver requirement to CUDA 12.4. #157791 (comment)
Default for CUDA 13 will be --compress-mode=balance which gives smaller binaries than LZ4 speed mode used in previous CUDA versions.
Related - #157791
cc @ptrblck @nWEIdia @atalman @malfet