Skip to content

util_viewer finds a launch's workdir timing, and --update-allowlist keeps the allowlist's notes - #466

Merged
student-Jungmin merged 2 commits into
pytorchsim-triton-backendfrom
fix/tool-scripts
Oct 24, 2026
Merged

student-Jungmin merged 2 commits into
pytorchsim-triton-backendfrom
fix/tool-scripts

Conversation

@student-Jungmin

Copy link
Copy Markdown
Collaborator

Two tool bugs found while reading the refactor (#449-#460). Each commit carries a test that fails on the old code.

  1. util_viewer joins a log's compile clock from the workdir above its launch directory.
    • Each process launches from <workdir>/launch-<pid>/ (contract.dir_for), so TOGSim is handed the launch directory's tog.so, and the workdir's timing.json sits one level up.
    • util_viewer looked for timing.json beside the tog.so, so neither its automatic lookup nor --timing's join by directory name matched a current log.
    • contract.workdir_of(path) is the inverse of dir_for. util_viewer joins through it, in join_workdir_timing, which is moved out of main.
    • Test: test_breakdown_viewer.
  2. --update-allowlist keeps the allowlist's comments and fails when it drops an entry.
    • It rewrote triton_route_passing.txt from a three-line header, so the ~225 lines of notes above the entries were lost.
    • It returned 0 even when an allowlisted test had failed and so left the list.
    • write_allowlist keeps the comment block above the first entry and returns the entries it drops. The sweep prints them and exits 1.
    • Test: test_route_allowlist, added to the CI matrix beside the other system tests that emit no kernel.

…e its launch directory

util_viewer looked for a run's timing.json beside the tog.so its log names. Since each process launches
from <workdir>/launch-<pid>/ (contract.dir_for), TOGSim is handed the launch directory's tog.so, and the
workdir's timing.json is one level up: neither the automatic lookup nor --timing's join by directory
name matched a current log. contract.workdir_of(path) is the inverse of dir_for, the workdir a path in a
launch directory belongs to; util_viewer joins through it (join_workdir_timing, out of main).

test_breakdown_viewer: a log naming launch-<pid>/tog.so joins the workdir's timing.json; the old lookup
found none.
… it drops an entry

triton_route_sweep.py --update-allowlist rewrote triton_route_passing.txt from a three-line header and
the passing tests, so the 225 lines of notes above the entries went with it, and it returned 0 even when
an allowlisted test had failed and so left the list. write_allowlist keeps the comment block above the
first entry, rewrites the entries, and returns the ones it drops; the sweep prints them and exits 1 when
there are any.

test_route_allowlist (in the CI matrix beside the other system tests that emit no kernel): the header
stays, the entries are replaced, the dropped one is named.
@student-Jungmin
student-Jungmin merged commit abae4ea into pytorchsim-triton-backend Oct 24, 2026
1 check passed
@YWHyuk
YWHyuk deleted the fix/tool-scripts branch October 27, 2026 07:46
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