[EPIC] Reducing binary size of `libcuvs.so`
Open
@divyegala is already working on this.
Since Nov 7, 2025.
- Dominant language
- Cuda
- Stars
- 854
- Forks
- 236
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 62
Description
In general, the binary size of a project is very relevant to integrations as the cost of storage, deployment, and distribution of project binaries is non-trivial.
Keeping this in mind, we have 3 approaches to take that would reduce the binary size of libcuvs.so:
- Removing all duplicate instantiations of kernels - In CUDA whole compilation mode, kernels are kept as a copy in every single TU that instantiates them and the linker phase does not run deduplication.
- Smarter template engineering - C++ templates create cross-product of kernel function-template instantiations.
- JIT LTO - This involves compiling kernels as LTO-IR format fatbins, and JITing to target architecture at runtime.
For first two points, techniques to reduce bloat are described here https://gist.github.com/divyegala/cf8977bbe7fb4a2f492935dd46eb7fd3.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.