Repository navigation
[Repo] Remove TOGSim/ and configs/: they are the TOGSim repository now - #349
Merged
Merged
Conversation
Both tests built a default TOGSIM_CONFIG path under $TORCHSIM_DIR/configs and passed it to a function whose body has no use of the name (checked on the AST: no load of `config` in either body, one call site each). The machine these tests run on is TOGSIM_CONFIG, or config.py's default, as before. The argument and the path go.
… in config.CONFIG_TOGSIM_CONFIG_DIR Sixteen files spelled $TORCHSIM_DIR/configs/<name>.yml for a default machine: the eight experiments, tests/system/test_scheduler.py, the route sweep, and six artifact shell scripts. The directory is moving to the TOGSim repository, so each now takes it from the one place that knows where TOGSim is. The Python files import CONFIG_TOGSIM_CONFIG_DIR; the shell scripts ask the same module (`python3 -c` from $TORCHSIM_DIR) rather than derive the default a second time in bash. The file names are unchanged, and all nine that are named exist in TOGSim's configs/ at 5926a38. CONFIG_TOGSIM_CONFIG_DIR is $TOGSIM_DIR/configs, so with this commit these sixteen stop reading the configs/ still in this tree. Checked: every edited .py parses, every edited .sh passes bash -n, and the shell line prints TOGSim's configs/ with TOGSIM_DIR set to a TOGSim checkout. No experiment or test was run.
…fig from the TOGSim checkout setup_worktree.sh symlinked TOGSim/build/bin/Simulator from the worktree it was run in, so each worktree had a Simulator without a ten-minute build. The Simulator is one build in the compiler checkout now, the same for every worktree, so the block and its message go. The .envrc it writes named $_self/configs/..._tpuv6e.yml; it asks pytorchsim/config.py for the config directory instead, and its MISSING message names the TOGSim checkout rather than the worktree's branch. Checked with bash -n, and by sourcing the generated .envrc with TOGSIM_DIR at a TOGSim checkout: TOGSIM_CONFIG is that checkout's v6e file and exists.
…carries one docker/Dockerfile ran conan, cmake and make in PyTorchSim/TOGSim on every build. The Simulator the tests start is the compiler's third_party/TOGSim/build/bin/Simulator, built once in the compiler's toolchain image, so the step goes. `rm -rf /workspace/PyTorchSim` goes with it. It cleared the PyTorchSim checkout the compiler image used to lay under /workspace for its own TOGSim; the compiler's image has had no such directory since it took PyTorchSim as a submodule (checked in ghcr.io/psal-postech/pytorchsim-triton-backend:670ae217, where /workspace holds no PyTorchSim), and an image that carries third_party/TOGSim is later than that. Not built: it needs a base on a compiler image that carries TOGSim.
…ly the TOGSim build used them Dockerfile.base added three things for the TOGSim build that ran in the app image, and that build is gone. libboost-all-dev, "boost headers for TOGSim's cmake probe": nothing outside TOGSim/ names boost, and TOGSim itself takes boost from conan (its find_package(Boost) is commented out; the compiler's image builds the same TOGSim without the package). With it goes the only apt-get of the file, and the DEBIAN_FRONTEND line that was there for apt, which the compiler image sets anyway. conan 1.56.0: TOGSim's conanfile was its one user. cmake 3.26.4 stays. device/setup.py runs cmake to build torch_openreg, so it is this repository's own requirement; the compiler image already has that version, so the line installs nothing. Checked: device/ at this commit configured and built with `python3 setup.py build_ext --inplace` in ghcr.io/psal-postech/pytorchsim-triton-backend:670ae217, which has no libboost-all-dev (torch 2.10 there, not the 2.14 this file installs). The base image itself was not built. The tag of the base image changes with this file, so CI rebuilds it once.
PSAL-POSTECH/TOGSim holds both, with one exception named below. Its history carries TOGSim/ as it stood here at 7b61c1d (tree ee50e4a at its commit 42e39ee), then 1354021 as its commit b190fc1 (tree 5e4ad4c); that repository's src/ and include/ differ from it only by what it changed afterwards. It imported configs/ as one snapshot (tree 76a8bbe at its commit cb457fb, the tree deleted here). The compiler pins that repository as third_party/TOGSim and this repository reaches it through the compiler: PyTorchSim -> PyTorchSim-Triton-Backend -> TOGSim, one line, where the two repositories used to pin each other. The exception: the TOGSim/ tree this commit deletes is 4c5d50d, which is 5e4ad4c plus ee5f8a4 (#346, a load of what a buffer already holds is not read again; Instruction.h, Core.cc, togsim_trace_bridge.cc). TOGSim does not hold that change at 83f43c8 (v1.3.0). It has to be carried there, and the compiler pin moved to a commit that carries it, or this commit deletes its only copy on this branch line. Removed: TOGSim/ (80 files), configs/ (56 files), .gitmodules (its two entries were TOGSim/extern/booksim and TOGSim/extern/ramulator2, so this repository has no submodule left), and the TOGSim/build/ line of .gitignore and of the two dockerignore files. The compiler pin must be one that carries third_party/TOGSim before this lands; third_party/pytorchsim-triton-backend.json is not moved here.
Six actions/checkout steps (two each in docker-image.yml, pytorchsim_triton_backend.yml and tag_release.yml) said `submodules: recursive` for TOGSim/extern/booksim and TOGSim/extern/ramulator2. .gitmodules is gone with them, so the key fetched nothing. Checked: the three files load as YAML and each checkout step keeps its ref and persist-credentials. Not run on a runner.
…GSim and its configs are Each named TOGSim/ or configs/ as a directory of this repository. The README's configuration section points at the TOGSim repository and $TOGSIM_DIR/configs (and no longer at pytorchsim/extension_config.py, which has been config.py for some time). docs/worktrees.md loses the section on the symlinked binary and says how a modified TOGSim is run instead: its own checkout, named by TOGSIM_DIR. .claude/CLAUDE.md's layout table, environment table, build notes and "where to look" list follow, and its line of conan packages goes, since that list is TOGSim's conanfile and was already one package out of date.
…eckout configs/tpuv6e_nocache.yml named $TORCHSIM_DIR/configs/ramulator2_configs/ HBM3_TPUv6e.yaml, a directory this repository no longer has. The line names $TOGSIM_DIR/configs/... and run.py expands it with config.CONFIG_TOGSIM_DIR, so it resolves whether TOGSIM_DIR is set or the compiler's third_party/TOGSim is used.
YWHyuk
marked this pull request as ready for review
October 13, 2026 05:11
YWHyuk
added a commit
that referenced
this pull request
Oct 13, 2026
The in-tree simulator and its machine configs are removed. Both come from the TOGSim checkout the compiler carries (TOGSIM_DIR). - A config named by a test, an experiment or the sweep is found in config.CONFIG_TOGSIM_CONFIG_DIR; run_mobilenet and run_yolo no longer take a config they never read; tpu_validation reads its DRAM config from the TOGSim checkout. - A new worktree links no TOGSim binary and reads its v6e config from the TOGSim checkout. - The app image builds no TOGSim: the compiler image it stands on carries one. The base image installs neither libboost-all-dev nor conan, which only the TOGSim build used. The checkouts ask for no submodules: this repository has none. - The README, the worktree notes and the repo guide say where TOGSim and its configs are. This removes the in-tree copy of PyTorchSim #346 as well; see the pin commit. PyTorchSim #349.
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.
Branch
togsim-remove(9 commits) ->togsim-dir(stacked, head5ab54226, itself onpytorchsim-triton-backendataaa3ee84). Headd293e1b7.Do not merge before #346's TOGSim change is in PSAL-POSTECH/TOGSim (see "#346"): this PR deletes its only copy on this branch line.
What this is
Stacked on the
TOGSIM_DIR/ TOG names PR. After that PR nothing reads the copy of TOGSim in this tree:TOGSIM_DIRdefaults to the compiler'sthird_party/TOGSimwith no fallback, and the in-tree copy is ABI 15 while the frontend speaks ABI 16. This PR deletes the copy, the machine configs beside it, and everything that existed only to build or find them. It changes no name and no behaviour of the timing path.PSAL-POSTECH/TOGSim holds both, with one exception. Its history carries
TOGSim/as it stood here at7b61c1d2(treeee50e4a5, its commit42e39ee), then13540211as its commitb190fc1(tree5e4ad4c5). It importedconfigs/as one snapshot (tree76a8bbe9, its commitcb457fb, the tree deleted here).#346
The
TOGSim/tree this PR deletes is4c5d50d9:5e4ad4c5plusee5f8a48(#346, "A load of what a buffer already holds is not read again";include/Instruction.h,src/Core.cc,src/togsim_trace_bridge.cc), merged here after the split. TOGSim does not have that change at83f43c8(v1.3.0): nothing under itssrc/orinclude/containstag_scope,wait_scopeorstruct Resident. The patch conflicts inCore.ccandtogsim_trace_bridge.ccagainst bothv1.2.0andv1.3.0, so it needs a port, not a cherry-pick. This PR does not port it. The removal commit's message says the same.Order
togsim-dirmerges intopytorchsim-triton-backend.pytorchsim-triton-backend, which is also what lets CI run on it.docker-image.ymlonly runs for PRs againstmaster,developandpytorchsim-triton-backend, so no CI runs while this PR is stacked.Removed
TOGSim/(80 files) andconfigs/(56 files)..gitmodules. Its two entries wereTOGSim/extern/booksimandTOGSim/extern/ramulator2, so this repository has no submodule left. The sixsubmodules: recursivekeys in the workflows go with it.TOGSim/build/line of.gitignoreand of the two dockerignore files.docker/Dockerfile: the conan, cmake and make step for TOGSim, andrm -rf /workspace/PyTorchSim. The compiler image has not laid a PyTorchSim checkout there since it took PyTorchSim as a submodule.docker/Dockerfile.base:libboost-all-dev(with it the file's onlyapt-get, and theDEBIAN_FRONTENDline the base image sets anyway) andconan==1.56.0.scripts/setup_worktree.sh: the block that symlinked a Simulator into each new worktree.tests/models/MobileNet/test_mobilenet.py,tests/models/Yolov5/test_yolov5.py: aconfigargument and its default path, which neither function body read.Kept, and why
cmake==3.26.4indocker/Dockerfile.base.device/setup.pyruns cmake to buildtorch_openreg, so it is not TOGSim's alone. The compiler image already has that version, so the line installs nothing; it can go if relying on the base image is preferred.Repointed
Sixteen files named
$TORCHSIM_DIR/configs/<name>.yml: the eight experiments,tests/system/test_scheduler.py,scripts/ci/triton_route_sweep.pyand six artifact shell scripts. They take the directory frompytorchsim.config.CONFIG_TOGSIM_CONFIG_DIR. The shell scripts ask the same module withpython3 -crather than derive the default a second time in bash. File names are unchanged, and every config this repository names exists in TOGSim'sconfigs/.experiments/tpu_validation/configs/tpuv6e_nocache.yml(added by #345) named$TORCHSIM_DIR/configs/ramulator2_configs/HBM3_TPUv6e.yaml; it names$TOGSIM_DIR/configs/...andrun.pyexpands it withconfig.CONFIG_TOGSIM_DIR. Any other open PR that names$TORCHSIM_DIR/configsorTOGSim/needs the same treatment.The README,
docs/worktrees.mdand.claude/CLAUDE.mdsay where TOGSim and its configs are, and how to run a TOGSim under development: its own checkout, named byTOGSIM_DIR.Behaviour to know about
docker/Dockerfile.basechanges, so the base image tag changes and CI rebuilds it once more (the pin in the first PR rebuilds it once before that). The tag at this head isthird_party-447a8350e8ea; neither it nor the first PR'sthird_party-6a7b2e2e905cis in the registry yet.pytorchsim/config.pyis not touched here.Verified locally, at head
d293e1b7Same setup as the first PR: the published image of the pin (
688388c7, TOGSim v1.2.0 built in it), this branch mounted asTORCHSIM_DIR,TORCHSIM_TRITON_CODEGEN=1; "v1.3.0" is the same image withTOGSIM_DIRnaming a TOGSimv1.3.0checkout built in it.togsim-dirwith one conflict: the removal commit deletes three files that [TOGSim] A load of what a buffer already holds is not read again #346 modified (modify/delete); resolved by deleting them, and the commit message now says what that loses and names TOGSim's commits as they are after its history was rewritten. The nine commits were then moved ontotogsim-dirat5ab54226unchanged (git range-diffmarks all nine=). The tree at the head differs from the branch as first cut (db243e8a) in the pin line and in whattogsim-dirgained since (its commits 16-17: a Simulator that exits non-zero is aRuntimeError).TOGSim/andconfigs/do not exist at the head and the tree has no gitlink.git grepfor the old paths ($TORCHSIM_DIR/configs,$TORCHSIM_DIR/TOGSim,PyTorchSim/(TOGSim|configs),TOGSim/(src|include|extern|build),TORCHSIM_COMPILE_TOGSIM_DIR) finds two lines, both in.claude/CLAUDE.mdand both describing the new location (third_party/TOGSim/build/bin/Simulator). Two comments still name TOGSim's files without being paths in this tree:experiments/artifact/speedup/run_speedup.sh:46("Current TOGSim/main.cc") andexperiments/tpu_validation/configs/tpuv6e_nocache.yml:2("TOGSim's configs/...").git grep -n -i 'trace producer\|trace_so\|trace\.so\|trace_abi'finds three lines: the old names_STALE_PATTERNSstill clears (codecache.py:39) and the--trace_sothatutil_viewer.pystill accepts from old logs (lines 9 and 25).configs/atv1.2.0and atv1.3.0.tests/ops/elementwise/test_add.py, timing on (tpuv6e): five of five passed on v1.2.0 and on v1.3.0; totals 81, 326, 5889, 639866, 5642 on both, the same as ontogsim-dir. No refusal, no TOGSim warning.experiments/gemm.py, timing on (tpuv6e), a session plus autotune, its config found throughCONFIG_TOGSIM_CONFIG_DIR: finished on v1.2.0 and on v1.3.0, 1799 cycles on both, the same as ontogsim-dir. The typed-grouping deprecation warning appears once per Simulator process, twice in the run (the autotune candidate and the session).tests/system/test_togsim_result.pyandtests/system/test_togsim_exit.py: PASS.spad_capacity/refused.one_byte_overTOG, not a compiler-emitted kernel), as ontogsim-dir:run_standalonein autotune mode raises aRuntimeErrorthat autotune'sexceptcatches,python3 -m pytorchsim.simulator.togsimexits 1, and atorch.npu.simulatorblock that launches it raises.bash -n, the five workflows load as YAML.Verified on this branch as first cut and not repeated at this head:
experiments/tpu_validationrun.build_configexpanding the DRAM path and TOGSim loading the result.device/building withpython3 setup.py build_ext --inplacein a compiler image that has nolibboost-all-dev.docker buildx build --check.Not verified
TORCHSIM_TIMING_MODE=0and does not start TOGSim.run_cycle.sh,run_speedup.sh, the ILS scripts,test_scheduler.py,test_mobilenet.pyandtest_yolov5.pywere not run.