Repository navigation
Add end-to-end BatchNorm operator tutorial (Chinese) - #2
Closed
Happy-Carrot with Copilot wants to merge 2 commits into
Closed
Happy-Carrot with Copilot wants to merge 2 commits into
Happy-Carrot with Copilot wants to merge 2 commits into
Conversation
…rification methods Agent-Logs-Url: https://github.com/Happy-Carrot/tt-mlir/sessions/54b40344-8552-4afd-953d-11952443873e Co-authored-by: Happy-Carrot <43030596+Happy-Carrot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Happy-Carrot/tt-mlir/sessions/54b40344-8552-4afd-953d-11952443873e Co-authored-by: Happy-Carrot <43030596+Happy-Carrot@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Happy-Carrot
April 17, 2026 14:01
View session
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.
Ticket
Link to Github Issue
Problem description
The existing "Adding an Op" tutorial (
adding-an-op.md) covers the basics using matmul but lacks depth on normalization ops with multiple inputs, optional operands, multi-output variants, and decomposition patterns. A detailed tutorial using BatchNorm as the reference op was requested.What's changed
Added
docs/src/adding-an-op-batchnorm-tutorial.md— a comprehensive Chinese-language tutorial that walks through all ~25 files touched when adding BatchNorm end-to-end. Uses real code extracted from the existing BatchNorm implementation.Covers 12 steps across the full compiler pipeline:
AttrSizedOperandSegments)createOpdispatch@tag/@parse/@splitmethods,GoldenMapTensorlimitationsAlso highlights key pitfalls:
emitOpError()vsnotifyMatchFailure()in pattern rewriters, attribute type mapping (I32Attr→get_signless), EmitPy positional/keyword arg ordering.Updated
docs/src/SUMMARY.mdto add navigation entry under "Adding an op".Checklist