NVIDIA / NVIDIA/cuvs

[EPIC] Reducing binary size of `libcuvs.so`

Open
#1,512 1 comment 0 reactions 1 assignee View on GitHub

@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:

  1. 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.
  2. Smarter template engineering - C++ templates create cross-product of kernel function-template instantiations.
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.