Skip to content

Conversation

@ashokkumarkannan1
Copy link
Contributor

@ashokkumarkannan1 ashokkumarkannan1 commented Aug 18, 2025

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

  • New/Existing tests provide coverage for changes

Example Transformation Comparison

Before Fix
Screenshot 2025-08-18 at 1 22 32 PM

After Fix
Screenshot 2025-08-18 at 1 21 32 PM

@ashokkumarkannan1 ashokkumarkannan1 force-pushed the akannan/fix_broadcast_issue branch 2 times, most recently from 6d74871 to 6c448ac Compare August 18, 2025 08:05
@codecov-commenter
Copy link

codecov-commenter commented Aug 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.74%. Comparing base (856ebd6) to head (38eac39).

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.
📢 Have feedback on the report? Share it here.

@ashokkumarkannan1 ashokkumarkannan1 self-assigned this Aug 18, 2025
@ashokkumarkannan1 ashokkumarkannan1 marked this pull request as ready for review August 19, 2025 07:24
@ashokkumarkannan1 ashokkumarkannan1 force-pushed the akannan/fix_broadcast_issue branch 3 times, most recently from 83dee56 to 62e12b9 Compare August 25, 2025 10:26
@ashokkumarkannan1 ashokkumarkannan1 force-pushed the akannan/fix_broadcast_issue branch 3 times, most recently from 5bd202e to 115f57c Compare September 9, 2025 05:36
@ashokkumarkannan1 ashokkumarkannan1 force-pushed the akannan/fix_broadcast_issue branch 2 times, most recently from 50b8fcc to 155582a Compare September 11, 2025 03:18
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.
@ashokkumarkannan1 ashokkumarkannan1 force-pushed the akannan/fix_broadcast_issue branch from 155582a to 38eac39 Compare September 19, 2025 09:14
@ashokkumarkannan1 ashokkumarkannan1 marked this pull request as draft October 6, 2025 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants