-
Notifications
You must be signed in to change notification settings - Fork 54
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
#12376: Support for non-32 Height in Width Sharded Conv2d #12382
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
26c2803
#12376: Support for non-32 Height in Width Sharded Conv2d
sankarmanoj-tt 8889f7d
#12376: Support for non-32 Height in Width Sharded Conv2d
sankarmanoj-tt d9fe62a
#0: Skipped WS Conv2d on Grayskull
sankarmanoj-tt 0441bae
#0: Bug Fix
sankarmanoj-tt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -317,18 +317,21 @@ def run_conv_with_split( | |
assert_with_pcc(torch_output_tensor, torch_out_golden_tensor, pcc=pcc) | ||
|
||
|
||
@skip_for_grayskull() | ||
@pytest.mark.parametrize("device_params", [{"l1_small_size": 16384}], indirect=True) | ||
@pytest.mark.parametrize("stride", [1, 2]) | ||
@pytest.mark.parametrize( | ||
"output_channels, input_channels, input_height, input_width, filter_height, filter_width, pad_h, pad_w, act_block_w_div", | ||
( | ||
(128, 128, 8, 8, 3, 3, 0, 0, 1), | ||
(128, 256, 8, 8, 3, 3, 1, 1, 1), | ||
(576, 576, 8, 8, 3, 3, 0, 0, 1), | ||
(960, 960, 4, 4, 3, 3, 0, 0, 1), | ||
(256, 2048, 8, 8, 3, 3, 1, 1, 8), | ||
(512, 2048, 16, 16, 3, 3, 1, 1, 4), | ||
(768, 768, 8, 8, 3, 3, 1, 1, 1), | ||
(768, 768, 16, 16, 3, 3, 1, 1, 1), | ||
(1280, 1280, 16, 16, 3, 3, 1, 1, 1), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why removed these test cases? |
||
(768, 768, 16, 16, 3, 3, 0, 0, 1), | ||
(1280, 2560, 16, 16, 3, 3, 1, 1, 2), | ||
(1280, 2560, 16, 16, 3, 3, 0, 0, 2), | ||
), | ||
) | ||
@pytest.mark.parametrize( | ||
|
@@ -360,12 +363,6 @@ def test_conv_ws( | |
weights_dtype, | ||
activations_dtype, | ||
): | ||
if is_grayskull(): | ||
if input_channels >= 2048: | ||
pytest.skip("Skipping on grayskull due to insufficient L1") | ||
if input_channels >= 768 and input_height >= 10: | ||
pytest.skip("Skipping on grayskull due to insufficient L1") | ||
|
||
stride_h = stride | ||
stride_w = stride | ||
batch_size = 2 | ||
|
@@ -457,13 +454,15 @@ def test_conv_ws( | |
|
||
# torch_output_tensor is in row major layout and NHWC shape | ||
# NHWC to NCHW | ||
# torch_output_tensor = torch_output_tensor[:, :, : batch_size * out_height * out_width, :] | ||
torch_output_tensor = torch_output_tensor.reshape(batch_size, out_height, out_width, output_channels) | ||
|
||
logger.info(f"Output Shape : {torch_output_tensor.shape}") | ||
torch_output_tensor = torch.permute(torch_output_tensor, (0, 3, 1, 2)) | ||
reader_patterns_cache.clear() | ||
|
||
pcc = 0.94 | ||
passing, pcc_msg = check_with_pcc_without_tensor_printout(torch_output_tensor, torch_out_golden_tensor, pcc=pcc) | ||
logger.info(f"{pcc_msg} Threshold : {pcc}") | ||
if not passing: | ||
logger.error("Fails with PCC ", pcc_msg) | ||
assert passing | ||
|
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do other tests cover these test scenarios on grayskull?
If not, why would these test scenarios note be relevant for grayskull?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are not planning on supporting these new features on gray skull.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the cases in the already existing test (before this PR) supported by grayskull?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of them were skipped, due to an OOM error. The width sharded Conv2d which is tested by this code was implemented to support a wormhole only model.