Repository navigation
[Experiments] tpu_validation: sim-vs-TPU comparison pipeline for gemm and softmax - #345
Merged
student-Jungmin merged 1 commit intoOct 12, 2026
Merged
Conversation
…re with the measured latency run.py takes the shapes of a tpu-perf-archive table (gemm, softmax on v6e), runs each through PyTorchSim on the v6e timing config without the L2 cache, and compare.py reports sim_ns / tpu_ns per shape with the same summary for every op (median, IQR, min, max, MAPE). A run is a tag directory holding the exact config, the frontend / compiler / archive commits, results and logs; it resumes, and refuses a tag reused on another config.
student-Jungmin
force-pushed
the
tpu-validation-pipeline
branch
from
October 12, 2026 10:07
5ef603a to
15d1e4c
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.
What
experiments/tpu_validation/: one command that simulates the shapes of a real-TPU table and reports how the simulated latency compares with the measured one. gemm and softmax go through the same code and get the same summary, so they can be read side by side.PSAL-POSTECH/tpu-perf-archive(data/v6e/<op>/torchxla.csv), cloned on first use or taken from$TPU_PERF_ARCHIVE.configs/tpuv6e_nocache.yml, the shippedsystolic_ws_256x256_c1_simple_noc_tpuv6e_timing_only.ymlwith the L2 cache off.--set KEY=VALUEchanges a line for a variant (e.g.vpu_num_lanes=128).sim_ns = cycles * 1000 / core_freq_mhzof the run's config;sim_over_tpu = sim_ns / latency_ns. Summary: median, IQR, min, max, MAPE for all shapes, for TPUstatus == ok, and per bucket.--timeoutis killed with the simulators it spawned and logged infailed.csv.Only new files under
experiments/tpu_validation/; nothing existing changes. See its README for options and outputs.Tested
On this branch (rebased on 3e42fdc) with the compiler it pins (65fb058), TOGSim and the device extension built in the tree:
1/32/128 x 384 x 384and softmax8x128,12x128run end to end: archive clone, simulation,compare.csvand summary.Earlier, on frontend 3984351 with compiler 670ae21:
--set vpu_num_lanes=128 --set core_freq_mhz=1750variant.compare.pyon those sweeps' full results (95 gemm, 58 softmax shapes) reproduces their summaries.1x128, which hangs), resume and the tag guard.The full tables were not swept through this code.
Known issue
Softmax shapes with
R = 1hang in gem5 while the kernel is compiled; the README says to pass--drop R=1.