feat(kernel): Add validation per family/mode for kernel registration#769
feat(kernel): Add validation per family/mode for kernel registration#769Max191 wants to merge 7 commits into
Conversation
Signed-off-by: Max Dawkins <max.dawkins@gmail.com>
Signed-off-by: Max Dawkins <max.dawkins@gmail.com>
Signed-off-by: Max Dawkins <max.dawkins@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 203e65b8fd
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: Max Dawkins <max.dawkins@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bc1846d24a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: Max Dawkins <max.dawkins@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b97ac8d428
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: Max Dawkins <max.dawkins@gmail.com>
Summary
Adds a new
OperationRegistryto carry operation schemas for each family + mode combination. The purpose of the OperationRegistry is to provide validation for registered kernels and to maintain proper definitions of the semantics of each family and mode. Each operation schema has a reference implementation, which defines the kernel ABI and the semantics of its implementation. Any kernel that is registered under the family + mode matching a specific operation schema is expected to match the semantics and ABI of its reference. The operation schema also provides validation functions for traits and signatures at registration time. When a kernel is registered under a specific family + mode, its traits and signatures will be verified by the schema, ensuring that the traits and signatures match what the operation expects.The OperationRegistry does not change any of the existing functionality, but it adds hooks during registration for validation. Currently, only mha_prefill is added to the registry as an example, but later PRs will add support for each operation.
Test Plan
Added unit tests for the new registry and schemas.