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

#0: Fix failing test case for width sharded non-32 multiple output width #16224

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

sankarmanoj-tt
Copy link
Contributor

@sankarmanoj-tt sankarmanoj-tt commented Dec 20, 2024

Problem description

tests/sweep_framework/sweeps/conv2d/short/conv2d_short_sweep.py::test_conv2d_localrun_fail_only[device_params0-input_spec7] test case fails.

What's changed

Fixed width sharded weights preparation, where out_channels % 32 != 0

Checklist

  • Post commit CI passes
  • New/Existing tests provide coverage for changes

@sankarmanoj-tt sankarmanoj-tt marked this pull request as ready for review December 20, 2024 14:51
Copy link
Contributor

@pavlejosipovic pavlejosipovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a regression UT for this?

@pavlejosipovic
Copy link
Contributor

It would be nice to remove this test case from
tests/sweep_framework/sweeps/conv2d/short/conv2d_short_sweep.py failing_parameters = [ array

@sankarmanoj-tt
Copy link
Contributor Author

@pavlejosipovic I've added a UT. It exposed some more bugs, which I have also fixed. I removed the test from the sweep.

@@ -530,20 +530,18 @@ def test_conv_features_multi_device(
@pytest.mark.parametrize(
"batch_size, output_channels, input_channels, input_height, input_width, filter_height, filter_width, pad_h, pad_w, act_block_w_div",
(
(2, 128, 128, 9, 9, 3, 3, 0, 0, 1),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason why where few test cases removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They were unnecessary.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test coverage for width sharding is miniscule as is, but if you think they are not needed ok

@@ -191,6 +192,7 @@ Result conv2d(

if (bypass_halo) {
if (input_tensor_post_tm.layout() == Layout::TILE) {
input_tensor_post_tm = ttnn::reshape(input_tensor_post_tm, input_tensor_post_tm.get_padded_shape());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this reshape here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to_layout was not using the padded shape, and was instead using the logical shape. This was causing an error.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least we should log an issue with unit tests and reference it here.
Would be better if we can just fix to layout.

Halo with untialize is doing this properly?

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.

2 participants