命令行工具

tnpath 负责寻路与保存计划,tnexec 负责加载或现场构造路径并执行,tnmpi 负责 feature-gated 分布式切片执行。

本页目录

tnpath

bash
cargo run --release --bin tnpath -- \
  network.net.json --method auto --preset heavy --seed 0 \
  --save-path plan.json
参数 Auto 中的含义
--preset light 或 heavy
--max-time cooperative 秒数上限
--flops-weight / --read-write-weight per-call objective
--target-size 固定路径切片;CLI Auto 当前不暴露 dynamic mode
--trials Auto 会拒绝;preset 自己解析预算

可选 method 包括 auto、greedy、rgreedy、reconf、bisect、budget、optimal、temper、stemper、treesa、orderdp、import 与 all。不同 method 的参数并不通用,应以 tnpath --help 为准。

tnexec

bash
cargo run --release --bin tnexec -- \
  --net network.net.json --load-path plan.json \
  --single --check

tnpath --save-path 写入 self-contained execution-plan version 2。tnexec 可读取 version 1 和 version 2,但当前命令仍要求显式 --net,并会核对 embedded network 与当前网络;它不会因为 v2 自包含就跳过输入验证。schema-less legacy artifact 只有显式允许时才读取。tnexec 自己现场寻路时只提供 greedy / random-greedy,不等同于完整 Auto。

tnmpi

bash
cargo build --release --features mpi --bin tnmpi
mpirun -n 8 target/release/tnmpi \
  --net network.json --trials 32 --seed 1 \
  --target-size 1048576 --exec