-
Notifications
You must be signed in to change notification settings - Fork 104
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
Parallelization over last two dims for tilize/untilize with padding #17790
Open
nardoTT
wants to merge
20
commits into
main
Choose a base branch
from
nardo/perf_sweeps
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.
+1,916
−188
Conversation
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
ntarafdar
approved these changes
Feb 10, 2025
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.
This PR is amazing. Great job @nardoTT
tests/tt_eager/python_api_testing/sweep_tests/pytests/tt_dnn/test_tilize_with_val_padding.py
Outdated
Show resolved
Hide resolved
...ent/tilize_with_val_padding/device/kernels/dataflow/reader_unary_pad_multicore_both_dims.cpp
Outdated
Show resolved
Hide resolved
...ons/data_movement/untilize_with_unpadding/device/untilize_with_unpadding_program_factory.cpp
Outdated
Show resolved
Hide resolved
.../ttnn/operations/data_movement/untilize_with_unpadding/device/untilize_with_unpadding_op.cpp
Outdated
Show resolved
Hide resolved
jvegaTT
reviewed
Feb 11, 2025
@@ -126,10 +126,10 @@ def test_perf_device_bare_metal_vgg(batch_size, model_name): | |||
margin = 0.03 | |||
|
|||
if model_name == "ttnn_vgg11": | |||
expected_perf = 39 if is_grayskull() else 114 | |||
expected_perf = 150 if is_grayskull() else 288 |
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.
This is nearly 4X this is amazing
jvegaTT
reviewed
Feb 11, 2025
jvegaTT
reviewed
Feb 11, 2025
jvegaTT
approved these changes
Feb 11, 2025
bbradelTT
reviewed
Feb 14, 2025
bbradelTT
reviewed
Feb 14, 2025
...ent/tilize_with_val_padding/device/kernels/dataflow/reader_unary_pad_multicore_both_dims.cpp
Outdated
Show resolved
Hide resolved
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
Link to Github Issue #15136
Problem description
Limited parallelization for tilize/untilize along one dimension, which affects the performance
What's changed
This PR adds parallelization along last two dims for tilize/untilize with padding. For large tensors, the operations use more cores and improve the perf by around 30 times for the tests added. The average device samples/s is more than 3.5 times larger for models like vgg11 and vgg16. It is also improved for some Bert tiny tests.
Checklist