Open Apache-2.0 numeric-format SSOT bridge from t27 (GoldenFloat + MXFP4) to tt-lang kernels.
Project description
tt-lang-t27
Open numeric-format SSOT bridge from gHashTag/t27 (GoldenFloat family, Apache-2.0, Tiny Tapeout silicon) into tenstorrent/tt-lang kernel author workflows.
What this is
A pure-Python side-package -- zero coupling with tt-lang upstream.
Reads the t27 FORMAT-SPEC-001.json registry, validates kernel functions
against bit-precise conformance vectors, and (optionally) hands off to a
Coq formal oracle.
What this is NOT
- Not a fork of tt-lang.
- Not a patch to tt-lang.
- Not a build-time dependency of tt-lang.
- Not a CLA / copyright crossing.
Both repos remain Apache-2.0, separately governed.
Install
pip install tt-lang-t27 # from PyPI (planned)
# or
pip install git+https://github.com/gHashTag/tt-lang-t27
No Coq / no MLIR / no ttnn dependencies.
Quickstart
from tt_lang_t27 import t27_kernel, load_registry, load_vectors
@t27_kernel(
fmt="GF16",
registry_path="format-spec-001.json",
vectors_path="gf16_conformance_v0.json",
)
def my_matmul(a, b):
return a @ b
Every call logs a deterministic provenance tag:
[t27] kernel=my_matmul fmt=GF16 ssot=d9b76c5 tag=0a5ecb845def
[t27] vector-check n=21 fmt=GF16
CLI
tt-lang-t27-conform \
--registry format-spec-001.json \
--vectors gf16_conformance_v0.json
# OK conform=true reasons=0 sha256=<hex>
tt-lang-t27-mxfp4-conform \
--vectors mxfp4_conformance_v0.json
# OK mxfp4_conform=true reasons=0 sha256=<hex>
MXFP4 cross-validation (new in v0.2)
tt_lang_t27.mxfp4 is a pure-Python reference codec for OCP MXFP4
(S1E2M1, block_size=32, E8M0 shared scale). Constants pinned to
tt-metal kMxFp4Params:
block_size = 32scale_bias = 0x7F(E8M0 bias 127)elem_exp_bits = 2,elem_man_bits = 1,elem_exp_bias = 1- saturation
sat_pos_bits = 0x7,sat_neg_bits = 0xF - inf / nan: NotRepresentable
The vectors/mxfp4_conformance_v0.json pack carries 12 32-element blocks
with expected scale byte + 32 nibbles + packed bytes hex. Any reference
implementation (including tt-metal's pack_as_mxfp4_tiles<float>) can
verify bit-exact parity by re-encoding each input_f32 and comparing to
expected_bytes_hex.
Provenance tag formula
sha256(kernel_name || ssot_commit || fmt || anchor_hash)
anchor_hash = SHA-256("phi^2 + 1/phi^2 = 3").
References
Anchor
phi^2 + 1/phi^2 = 3 = L_2 (Lucas number).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tt_lang_t27-0.2.0.tar.gz.
File metadata
- Download URL: tt_lang_t27-0.2.0.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edf0429439f688cdc7f7c23353bffa167b210f97d6402972aab0a3e9ad0494a6
|
|
| MD5 |
20b29073fa549d959c207554c81857de
|
|
| BLAKE2b-256 |
d763732a391e98467a258cb093cf80bbb9d7f6c1c0dd8874aec93f65187fa4f2
|
Provenance
The following attestation bundles were made for tt_lang_t27-0.2.0.tar.gz:
Publisher:
publish.yml on gHashTag/tt-lang-t27
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tt_lang_t27-0.2.0.tar.gz -
Subject digest:
edf0429439f688cdc7f7c23353bffa167b210f97d6402972aab0a3e9ad0494a6 - Sigstore transparency entry: 1754866491
- Sigstore integration time:
-
Permalink:
gHashTag/tt-lang-t27@427e1ccd1165818ed36554f3f5691e9e28d8e99c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gHashTag
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@427e1ccd1165818ed36554f3f5691e9e28d8e99c -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file tt_lang_t27-0.2.0-py3-none-any.whl.
File metadata
- Download URL: tt_lang_t27-0.2.0-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ad1eb5a52fefba127a2003eaf34ccc5452bcd37b626613157285ae5b345f406
|
|
| MD5 |
3bb780f8177b47fdd96f36489e4926cf
|
|
| BLAKE2b-256 |
771c71bb9dfbf5b6f6572c807c550691aefaf36032a130ff0a06f599a80c8139
|
Provenance
The following attestation bundles were made for tt_lang_t27-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on gHashTag/tt-lang-t27
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tt_lang_t27-0.2.0-py3-none-any.whl -
Subject digest:
7ad1eb5a52fefba127a2003eaf34ccc5452bcd37b626613157285ae5b345f406 - Sigstore transparency entry: 1754866494
- Sigstore integration time:
-
Permalink:
gHashTag/tt-lang-t27@427e1ccd1165818ed36554f3f5691e9e28d8e99c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gHashTag
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@427e1ccd1165818ed36554f3f5691e9e28d8e99c -
Trigger Event:
workflow_dispatch
-
Statement type: