Skip to content

feat(kernel): Add validation per family/mode for kernel registration#769

Open
Max191 wants to merge 7 commits into
mainfrom
Max191/validate-kernel-registration
Open

feat(kernel): Add validation per family/mode for kernel registration#769
Max191 wants to merge 7 commits into
mainfrom
Max191/validate-kernel-registration

Conversation

@Max191

@Max191 Max191 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new OperationRegistry to 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.

Max191 added 3 commits July 21, 2026 20:27
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>
@Max191
Max191 requested review from a team as code owners July 22, 2026 15:50

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread tokenspeed-kernel/python/tokenspeed_kernel/contracts/__init__.py Outdated
Signed-off-by: Max Dawkins <max.dawkins@gmail.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread tokenspeed-kernel/test/test_plugins.py
Signed-off-by: Max Dawkins <max.dawkins@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant