Skip to content

Installation

TENEX ships pre-built wheels with AOT-compiled CUDA kernels, so no compiler toolchain is needed on the target machine. Build-from-source and a JIT fallback are also available.

Requirements

Requirement Version
Python >= 3.10
PyTorch >= 2.0 (with CUDA support)
CUDA toolkit 11.8, 12.x, or 13.x
OS Linux x86_64

PyTorch is required at runtime but is intentionally not a hard dependency, so that you control which CUDA build is installed. Install it first, then install TENEX with PyPI kept as the primary index (so NumPy, SciPy, and the other runtime dependencies resolve normally) and the TENEX wheel index added as an extra source.

pip install torch --index-url https://download.pytorch.org/whl/cu132
pip install tnx --extra-index-url https://cxinsys.github.io/tenex/whl/

Change cu132 to match your CUDA version (for example cu118, cu126, cu128, cu129, cu130, or cu132). This installs TENEX with its pre-compiled .so kernels alongside NumPy and SciPy.

Verify the installation

import tenex as tnx

print([k.name for k in tnx.registered_kernels()])
# ['GEMM-B2', 'Full-SMEM', 'Adaptive-SMEM', 'scatter_add']

Build from source and troubleshooting

For build-from-source, the JIT fallback, CPU-only mode, the full wheel matrix, and troubleshooting, see INSTALL.md in the repository.