Libtt: A Tenstorrent Compiler Stack Bridging PyTorch and JAX

Libtt enables JAX and PyTorch to run directly on Tenstorrent hardware via the PJRT interface and TorchTPU path.
Libtt is a project that fills the software ecosystem gap for Tenstorrent AI acceleration hardware. It implements the PJRT interface so the XLA-based JAX framework can run natively, while PyTorch connects through the TorchTPU backend; software written for TPU needs only custom kernels replaced to migrate. Libtt packages the complete stack from compiler to multi-chip runtime as a single shared library, with extensive fixes and compiler optimizations on top of upstream open-source code. The project claims to pass most JAX and TorchTPU test suites and to run workloads such as SGLang, TorchTitan, and Miles, covering inference, fine-tuning, and reinforcement learning scenarios. Its value lies in lowering the adaptation barrier for non-NVIDIA hardware, but hardware adoption, edge-case test coverage, and multi-chip scaling efficiency still require independent verification.
Why Libtt?
Tenstorrent's AI acceleration hardware is gaining traction in the open-source community, but its software ecosystem has long been a weak spot. PyTorch and JAX, as mainstream frameworks, previously could not run efficiently directly on Tenstorrent chips. Libtt emerges precisely to fill this gap: by implementing PJRT—the interface originally used to drive Google TPU—it enables XLA-based frameworks to communicate directly with Tenstorrent hardware. According to the project, JAX runs natively, while PyTorch connects through the TorchTPU path; software written for TPU requires almost no modification, needing only custom kernels replaced to migrate.

PJRT (Pretty Much Just Another Runtime) is the hardware abstraction runtime interface designed by Google for the XLA compiler. XLA compiles computation graphs into executables targeting specific hardware, while PJRT handles memory allocation on devices, scheduling execution, managing data transfers, and multi-device communication. Both JAX and PyTorch/XLA communicate with backend hardware through PJRT, so the essential task for any hardware vendor wishing to join the XLA ecosystem is to implement a PJRT-compliant plugin. Libtt is precisely Tenstorrent's PJRT implementation, which is why it can support JAX "natively."
TorchTPU is a backend path under the PyTorch/XLA project, originally used to let PyTorch models execute on TPU via XLA compilation. It converts PyTorch computation graphs into XLA representations, then hands them to the PJRT runtime for scheduling. Libtt reusing this path means PyTorch models need no dedicated backend of their own—as long as the underlying PJRT points to Tenstorrent devices, they can run.
Overall Architecture and Key Components
Libtt is not a simple adaptation layer but a complete compiler and runtime stack. Built on Tenstorrent's open-source compiler and runtime, it packages the entire stack—from compiler to multi-chip runtime—as a single shared library. This means developers need not manage multiple components separately, reducing integration complexity.
Core components include:
- PJRT implementation: Provides the standard interface for communicating with XLA frameworks, enabling frameworks like JAX to directly schedule Tenstorrent hardware.
- TorchTPU integration: Lets PyTorch models run on Tenstorrent chips through the TorchTPU backend, reusing the TPU software path.
- Compiler optimizations: Adds extensive optimizations on top of the open-source upstream to improve execution efficiency.
- Multi-chip runtime: Supports horizontal scaling, managing inter-chip communication and collaborative computation.
This design approach shares similarities with Google TPU's software stack, but its goal is to open the ecosystem to a broader range of hardware platforms.
XLA (Accelerated Linear Algebra) is Google's open-source deep learning compiler, responsible for operator fusion, memory planning, and layout optimization on high-level computation graphs, then generating machine code for specific hardware. Its architecture is divided into three parts: frontend (receiving computation graphs from frameworks like JAX/PyTorch), mid-level optimization, and backend code generation. Libtt is built on Tenstorrent's open-source compiler stack, essentially adding code generation and runtime support for Tenstorrent hardware on the XLA backend side, so the "compiler optimizations" mentioned in the text mainly occur at this layer.
Multi-chip runtime needs to handle inter-device collective communication (such as all-reduce, all-gather), tensor sharding, and topology-aware scheduling. In the PJRT model, such capabilities are implemented through device meshes and cross-device execution of executables, similar in responsibility to NVIDIA's NCCL and TPU's ICI network. Libtt claims to support horizontal scaling, but actual multi-chip efficiency depends on the bandwidth and topology design of Tenstorrent's inter-chip interconnect.
Compatibility and Performance Optimization
Libtt includes numerous fixes to the upstream Tenstorrent software, aiming to make existing PyTorch and JAX code work out of the box. The project claims to pass most of the JAX and TorchTPU test suites, providing developers with a baseline level of confidence. Additionally, compiler-level optimizations aim to make models run faster on Tenstorrent hardware, not merely run at all.
The migration path is another highlight of Libtt: software written for TPU that uses custom kernels needs only those kernels replaced to run on Tenstorrent, with the rest of the code unchanged. This significantly lowers the cost of migrating from the TPU ecosystem, especially for teams already invested in the XLA toolchain.
Real-World Application Scenarios
Libtt demonstrates the ability to run on multiple real-world workloads, including SGLang, TorchTitan, and Miles. These tools cover model serving, fine-tuning, and reinforcement learning scenarios, respectively.
- SGLang: Used for large model inference serving, indicating Libtt can support production-grade service deployment.
- TorchTitan: PyTorch's native distributed training framework, validating the feasibility of fine-tuning scenarios.
- Miles: A reinforcement learning-related tool, showing Libtt is also exploring RL workloads.
These cases indicate that Libtt is not停留在 experimental stage but attempts to cover the complete pipeline from training to inference. However, specific performance data has not been disclosed in the original material, and actual acceleration effects still need community verification.
SGLang is a high-throughput inference serving framework for large language models, known for RadixAttention prefix caching and efficient scheduling, supporting multiple hardware backends. TorchTitan is PyTorch's official distributed training reference implementation, integrating tensor parallelism, pipeline parallelism, FSDP, and other strategies to validate the feasibility of large-scale training on new hardware. Miles targets reinforcement learning post-training (such as RLHF) workloads, involving alternating execution of inference and training. These three correspond to inference, pre-training/fine-tuning, and reinforcement learning workloads respectively, covering a broad range, but whether they can run stably on Tenstorrent still depends on the completeness of Libtt's support for the underlying operators and communication primitives of each framework.
Ecosystem Significance and Challenges
Libtt's value lies in bringing the PyTorch and JAX ecosystems to Tenstorrent hardware, which helps attract more developers to try non-NVIDIA AI acceleration solutions. By reusing existing interfaces like PJRT and TorchTPU, Libtt lowers the barrier to software adaptation while maintaining the flexibility of the open-source stack.
The challenges are equally obvious: Tenstorrent hardware itself has limited adoption, and the maturity of the software ecosystem requires time to accumulate. Libtt currently passes most test suites, but "most" means there are still uncovered edge cases. Moreover, the actual scaling efficiency of the multi-chip runtime and the generality of compiler optimizations all require more independent evaluation to verify.
Conclusion
Libtt provides a pragmatic software entry point for Tenstorrent processors, bridging mainstream frameworks through PJRT and TorchTPU, and delivering the complete stack as a single shared library. It lowers migration costs and demonstrates operational capability in serving, fine-tuning, and reinforcement learning scenarios. For developers interested in the open AI hardware ecosystem, Libtt is a project worth following.
Related articles

Nothing CMF Buds 2A Drops to $17.89 on Black Friday: A New Low for ANC Earbuds
Nothing CMF Buds 2A wireless earbuds Black Friday deal: just $17.89 on Amazon, about $11 off retail and a record low. ANC earbuds at an entry-level price.

When AI Creation Gets Accused of "Spitting": Hacker News Heats Up Over the Glaude Controversy
A Hacker News post, "Spitting in the Face of Glaude," sparks debate on AI creation transparency and attribution ethics. This analysis examines the blurred creator identity behind the controversy and offers practical advice for AI content production.

Akai Embraces Custom Firmware: MPC Sample 1.4 Lets Users AI-Program Their Sampler
Akai embraces the modding community with MPC Sample 1.4 firmware, supporting vibe-coded custom firmware and effects. We analyze the impact of this open strategy on music hardware and AI-assisted programming.