Skip to main content

Crate tokitai_operator

Crate tokitai_operator 

Source
Expand description

Tokitai operator library: a mathematical operator compiler.

Tokitai treats algebraic laws, valuation, locality, and precision as first-class scheduling inputs. The crate is organized as 8 layers:

  1. facade — the public Tokitai handle, the only entry point a user needs.
  2. objectTensor, ObjectMeta, Shape, Representation.
  3. irSemanticGraph and the closure-based DSL.
  4. plannerHeuristicPlanner, LoweringRule, obligations.
  5. opOperator trait, OpSignature, and the per-family op modules (arithmetic, shape, nn, index, reductions).
  6. domainDomainId, Contract, Claim, Evidence.
  7. backendCpuScalarBackend (default), GpuScaffoldBackend, hip_* (gated on rocm-hip).
  8. verifyaudit_report, release_gate, claim_status, support_matrix. This is the source-of-truth for the paper claim boundary.

The default feature set is CPU-only and includes all op families, all planner policies, and the full verifier surface. The rocm-hip feature (opt-in) adds the hip_* backends, the 0.7B MoE training project, and the model server.

For the architecture overview and the per-claim support matrix, see ARCHITECTURE.md. For the claim-boundary code, see src/verify/mod.rs. For the public surface index, see docs/operators.md.

Re-exports§

pub use error::Error;
pub use error::Result;

Modules§

backend
Backend surface: CPU, GPU scaffold, ROCm/HIP, memory, conformance.
dataset_bridge
Phase 2.5: lightweight bridge from the tokitai-search SQLite ledgers to the 0.7B MoE training loop.
domain
Domain surface: p-adic, finite field, contract primitives.
error
The Error and Result types shared by the whole crate.
facade
The public Tokitai facade: the only entry point a user needs.
ir
Intermediate representation: SemanticGraph, DSL, scheduling.
metrics
JSONL-backed metrics logger for the training step driver.
object
Object system: Tensor, ObjectMeta, Shape, Representation.
op
Operator surface: the public types and families.
planner
Planner: HeuristicPlanner, obligations, cost model.
theory
Theory-aware p-adic and sheaf glue-check policies.
verify
Verification surface: audit_report, release gate, claim status.