-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add ttnn runtime layout comparisons in debug mode, minor runtime build cleanup #2338
base: main
Are you sure you want to change the base?
Conversation
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.
Dialect changes looks good. I peeked at runtime changes as well, this looks like a really welcome addition!
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.
Great change!
if (NOT TTNN_RUNTIME_ENABLED) | ||
add_library(TTRuntimeTTNNOps INTERFACE) | ||
return() | ||
endif() |
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.
I'm confused, why the NOT
in the condition?
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.
If ttnn runtime is not enabled, we won't build TTRuntimeTTNNOps lib, we'll just add a placeholder interface library that's empty. Only if ttnn runtime is enabled will we actually build the static library
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.
Can you add a comment please?
c5cd973
to
c4b879e
Compare
c4b879e
to
6d634ab
Compare
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.
Awesome, thanks @jnie-TT - A lot in here, some of which I don't fully understand, but don't want to block this welcome addition, so approving. Will aim to look closer later.
Ticket
closes #1313
Part of #2125
Problem description
Currently we have don't have a consistency checker that verifies runtime intermediates are aligned with compiler generated descriptors.
What's changed
This PR adds a debug API (only enabled with
-DTT_RUNTIME_DEBUG=ON
) that compares every runtime tensor with its corresponding flatbuffer descriptor, checking that layouts, memory configs, data types match.Couple mismatches were found, needed to update the following to fix the mismatches:
TTNNDecomposeLayouts
, remove all direct calls to createOp, use the dedicated op creation API instead so that the intermediate layouts are correctTTNNLayouts
, set the default layout of the dps operand of conv2d op to tilized instead of forcing to row major.Also added some minor updates in the cmake files under runtime
Checklist