Skip to content
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

conv2d op bias fix #1353

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

ashokkumarkannan1
Copy link
Contributor

Ticket

tenstorrent/tt-mlir#1533

Problem description

'ttnn.conv2d' op Bias must only have data on the final dimenstion

What's changed

  1. Updated the test scripts
  2. Updated the convolution decomposition
  3. Updated the pass

Description

The conv2d bias will be fused during the post_initial_graph stage by the fuse_conv2d_bias pass where the bias edge which is added after the conv2d op will be connected to the conv2d port as part of the fusing the old edge attributes of type NCHW will be copied to the new edge as the tms introduce to the conv2d bias edge which causes the layout issue.

The approach to solving this issue involves removal of broadcast dims which is not necessary for the conv2d bias edge ,as we require the bias to be in the shape: (1, 1, 1, C_out) we will add the transpose to the decomposition of the conv2d for maintaining the channel last for the ttnn.

Copy link

TestsPassed ☑️Skipped ⚠️Failed ❌️
TT-Forge-FE Tests675 ran538 passed131 skipped6 failed
TestResult
TT-Forge-FE Tests
pytest
test_nn.test_avgpool3d[shape1-kernel_size1-stride1]❌ failure
test_nn.test_avgpool3d[shape3-kernel_size3-stride3]❌ failure
test_nn.test_avgpool3d[shape5-kernel_size5-stride5]❌ failure
test_mobilenet_v1.test_mobilenetv1_basic❌ failure
test_mobilenet_v3.test_mobilenetv3_basic[mobilenet_v3_large]❌ failure
test_resnext.test_resnext_101_torchhub_pytorch[resnext101_32x8d]❌ failure

Copy link

TestsPassed ☑️Skipped ⚠️Failed ❌️
TT-Forge-FE Tests617 ran474 passed133 skipped10 failed
TestResult
TT-Forge-FE Tests
pytest
test_nn.test_avgpool3d[shape0-kernel_size0-stride0]❌ failure
test_nn.test_avgpool3d[shape2-kernel_size2-stride2]❌ failure
test_nn.test_avgpool3d[shape4-kernel_size4-stride4]❌ failure
test_nn.test_avgpool3d[shape6-kernel_size6-stride6]❌ failure
test_efficientnet.test_efficientnet_timm[efficientnet_b0]❌ failure
test_ghostnet.test_ghostnet_timm[ghostnet_100]❌ failure
test_mobilenet_v2.test_mobilenetv2_basic❌ failure
test_resnet.test_resnet_hf[microsoft/resnet-50]❌ failure
test_resnext.test_resnext_50_torchhub_pytorch[resnext50_32x4d]❌ failure
test_wideresnet.test_wideresnet_pytorch[wide_resnet50_2]❌ failure

Copy link

TestsPassed ☑️Skipped ⚠️Failed ❌️
TT-Forge-FE Tests675 ran538 passed131 skipped6 failed
TestResult
TT-Forge-FE Tests
pytest
test_nn.test_avgpool3d[shape1-kernel_size1-stride1]❌ failure
test_nn.test_avgpool3d[shape3-kernel_size3-stride3]❌ failure
test_nn.test_avgpool3d[shape5-kernel_size5-stride5]❌ failure
test_mobilenet_v1.test_mobilenetv1_basic❌ failure
test_mobilenet_v3.test_mobilenetv3_basic[mobilenet_v3_large]❌ failure
test_resnext.test_resnext_101_torchhub_pytorch[resnext101_32x8d]❌ failure

Copy link

TestsPassed ☑️Skipped ⚠️Failed ❌️
TT-Forge-FE Tests617 ran474 passed133 skipped10 failed
TestResult
TT-Forge-FE Tests
pytest
test_nn.test_avgpool3d[shape0-kernel_size0-stride0]❌ failure
test_nn.test_avgpool3d[shape2-kernel_size2-stride2]❌ failure
test_nn.test_avgpool3d[shape4-kernel_size4-stride4]❌ failure
test_nn.test_avgpool3d[shape6-kernel_size6-stride6]❌ failure
test_efficientnet.test_efficientnet_timm[efficientnet_b0]❌ failure
test_ghostnet.test_ghostnet_timm[ghostnet_100]❌ failure
test_mobilenet_v2.test_mobilenetv2_basic❌ failure
test_resnet.test_resnet_hf[microsoft/resnet-50]❌ failure
test_resnext.test_resnext_50_torchhub_pytorch[resnext50_32x4d]❌ failure
test_wideresnet.test_wideresnet_pytorch[wide_resnet50_2]❌ failure

@ashokkumarkannan1 ashokkumarkannan1 force-pushed the akannan/conv2d_bias_issue branch from bc97c0c to f729548 Compare March 1, 2025 06:09
Copy link

github-actions bot commented Mar 1, 2025

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests617 ran484 passed133 skipped0 failed
TestResult
No test annotations available

Copy link

github-actions bot commented Mar 1, 2025

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests675 ran544 passed131 skipped0 failed
TestResult
No test annotations available

1 similar comment
Copy link

github-actions bot commented Mar 1, 2025

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests675 ran544 passed131 skipped0 failed
TestResult
No test annotations available

Copy link

github-actions bot commented Mar 1, 2025

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests617 ran484 passed133 skipped0 failed
TestResult
No test annotations available

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.

1 participant