-
Notifications
You must be signed in to change notification settings - Fork 225
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
[Find2.0][API] Invoker caching and binaries serialization in miopen::Solution #2146
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
DrizztDoUrden
changed the title
Find 2.0 internals update
Invoker and binaries caching in miopen::Solution
May 11, 2023
DrizztDoUrden
changed the title
Invoker and binaries caching in miopen::Solution
Invoker caching and binaries serialization in miopen::Solution
May 11, 2023
DrizztDoUrden
changed the title
Invoker caching and binaries serialization in miopen::Solution
[Find2.0][API] Invoker caching and binaries serialization in miopen::Solution
May 21, 2023
@DrizztDoUrden the |
… be more similar to develop
junliume
approved these changes
Jun 12, 2024
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.
Ping @averinevg @pfultz2 for last round of review
averinevg
approved these changes
Jun 12, 2024
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.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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 updates convolution internals to support the planned features of find 2.0 and some more as a trivial side-effect.
New features:
miopenSolution_t
. This allows zero lookupmiopenRunSolution
calls after eithermiopenFindSolutions
ormiopenLoadSolution
.miopenSetFindOptionAttachBinaries
with default value offalse
that controls binary attachment to solutions. Withfalse
machinery behaves like before the PR + invoker caching.This has been squashed as it was based on another PR and had 120+ commits, most of which were completely unrelated or merges.
Future work:
miopenStatus_t miopenRemoveSolutionBinaries(miopenSolution_t)
can be added to reduce the memory footprint of a solution in case it would be held in memory long-term. This way found solutions may be saved, stripped of binaries and then used.miopenStatus_t miopenCreateBinariesBlob(miopenBinariesBlob_t*)
miopenStatus_t miopenDestroyBinariesBlob(miopenBinariesBlob_t)
miopenStatus_t miopenDetachSolutionBinaries(miopenBinariesBlob_t, miopenSolution_t)
miopenStatus_t miopenAttachSolutionBinaries(miopenBinariesBlob_t, miopenSolution_t)
miopenStatus_t miopensSaveBinaries(miopenBinariesBlob_t, char*, size_t*)
miopenStatus_t miopensLoadBinaries(miopenBinariesBlob_t, const char*, size_t)
Internally it can be done as
with binaries serialized from/to programs in load/save. Detaching from solution would replace program handles with indexes in the vector, removing the duplicates. Reverse for attaching.