-
Notifications
You must be signed in to change notification settings - Fork 21
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
#8536: Allow in0 and output to be sharded on different grids for mcast 1D in0 #8614
Merged
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
TT-BrianLiu
requested review from
eyonland,
arakhmati,
cfjchu,
xanderchin and
bbradelTT
as code owners
May 17, 2024 18:31
This is a current draft with width sharded (mcast in0) working. Remaining TODOs:
|
TT-BrianLiu
force-pushed
the
jedi
branch
3 times, most recently
from
May 22, 2024 20:02
4c0c512
to
04af587
Compare
TT-BrianLiu
changed the title
#8536: Allow in0 and output to be sharded on different grids for mcast 1D in0 and mcast 2D matmuls
#8536: Allow in0 and output to be sharded on different grids for mcast 1D in0
May 22, 2024
TT-BrianLiu
force-pushed
the
jedi
branch
3 times, most recently
from
May 22, 2024 21:32
a675d69
to
9e755f9
Compare
arakhmati
approved these changes
May 22, 2024
… for mcast 1D in0 - Fully decouple in0 sender (ie. has in0 data) and receiver (ie. cores that produce work) grids - This means user can now width shard in0 K and specify per_core_N that divides output width on arbitrary number of cores - See tests/ttnn/sweep_tests/sweeps/sweeps/matmul/short/matmul_user_program_config_mcast_1d.py for examples Changes: - Remove this assert: TT_FATAL(div_up(N, per_core_N) == input_tensor_a.shard_spec().value().grid.num_cores()); - Separate in0 sender/recv cores into 3 kernel quadrants so all new logic is compile time * in0_mcast_cores_with_work_and_in_receiver_grid * in0_mcast_cores_without_work_and_in_receiver_grid * in0_mcast_cores_without_work_and_not_in_receiver_grid - Only load compute and writer kernels onto cores that produce output work - For interleaved in0, only mcast to cores with work as well; if single core, skip mcast - Add new short matmul sweep to test mcast 1D matmul with different in0 and output grids - Fork tt_eager/tt_dnn/op_library/bmm/kernels/dataflow/reader_bmm_tile_layout_in0_sender_receiver_padding_block_sharded.cpp to *width_sharded.cpp - TODO: Merge these kernels back once mcast 2D matmul is uplifted to support this feature
Passing pipelines:
|
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.
Changes: