-
Notifications
You must be signed in to change notification settings - Fork 25
Fix shape mismatch caused by broadcast-to-TMS #2827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
ashokkumarkannan1
wants to merge
1
commit into
main
Choose a base branch
from
akannan/fix_broadcast_issue
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
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
545aff0 to
7fda764
Compare
6d74871 to
6c448ac
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2827 +/- ##
=======================================
Coverage 62.74% 62.74%
=======================================
Files 156 156
Lines 13248 13248
=======================================
Hits 8312 8312
Misses 4936 4936 ☔ View full report in Codecov by Sentry. |
saiarthiraguram
approved these changes
Aug 19, 2025
saiarthiraguram
approved these changes
Aug 19, 2025
83dee56 to
62e12b9
Compare
5bd202e to
115f57c
Compare
50b8fcc to
155582a
Compare
ashokkumarkannan1
added a commit
to tenstorrent/tt-forge
that referenced
this pull request
Sep 16, 2025
Problem description Add demos for e2e passing models from tt-forge-fe and this Codegen model will be executing e2e once this PR is merged tenstorrent/tt-forge-fe#2827. What's changed This PR adds the demos for codegen models.
155582a to
38eac39
Compare
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
Issue
Problem description
The convert_to_tms transformation during pre-lowering inserts a TMS operation into the cast node, which is unary. This leads to a verification issue, as the cast operation is expected to preserve the original shape after this change the following alvert and distilbert will be facing the config issue,and the post processing of those model is rectified in this #2858
What's changed
The Broadcast Op Mapping and attr mapping is added in lower_to_mlir and modified the Broadcast op in tm.py to include the broadcast_dimension attr and modified the pre_lowering_passes convert_to_tms function to include the check wether the consumer is unary op and then adding the tms by this changes the following models that is block will now execute end to end now.
Core Changes
MLIR Integration: Added Broadcast operation mapping and attribute mapping in lower_to_mlir
TM Operation Enhancement: Modified Broadcast op in tm.py to include broadcast_dimension attribute
Pre-lowering Logic: Enhanced convert_broadcast_ops_to_tms function with unary consumer detection and improved TM insertion
Frontend Node Detection: Added logic to distinguish between user-defined and frontend-transformed broadcast nodes using layer tag patterns
Model Log
bert_onnx.log
albert_basev1.log
clip_onnx.log
codegen_mono.log
codegen_multi.log
codegen_nl.log
distilbert_onnx.log
nanogpt_onnx.log
Checklist
Example Transformation Comparison
Before Fix

After Fix
