Skip to content

Strip debug symbols from cuda-core Linux wheels#1883

Open
leofang wants to merge 1 commit intoNVIDIA:mainfrom
leofang:fix/cuda-core-strip-so
Open

Strip debug symbols from cuda-core Linux wheels#1883
leofang wants to merge 1 commit intoNVIDIA:mainfrom
leofang:fix/cuda-core-strip-so

Conversation

@leofang
Copy link
Copy Markdown
Member

@leofang leofang commented Apr 8, 2026

Summary

  • Add -Wl,--strip-all to extra_link_args for wheel builds on Linux in cuda_core/build_hooks.py, matching the existing behavior in cuda_bindings/build_hooks.py
  • Without stripping, the 0.7.0 Linux wheel is ~30 MB (103 MB extracted) because every .so ships with debug_info. After stripping, extracted size drops from 103 MB to ~11 MB, bringing the wheel in line with the ~4-5 MB Windows wheels.
  • Follow-up issue for other build flag differences: cuda-core build_hooks.py missing compiler/linker flags present in cuda-bindings #1882

Closes #1881

Test plan

  • Build a Linux wheel with pip wheel . in cuda_core/ and verify .so files are stripped (file *.so should NOT show with debug_info, not stripped)
  • Verify editable installs still have debug symbols (strip=False path)
  • Compare wheel size before/after

-- Leo's bot

Add -Wl,--strip-all to extra_link_args for wheel builds on Linux,
matching the existing behavior in cuda_bindings/build_hooks.py.

Without stripping, the 0.7.0 Linux wheel is ~30 MB (103 MB extracted)
because every .so ships with debug_info. After stripping, extracted
size drops from 103 MB to ~11 MB, bringing the wheel in line with
the ~4-5 MB Windows wheels.

Closes NVIDIA#1881

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@copy-pr-bot
Copy link
Copy Markdown
Contributor

copy-pr-bot bot commented Apr 8, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cuda-core Linux wheels ship unstripped .so files, causing 6x size bloat

1 participant