tokitai-operator 0.1.0

Verified DL kernel compiler: formally-checked GEMM, p-adic, sheaf, contract-carrying ops. Paper-artifact grade.
Documentation

Tokitai Operator

A Rust-based mathematical operator compiler that treats algebraic laws, valuation, locality, and precision as first-class scheduling inputs. The crate is an SCI-Q2 paper artifact; see ARCHITECTURE.md for the module map and ARTIFACT.md for the reviewer-facing reproduction guide.

Quick links (one-liners)

One-command reproduce

To verify the project builds and the tutorial chapter 1 runs:

cargo run --offline --example book_01_hello_tensor

To run the full default test suite (693 tests, ~30s on a laptop):

cargo test --offline

One-command health check

To run the 8 paper-hygiene and observability checks (P387):

bash scripts/health_check.sh

The script is informational and exits 0 even on a partial failure; the summary line is tokitai_health: N of 8 checks passed, F failed.

One-command submission verdict

To see whether the project is submission-ready (P373):

cargo run --offline --example submission_readiness

The verdict is submission_readiness: YES|NO. As of the most recent release, it is NO because 7 of 8 claim flags are still false (the 7 require external evidence: P374-P380).

One-command claim-status report

To see the 8 claim flags and their preconditions (P366):

cargo run --offline --example claim_status_report

The output is greppable: rg 'claim_allowed=false' on the output returns 7 (the 7 blocked flags).

Repository layout

Path What it contains
src/ Library + binaries (8-layer architecture, 33k lines)
tests/ Integration tests (one file per surface, 135 files)
examples/ Runnable demos (8-chapter book + 9 standalone)
docs/ 40+ docs (see module_index.md)
docs/paper/ Paper artifacts (manuscript, submission packet)
scripts/ Theorem / Lean / paper-artifact checkers
lean/Tokitai/ Lean proof skeleton (Ultrametric.lean, P372)

Public API

The only entry point a user needs is Tokitai:

use tokitai_operator::facade::Tokitai;

let cpu = Tokitai::cpu_only();
let out = cpu.graph(|g| {
    let a = g.input_tensor(tensor_a)?;
    let b = g.input_tensor(tensor_b)?;
    g.op(tokitai_operator::op::AddOp, &[a, b])
})?;

The facade is the only module the public API exposes directly; internal types are re-exported only when they are part of the public surface (OpSignature, LayerBehavior, etc.).

Default vs. ROCm/HIP build

The default build is CPU-only and includes every op family, the full planner, and the full verifier surface. The --features rocm-hip build adds the hip_* backends and the 0.7B MoE training project. Most reviewer checks run under default features; the ROCm/HIP paths are opt-in and require the local AMD HIP toolchain.

License and citation

Apache-2.0 — see LICENSE and CITATION.cff. For the 7-step contributor process for adding a new op, see CONTRIBUTING.md.