How mlc-ai/tirx-harness works
TIRx Harness supports agent-driven GPU-kernel authoring, compiler inspection, simulation/checking, and remote execution. The README also describes workload contracts and a knowledge base; the tree shows a wiki-fetch skill but not workload or benchmark-server implementation. The graph includes documented capabilities at the subsystem level and limits detailed wiring to relationships supported by the sampled source and README.
Main entry points: api.py NumSim API · frontend.rs TIRx frontend · setup.py Run preparation · checker_runner.py Checker runner
Components 23
Kernel authoring
- Skills and references
skills/tirx-wiki - Workload contracts
Compiler frontend
- TIRx frontend
tirx_harness/frontend-rs/src/analyze/frontend.rs - Static analysis
tirx_harness/frontend-rs/src/analyze/mod.rs - Operation registry
tirx_harness/frontend-rs/src/registry.rs - Kernel emitter
tirx_harness/frontend-rs/src/emit/mod.rs
Simulation and analysis
- NumSim API
tirx_harness/src/tirx_harness/numsim/api.py - NumSim transpiler
tirx_harness/src/tirx_harness/numsim/transpiler/frontend.py - Host bindings
tirx_harness/src/tirx_harness/numsim/bindings.py - Simulation engine
tirx_harness/src/tirx_harness/numsim/engine-rs/src/kernel_engine.rs - Correctness checkers
tirx_harness/src/tirx_harness/numsim/checkers.py - Checker runner
tirx_harness/src/tirx_harness/numsim/checker_runner.py - Run reports
tirx_harness/src/tirx_harness/numsim/report.py
Agent preparation
- Run preparation
evolution/setup.py - Agent prompts
evolution/prompts/render.py - Worktree guards
evolution/preparation/guards.py
Remote execution
- Remote client
evolution/remote/kcoral_remote.py - Remote tool runners
evolution/remote/kcoral_tool.py - Remote worker
evolution/remote/kcoral_tool_worker.py
Other components
- Programming agent
- TIRx-lite DSL
- Benchmark server
- GPU execution environment
Connections 22
- Programming agent → TIRx-lite DSL: authors kernels
- Programming agent → Skills and references: consults
- Programming agent → Workload contracts: follows workload
- TIRx-lite DSL → TIRx frontend: submits IR
- TIRx frontend → Static analysis: analyzes
- TIRx frontend → Operation registry: dispatches operations
- TIRx frontend → Kernel emitter: emits kernel
- Programming agent → NumSim API: runs simulation
- NumSim API → NumSim transpiler: translates kernel
- NumSim API → Host bindings: normalizes inputs
- NumSim API → Simulation engine: executes simulation
- NumSim API → Checker runner: runs checks
- Checker runner → Correctness checkers: dispatches checks
- Checker runner → Run reports: produces report
- Programming agent → Run preparation: prepares run
- Run preparation → Agent prompts: renders guidance
- Run preparation → Worktree guards: configures protections
- Run preparation → Remote client: configures remote runs
- Remote client → Benchmark server: submits benchmark
- Remote tool runners → Remote worker: dispatches tools
- Remote worker → GPU execution environment: runs GPU work
- Remote worker → Benchmark server: returns results