Repository navigation
[Cleanup] Delete dead code, unused deps and retired-config paths (item 12) - #432
Merged
Merged
Conversation
git grep over the tree (workflows, docs and string imports included) finds no
caller for any of these:
scripts/trace_timeline.py _lane() and the _LANE table only it read
simulator/togsim.py TOGSimProcess.get_core_freq. load_yaml stays: __init__
validates the machine file with it (togsim.py:77)
driver/compiler_bridge.py doctor(). CI and Dockerfile.base run the compiler's own
`pytorchsim-triton-compiler doctor`, not this wrapper
simulator/wallclock.py GEM5_SAMPLE, GEM5_BUILD: no span() records them, and
the report prints only components that were recorded
driver/codecache.py the trace.so / trace_cycles.tsv / trace_units.tsv stale
patterns: nothing reads those names since TOGSim ABI 16
(the artifact is tog_so)
timing.py's CycleSimulator was on the list and stays: run_cycle_binary calls it.
Outputs are unchanged: trace_timeline.py of the parent and of this commit write
byte-identical JSON for all ten TOGSim trace logs of two test_add timing runs, and
the TORCHSIM_BREAKDOWN table of test_add lists the same rows. test_add (functional
and timing), test_cache_identity and test_togsim_exit pass.
Refs #429
It builds the MoE layer on cpu or cuda and asserts nothing; no workflow, allowlist or doc names it. tests/models/MoE/test_moe.py is the npu test of the same layer. Refs #429
example/example.cpp and cmake/GTestTargets.cmake are not reached from device/third_party/openreg/CMakeLists.txt, which also set LIBRARY_TEST ortests and never used it. The README's directory tree and its example section go with them (its tests/ entries named files that were never vendored). `pip install --no-build-isolation -e device` from a clean tree builds libopenreg.so, libtorch_bindings.so and libtorch_openreg.so as before, and test_add passes on it. Refs #429
Nothing in this repository or in PyTorchSim-Triton-Backend's main imports them (git grep for import, import_module and __import__, plus torch.onnx, print_tabular and FxGraphDrawer, which would pull them in through torch). The tile_graph.onnx paths in select.py, timing.py and test_togsim_exit.py are file names, not ONNX. With the three uninstalled from the base image, test_add (functional and timing), test_cache_identity and test_togsim_exit pass. Refs #429
…M_TARGET They exported TOGSIM_CONFIG, which compiler_bridge.target() refuses at import torch, and named configs TOGSim's configs/ no longer ships (#415). run_cycle.sh TORCHSIM_TARGET=tpuv3 (the shipped machine with the retired c1 simple-NoC tpuv3 config's shape), functional mode off as the timing_only config had it. The compiler at the pin refuses tpuv3 (contract/target.py TOGSIM_UNITS knows only vcix_tpuv6e), so the first workload stops on that NoTarget; the comment says the paper's numbers are reproduced on the v1.0.0 image run_speedup.sh, the 2-core and ILS machines they name have no shipped file. run_speed_ils_* They now stop before running anything when the file is not there, naming the v1.0.0 image, instead of reporting simulation_time = NA five times per shape and exiting 0; the ILS scripts hand the machine over as TORCHSIM_TARGET ils_parser.sh deleted: nothing calls it, and it parses `launch ... tile_graph.onnx` lines no log prints any more tests/system/test_artifact_scripts.py fails on the parent for both reasons: the environment run_cycle.sh exports raises "TOGSIM_CONFIG=... is retired", and run_speed_ils_matmul.sh exits 0. Refs #429, #415
…kend by default Its default base was origin/develop, which this repository does not have, so `scripts/setup_worktree.sh <purpose>` stopped at "fatal: couldn't find remote ref develop". docs/worktrees.md said the same default. tests/system/test_setup_worktree.py runs the script in a clone whose origin has only pytorchsim-triton-backend; on the parent it fails with that fatal. Refs #429
YWHyuk
force-pushed
the
item12/dead-code
branch
from
October 23, 2026 08:36
752e9a2 to
1e743dc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #429
Why
Item 12 of the cleanup list: code, files and dependencies that nothing calls or builds anymore, plus artifact/worktree scripts that still named retired configs or the non-existent
developbranch. #241 (its predecessor list) was closed separately:PyTorchSimFrontend/was deleted by 2de193f and a440dfd,extension_config.pybecameconfig.py(8c6cd16), andgit grepfinds 0 hits for every name it listed.What changed (before -> after)
scripts/trace_timeline.py_lane()and_LANE;togsim.pyget_core_freq(load_yamlstays,__init__uses it attogsim.py:77);compiler_bridge.doctor()(CI and the Dockerfile call the compiler's owndoctorCLI);wallclock.GEM5_SAMPLE/GEM5_BUILD(GEM5_RUNstays); thetrace.so/trace_*.tsvpatterns incodecache._STALE_PATTERNStests/models/MoE/test_moe_cpu.pyexample/,cmake/GTestTargets.cmakeand the unusedLIBRARY_TEST ortests; README trimmed to matchdocker/Dockerfile.base:25(no imports in PTS or PTB main)run_cycle.shsetsTORCHSIM_TARGET=tpuv3+TORCHSIM_FUNCTIONAL_MODE=0(was the retired..._tpuv3_timing_only.ymlTOGSIM_CONFIG);run_speedup.sh/run_speed_ils_*.shstop up front when their machine file is missing (pointing to v1.0.0) instead of printing NA and exiting 0; ILS scripts useTORCHSIM_TARGET; deletedils_parser.sh; addedtests/system/test_artifact_scripts.py(refs #415)setup_worktree.sh(default + examples) anddocs/worktrees.mddefault toorigin/pytorchsim-triton-backend; addedtests/system/test_setup_worktree.pyTests (before / after)
Run in a container from
topk-ptb:pts-base-92028c8; new tests from HEAD againstgit archivecopies of each parent.test_setup_worktree.pyon parent 55ab93d: FAILfatal: couldn't find remote ref develop(rc 128) -> PASStest_artifact_scripts.pyon parent 7022cd8: cycle test FAILNoTarget: TOGSIM_CONFIG=...systolic_ws_128x128_c1_simple_noc_tpuv3_timing_only.yml is retired; ILS test FAILassert proc.returncode != 0(script exited 0) -> PASSpytest tests/system/test_artifact_scripts.py tests/system/test_setup_worktree.py tests/system/test_cache_identity.py tests/system/test_togsim_exit.py: 10 passedVerification
pip install --no-build-isolation -e devicebuildslibopenreg.so,libtorch_bindings.so,libtorch_openreg.so.tests/ops/elementwise/test_add.py: 5/5 functional and 5/5 withTORCHSIM_TIMING_MODE=1, with onnx/pydot/tabulate uninstalled.trace_timeline.pygive byte-identical JSON on 10 TOGSim trace logs;TORCHSIM_BREAKDOWNtable rows identical.git grepat HEAD returns 0 hits forget_core_freq,_lane(,_LANE,GEM5_SAMPLE,GEM5_BUILD,trace.so,test_moe_cpu,ils_parser,GTestTargets,ortests,pydot,tabulate. Remainingdoctor/onnxhits are the compiler CLI and file names.Stacking / dependencies
Based on
origin/pytorchsim-triton-backend069878a; #421 and #423 are already in the base, so nothing is stacked. The base has since moved one commit (5fb15ee, pin bump only inthird_party/pytorchsim-triton-backend.json, no overlap). PTB pin unchanged (1b35878).Open issues
vcix_tpuv6e(pytorchsim_triton_compiler/contract/target.py:37, at 1b35878 / 30fbce3 / main) and the image builds onlylibtpuv6e.so, sorun_cycle.shstops withvcix_tpuv3 is no array unit TOGSim knows. Until PTB supports tpuv3 the script runs only on v1.0.0; its comment says so.TORCHSIM_FUNCTIONAL_MODE=0inrun_cycle.sh:65mirrors the retiredtiming_onlyconfig but is not pinned by a test.run_cycle.sh:59-63comment block is 5 lines.CycleSimulatorwas on the delete list buttiming.py:48calls it, so it stays..github/CONTRIBUTING.md:27and.claude/CLAUDE.md:220still say PRs go againstdevelop(out of scope).TOGSimProcess.config_yamlis assigned in__init__and never read.🤖 Generated with Claude Code
https://claude.ai/code/session_01UnJWSTNtd6944XAzy4bhk5