Skip to content

Bundle the linked oneTBB runtime in Linux wheels - #8

Merged
cyyever merged 2 commits into
trimfrom
fix/bundle-tbb-runtime
Oct 30, 2026
Merged

cyyever merged 2 commits into
trimfrom
fix/bundle-tbb-runtime

Conversation

@cyyever

@cyyever cyyever commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

BC-breaking?

No.

Agent details (AI-generated)

trim links oneTBB for C++ parallel algorithms, but Linux wheels omit its shared library. On a machine without system onetbb, import torch fails with libtbb.so.12: cannot open shared object file.

Install the selected shared TBB target in torch/lib under its SONAME so the existing $ORIGIN rpath resolves it. Static TBB builds need no runtime copy.

Validation:

  • Full lintrunner -a and git diff --check passed.
  • Built a CUDA cp314 wheel and verified torch/lib/libtbb.so.12 is present.
  • On a real RTX PRO 5000 sandbox, temporarily removed system TBB: the old wheel failed to import; the patched wheel loaded TBB from its own directory and passed matrix multiplication, torch.compile, torchvision NMS, and vLLM SiLU checks. Restored the system libraries afterward.
  • ROCm and XPU wheels have not been rebuilt with this PR.

@cyyever
cyyever marked this pull request as ready for review October 30, 2026 03:01
@cyyever
cyyever merged commit 3ddfcbc into trim Oct 30, 2026
15 checks passed
cyyever added a commit that referenced this pull request Oct 31, 2026
* Bundle the linked oneTBB runtime in Linux wheels

* Remove added TBB license metadata from the runtime fix
cyyever added a commit that referenced this pull request Oct 31, 2026
* Bundle the linked oneTBB runtime in Linux wheels

* Remove added TBB license metadata from the runtime fix
cyyever added a commit that referenced this pull request Oct 31, 2026
* Bundle the linked oneTBB runtime in Linux wheels

* Remove added TBB license metadata from the runtime fix
cyyever added a commit that referenced this pull request Oct 31, 2026
* Bundle the linked oneTBB runtime in Linux wheels

* Remove added TBB license metadata from the runtime fix
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.

1 participant