Repository navigation
Phase 3: tiny-tpu backend (Tile IR, tiling, .ttpu.json, real-RTL executor) - #3
Merged
Merged
Conversation
…utor) Lower the legalized Graph IR to a Tile IR schedule of 4x4 chip passes plus host accumulation, with bias/relu epilogues riding on the last accumulation of each output tile. Add the skip-zero-passes tile pass, a static cost model, the versioned .ttpu.json format with a JSON Schema and spec, an independent reference interpreter that reads the JSON, and the single JS executor that runs whole programs on the Verilated tiny-tpu RTL (host work is counted separately from chip passes). `tinyc --target tpu` gains --emit tile|ttpu, --run (real chip, seeded inputs, measured vs estimated cycles) and --stats. Tests: lowering and verifier, tile passes, schema validation, every example bit-exact on the real RTL with measured cycles equal to the estimate, pinned cost numbers, and Hypothesis properties using a TPU-targeted generator (multi-tile shapes, constants with zero blocks, every epilogue form). Also fixes a pass-pipeline bug Hypothesis found: one canonicalize/cse sweep left commutative adds in non-canonical order, so the pipeline was not idempotent. The simplifications now run as a Fixpoint group in the pass manager, with a regression test on the shrunk program.
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.
Stacked on feat/phase-2-graph-passes. Merge the stack in order, starting from the bottom PR.
Commits in this PR: