-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[runtime] Add Metadata classes for AOTExecutor #10282
Conversation
c6022d6
to
2f64ab0
Compare
* These were autogenerated in the original PR, but checking them in as plain code until we can revisit the auto-generator approach.
2f64ab0
to
4d3d047
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.
@areusch I did have a look. My concerns are mostly around docs and I could not follow the need for all these polymorphic objects (maybe its due to missing docs).
Happy to take them in a follow up.
} | ||
}; | ||
|
||
class InMemoryMetadataNode : public ::tvm::target::metadata::VisitableMetadataNode { |
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 provide more explanation for the variants of InMemory* ? Also the reasons for needing a seperate object for that as opposed to having a constructor for MetadataNode
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.
also added docs
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.
@manupa-arm I added a bunch of docs, PTAL when you get a minute!
} | ||
}; | ||
|
||
class InMemoryMetadataNode : public ::tvm::target::metadata::VisitableMetadataNode { |
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.
also added docs
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!
Thank you @manupa-arm and @areusch ! This PR has been merged. |
* Add new Metadata classes and base implementation. * These were autogenerated in the original PR, but checking them in as plain code until we can revisit the auto-generator approach. * address masa comments * Add documentation per Manupa's comments, and move kMetadataVersion namespace. * remove get_name function, used for debugging * clang-format
This PR adds Metadata classes to hold model metadata needed to implement a Module-based Model Runtime interface for AOT. These Metadata implementations are distinct from others in the codebase in that all of the backing data can exist in C as const struct (meaning that on small targets, it can live along with the code in e.g. flash memory).
TODO: add test to verify that metadata.h compiles from a C compiler.
cc @Mousius @manupa-arm @kparzysz-quic @masahi @mehrdadh