Skip to content

[Frontend] Make the C++ trace the sole main TOG path; drop legacy ONNX TOG#277

Open
YWHyuk wants to merge 1 commit into
feature/togsim-cpp-tracefrom
feature/remove-legacy-tog
Open

[Frontend] Make the C++ trace the sole main TOG path; drop legacy ONNX TOG#277
YWHyuk wants to merge 1 commit into
feature/togsim-cpp-tracefrom
feature/remove-legacy-tog

Conversation

@YWHyuk

@YWHyuk YWHyuk commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Make the C++ trace (trace.so + trace_cycles.tsv) the sole main TOG path and drop
the legacy ONNX Tile-Operation-Graph from the frontend codegen and the
frontend<->TOGSim connection.

  • extension_codecache: emit only trace.so/trace_cycles.tsv (build-skip keys on
    trace.so); remove the legacy ONNX generation block and the TORCHSIM_LEGACY_TOG
    opt-in.
  • TOGSimulator.run_standalone: always drive TOGSim with --trace_so. The ONNX
    --models_list branch is KEPT solely for the STONNE sparse path (extension_op.py).
  • origins (which FX nodes a kernel came from) is preserved: logged per kernel run
    and recorded as a trailing "# origins:" line in trace_cycles.tsv (the C++
    cycle-table loader stops at the comment, so the current parser is unaffected).
  • Drop the dead tog_file param; migrate scripts/chiplet.sh to --trace_so.
  • Refresh CLAUDE.md TOG-generation notes.

Out of scope (kept)

  • STONNE sparse path (tog_generator/onnx_utility + ONNX) is untouched.
  • TOGSim C++ (TileGraphParser, onnx/protobuf) is untouched -- separate PR.

Verification

  • test_add / test_matmul pass via the trace path (no tile_graph.onnx emitted).
  • ILS mode (TORCHSIM_TLS_MODE=0, all iterations) passes.
  • chiplet (c2_chiplet) runs on the trace path (Total execution cycles produced).

Known limitation

The trace path stubs per-tensor addresses in TOGSim (build_trace_tilegraph), so
chiplet NoC / DRAM-partition accuracy is approximate until the trace path consumes
real addresses (TOGSim-side follow-up). --attributes_list was already not a valid
Simulator option.

…X TOG

The main compile/sim path no longer generates or selects the legacy ONNX
Tile-Operation-Graph. extension_codecache emits only trace.so + trace_cycles.tsv
(the build-skip now keys on trace.so), and TOGSimulator.run_standalone always
drives TOGSim with --trace_so. The TORCHSIM_LEGACY_TOG opt-in is removed from the
frontend. The ONNX --models_list branch is kept solely for the STONNE sparse path
(extension_op.py); TOGSim's C++ ONNX parser is untouched (separate PR).

origins (which FX nodes a kernel came from) is preserved: logged per kernel run
and recorded as a trailing "# origins:" line in trace_cycles.tsv -- the legacy
ONNX TOG carried this as node metadata, and the C++ cycle-table loader stops at
the comment so the current parser is unaffected.

Also drop the dead tog_file param from mlir_gem5_compile_command, migrate
scripts/chiplet.sh to --trace_so/--cycle_table (the trace path stubs per-tensor
addresses and --attributes_list is no longer a Simulator option), and refresh
the CLAUDE.md TOG-generation notes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant