Repository navigation
[Frontend] PyTorchSimFrontend, PyTorchSimCodegen and Simulator: one package per layer - #326
Merged
student-Jungmin merged 1 commit intoOct 9, 2026
Conversation
…ackage per layer
PyTorchSimFrontend/triton_backend/ held the whole codegen route and the
devices that run its kernels, under a name that only distinguished it from
the MLIR route, which is gone. Its 22 modules move by role:
PyTorchSimCodegen/ Inductor's Triton codegen for npu, the kernel spec and
source fixups, and the bridge that runs
PyTorchSim-Triton-Backend and caches its kernel objects
Simulator/ what runs a kernel object: Spike (functional,
spike_run), gem5 (gem5, trace_build), TOGSim (timing,
beside simulator.py), and session/breakdown
PyTorchSimFrontend keeps the graph side: extension_config and
rewrite_fx_graph. Dependencies run Frontend -> Codegen -> Simulator; the
Simulator modules still read the kernel object through Codegen's
compiler_bridge, launch and layout. No module's code changes beyond its
imports, the generated wrapper's logger name and the spec header's path.
Verified on a cleared cache: test_add, test_matmul, test_gqa,
test_complex_to_real, test_topk, test_eager, test_patch_scope pass; in
timing mode test_add and test_matmul_vector pass with the same cycles as
before the move (100/336/6056/637233/5475, 1559/1570).
This was referenced Oct 23, 2026
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.
Splits
PyTorchSimFrontend/triton_backend/(22 modules) by role. The name only distinguished it from the MLIR route, which is gone, and it held both the codegen route and the devices that run its kernels.Dependencies run Frontend -> Codegen -> Simulator; Simulator still reads the kernel object through Codegen's
compiler_bridge,launchandlayout. Code is unchanged beyond imports, the generated wrapper's logger name and the spec header's path. References in torch_openreg, tests, scripts, workflows, Dockerfile.base comment, docs/worktrees.md and CLAUDE.md follow; README is untouched.Verified (cleared cache, PTB main a65cc41, ABI 15)