Reduce binary package size

Open
#2,906 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Quiet

Research direction

Start by reproducing the package-size measurements from commit 361109cd937d2a109f55e1a0fb47fa9378e5632d on macOS. Inspect how internal symbols are retained in the binaries and how plugin support affects unused-function stripping. Done requires a defined size reduction approach that preserves the required plugin behavior.

Written by the indexing model from the issue text.

Description

CI/Build enhancement

A quick investigation reveals that we ship with all internal (non-public) symbols embedded into our binaries, which make up about half the raw size on the package, and 23% of the compressed size.

Additional gains could be had by stripping unused functions from the catalyst binary, about 23% raw and 21% compressed. However, that would require disabling plugin support since in a plugin system we don't know at build time which functions from the MLIR library will be called (by a plugin).

All figures on macOS 26 at 361109cd937d2a109f55e1a0fb47fa9378e5632d.

Dominant language
Python
Stars
234
Forks
84
Avg merge
3d 11h
Merged PRs (30d)
78

Getting set up

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.

More from PennyLaneAI/catalyst

All issues in PennyLaneAI/catalyst

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.