Repository navigation
--result <json>: the run's results as data, the values its end-of-run lines print - #60
Merged
Merged
Conversation
… lines print A consumer reads TOGSim's results by matching its log lines (PyTorchSim's frontend does, with five patterns, and picks template configs by the total it finds). --result writes them as one JSON object when the run ends: the total, the wall clock (models_list), each core's cycles, every unit line (Core [i] and Total; with or without a unit table), each core's DMA line, the DRAM channels and their combination, and each kernel's completion. Each value is recorded where its line prints it (Result.h, result()), unrounded; the lines are unchanged. Without --result nothing is written; a path that cannot be written is refused, exit 1. tests/result/ pins each value against its line, for --tog_so with and without a unit table and for a session of two kernels, and the two edges. The suite: 359 of 360 pass; examples/mistakes fails before this change as after (its valid.so is not found here). The command line is item 3 of docs/compatibility.md, whose rule moves MINOR; the bump to 1.1.0 is left to the maintainer.
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.
What
--result <path>writes the run's results as one JSON object when the run ends, so a consumer no longer has to match the log lines. PyTorchSim's frontend does that today, with five regexes, and picks template configs by the total it finds.The file holds:
version,total_cycles,wall_clock_s(models_list only; null with--tog_so)core_cyclesunits: every unit line,Core [i]andTotal, with or without a unit tabledma: each core's DMA linedram: the channels and their combinationkernels: each kernel's completion (scheduler,kernel_id,started,finished)Each value is recorded where its line prints it (
Result.h,result()), unrounded. The lines themselves are unchanged. Without--resultnothing is written; a path that cannot be written is refused, exit 1. The key table is indocs/output-lines.md("The result file").The completion line's TOG path and operation are left out of the file: both are the placeholder
kernel(main.ccpasses it as the graph's path and name).Tests
tests/result/(5 cases) checks each value in the file against its printed line:--tog_sowith a unit table,--tog_sowithsystolic_array_split: noneand no unit table, and a session of two kernels. It also covers no option (no file) and an unwritable path (refused).examples/mistakesfails the same way before and after this change (itsvalid.sois not found in this environment).Version
The command line is item 3 of
docs/compatibility.md, so this moves MINOR (1.0.0 -> 1.1.0). I left the bump out; please set it as you prefer.Follow-up
PyTorchSim reads this file instead of the log in PSAL-POSTECH/PyTorchSim#446 (draft, waits for this PR and the pin bumps).