tcmlib is a Python library by Intel that implements the Thread Composability Manager. It coordinates CPU resource usage between Intel® oneAPI Threading Building Blocks (oneTBB) and Intel® OpenMP to prevent excessive oversubscription when both runtimes are used concurrently within a single process. This helps optimize performance for multi-threaded Python applications, particularly in AI/ML and scientific computing workloads. The library is currently at version 1.4.1 and is actively maintained by Intel.
pip install tcmlibVerified import paths — ran on the pinned version, not inferred.
The primary way to enable the Thread Composability Manager's effects is by setting the `TCM_ENABLE` environment variable to `1` before running your Python application. This allows `tcmlib` to coordinate multi-threading runtimes like oneTBB and OpenMP used by underlying libraries (e.g., NumPy with Intel® oneAPI Math Kernel Library (oneMKL)). The Python package itself provides the necessary hooks and runtime components for this coordination.
Ensure `export TCM_ENABLE=1` is set in your shell environment or configured at a system level before launching Python applications that use Intel-optimized libraries with concurrent threading.
For maximum benefit, ensure you are using Intel-optimized Python distributions or libraries linked against Intel® oneAPI components (like oneMKL) in your environment.
Consult the license documentation provided with the `tcmlib` package or on its PyPI page for full details.
Deploy on systems with Intel CPUs and recommended software stacks (e.g., Intel oneAPI Toolkits) to leverage the full benefits.
No dependency data recorded yet.