[Installation]: Compiling using `build_wheel.py` helper script uses logical instead of pysical cores for compilation
@kaiyux is already working on this.
Since Jan 27, 2026.
- Dominant language
- Python
- Stars
- 14.7k
- Forks
- 2.8k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 489
Description
System Info
System Information:
I run inside the latest version of the TensorRT-LLM development container
How you are installing TensorRT-LLM
Using ./scripts/build_wheel.py --clean --cuda_architectures "89".
I got OOM compiling, and while debugging the build_wheel.py code, I noticed that by default, parallelism is set to multiprocessing.cpu_count(), which is the number of logical cores. However, compilation process is CPU intensive. Ideal number of thread for compilation jobs +- number of physical cores.
The current default increases memory usage, and costs a lot of context switches, with little increased parallelism.
Therefore in scripts/build_wheel.py, the --job_count should default to number of physical CPUs.
Before submitting a new issue...
- Make sure you already searched for relevant issues, and checked the installation documentation and examples for answers to frequently asked questions.
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.