-
Notifications
You must be signed in to change notification settings - Fork 14
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
[TTNN] Adding support for data type workarounds and introducing Embedding workarounds #1583
Merged
sdjordjevicTT
merged 1 commit into
main
from
sdjordjevic/add_data_format_workaround_infra
Dec 23, 2024
Merged
[TTNN] Adding support for data type workarounds and introducing Embedding workarounds #1583
sdjordjevicTT
merged 1 commit into
main
from
sdjordjevic/add_data_format_workaround_infra
Dec 23, 2024
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
sdjordjevicTT
requested review from
svuckovicTT,
mtopalovicTT,
nobradovictt,
jserbedzijaTT,
jnie-TT and
azecevicTT
as code owners
December 12, 2024 17:03
@sdjordjevicTT can you just add in the PR description example of how IR looks today (without this change), and how it will look with the change? |
sdjordjevicTT
force-pushed
the
sdjordjevic/add_data_format_workaround_infra
branch
3 times, most recently
from
December 20, 2024 14:21
4df3134
to
6da4ac9
Compare
sdjordjevicTT
force-pushed
the
sdjordjevic/add_data_format_workaround_infra
branch
from
December 20, 2024 14:32
6da4ac9
to
2ab9e8a
Compare
mtopalovicTT
approved these changes
Dec 20, 2024
sdjordjevicTT
force-pushed
the
sdjordjevic/add_data_format_workaround_infra
branch
3 times, most recently
from
December 23, 2024 09:37
b595a45
to
0816699
Compare
sdjordjevicTT
force-pushed
the
sdjordjevic/add_data_format_workaround_infra
branch
from
December 23, 2024 09:42
0816699
to
f8a4157
Compare
sdjordjevicTT
deleted the
sdjordjevic/add_data_format_workaround_infra
branch
December 23, 2024 10:38
This was referenced Jan 10, 2025
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.
This PR introduces a solution for handling data type workarounds for operation operands and results. To address input operand data type workarounds, we insert a
toLayout
operation between the input operands and the operation itself. This casts the input to the desired data type. If the data type of the output result changes due to a workaround, we will revert it to the previous data type by inserting aToLayoutOp
after the operation's output.Additionally, this PR provides necessary workarounds to ensure that the embedding operation functions correctly. Specifically, it changes the input to an RM layout and casts both the input weight and the output to bf16. Other ops will be onboarded to this type of workaround in a separate PR.
Example of IR today:
An example of IR with this change where embedding op has bf16 workaround applied for weight operand: