Repository navigation
libtt v0.1.3
libtt v0.1.3 adds (experimental) PyTorch support through torch_tpu, reproducible random generation, and substantial improvements to attention, numerical correctness, and control-flow reliability on Tenstorrent Blackhole.
- Experimental PyTorch support. Run eager and torch.compile workloads with LIBTT_TPU_COMPAT=1, including training with SGD and AdamW. Validated with torch_tpu 0.2.0 and PyTorch 2.14.1. Includes Bazel targets for upstream PyTorch backend tests. Setup instructions.
- Reproducible native RNG. Threefry and Philox kernels now honor seeds and advance RNG state correctly. Fixes torch.manual_seed, generator reproducibility, counter truncation that repeated large draws after 1,024 calls, and repeated values across output shards. Preserves all 64 seed and counter bits along supported state paths. #398.
- Faster JAX attention with lower memory use. Removes unnecessary padding around size-1 dimensions in jax.nn.dot_product_attention, addressing excessive allocations and out-of-memory failures. Recorded O0 timings on a p150a improved from 45.2 to 12.9 ms for forward and 266.5 to 43.4 ms for forward plus backward, using BF16 causal attention with batch 32, eight heads, sequence length 512, and head dimension 64. #412.
- More accurate softmax. FP32 softmax explicitly uses accurate exponentiation, multiplication fidelity, and FP32 accumulation at optimized compilation levels. Rows wider than 1,024 elements retain the faster decomposed implementation. #405.
- Expanded pooling and convolution support. Native FP32/FP16 window sums preserve precision and support larger windows. Fixes include dilated pooling gradients, explicit pooling padding, depthwise-convolution dilation, and window reversal used by transposed convolutions and convolution gradients. #390, #389, #382, #375.
- Broader operator correctness. Adds exact wrapping integer powers and fixes uint8 permutations, reductions, clamp, and padding. Improves batch normalization, small FP32/FP16 vector products, activation fusion, boolean selection, and reshape padding. Complex transposes, conjugate views, dot products, and convolutions reuse existing real-valued kernels.
- More reliable control flow and tracing. Nested conditionals and loops lower correctly; unsupported control flow executes between traces instead of aborting capture. Fixes cached-constant lifetimes and aliased results across loops and branches, while removing redundant trace-output copies. #394, #395, #404, #409, #408.
- Better error reporting and updated dependencies. Execution failures now reach Python with useful diagnostics instead of aborting or returning a bare error code. Updates tt-metal to 614f605, UMD to 5437fe38, and SFPI to 7.87.0. #411, #399.
The recorded full JAX suite baseline improved to 25,868 passed, 1,904 failed, and 6,738 skipped. These counts precede the final fixes in this release.
Float64 operations still execute at float32 precision. RNG sequences differ from other backends, uint64 random outputs contain 32 random bits, and general uint64 arithmetic and control-flow support remain incomplete.
Full changes since v0.1.2.