-
Notifications
You must be signed in to change notification settings - Fork 15
Serialize IRs alongside flatbuffers #947
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
base: main
Are you sure you want to change the base?
Conversation
std::move(original_mlir_code), std::move(executable_name), | ||
m_module_builder->getNumPartitions(), | ||
std::move(original_mlir_code), | ||
std::move(m_module_builder->getTTIRMlirCode()), |
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.
One questionable design decision I made: I made the string getters return a non const reference and move from that reference, leaving the ModuleBuilder with empty strings after constructing an ExecutableImage.
Arguably the interface of buildModule could be refactored to return something like std::expected or StatusOr from compile, instead of returning just the status code and storing results as it's state.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #947 +/- ##
==========================================
- Coverage 68.41% 67.47% -0.94%
==========================================
Files 25 25
Lines 1757 1808 +51
==========================================
+ Hits 1202 1220 +18
- Misses 555 588 +33 ☔ View full report in Codecov by Sentry. |
6933dff
to
059032c
Compare
059032c
to
d699b6a
Compare
Ticket
closes #932
Problem description
Perf team needs TTIR and TTNN MLIR code to be serialized alongside flatbuffer binaries.
What's changed
The compile logic was changed to store MLIR code as necessary and pass it on, all the way to SerializedExecutableInstance class.
Serialization format was changed from just the fb to a custom format that incorporates the needed IRs alongside the fb.
Python side helper function was refactored to work with the new requirements.
Checklist