Skip to content

Add canonical kernel contract stubs - #1

Merged
ehartford merged 1 commit into
mainfrom
agent/normalize-kernel-contract
Jul 27, 2026
Merged

Add canonical kernel contract stubs#1
ehartford merged 1 commit into
mainfrom
agent/normalize-kernel-contract

Conversation

@ehartford

@ehartford ehartford commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Adds the shared normalized operation and ABI headers.
  • Adds the CPU canonical dispatcher and planned-operation stubs.
  • Adds a machine-readable stub inventory and capability-gap report.

Why

CPU maps the complete observed union, so its generated stubs cover only the 74 planned practical inference and fused contracts. Existing CPU typed APIs remain unchanged behind the adapter layer.

Checks

  • Canonical headers compile as C++17.
  • Generated files pass umbrella synchronization and YAML reconciliation checks.
  • Stub dispatch behavior was exercised for planned and observed operations.
  • git diff --check passes.

The pre-existing unrelated CPU worktree changes were not included in this PR.

Summary by CodeRabbit

  • New Features

    • Added a standardized backend contract for kernel invocation, status reporting, tensor metadata, and operation descriptors.
    • Added a catalog of 303 recognized operations with searchable metadata.
    • Added CPU dispatch coverage and registered stubs for 74 operations.
  • Documentation

    • Added a CPU capability report confirming no recorded semantic-operation or quantization-format gaps.
    • Documented capability evidence and stub registry context.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c6bac700-0323-4fe1-b6c8-23c75eff80fe

📥 Commits

Reviewing files that changed from the base of the PR and between 0159223 and a6824b1.

📒 Files selected for processing (6)
  • .quixicore/kernel-stubs.yaml
  • docs/capability-gaps.md
  • include/quixicore/contract/kernel_abi.hpp
  • include/quixicore/contract/operations.hpp
  • include/quixicore/cpu/contract.hpp
  • include/quixicore/cpu/contract_stubs.hpp

📝 Walkthrough

Walkthrough

Adds a backend-agnostic kernel ABI, a 303-operation catalog, 74 CPU contract stubs, a CPU dispatch adapter, and capability inventory metadata documenting current stub coverage.

Changes

CPU Contract Adapter

Layer / File(s) Summary
ABI and operation catalog
include/quixicore/contract/kernel_abi.hpp, include/quixicore/contract/operations.hpp
Defines kernel invocation types, status helpers, operation identifiers, descriptors, and a compile-time catalog of 303 operations.
CPU stub registry
include/quixicore/cpu/contract_stubs.hpp, .quixicore/kernel-stubs.yaml, docs/capability-gaps.md
Adds 74 non-implemented CPU stubs, their descriptor registry, manifest metadata, and capability-gap documentation.
CPU dispatch routing
include/quixicore/cpu/contract.hpp
Routes operation identifiers to CPU stubs and reports unhandled operations through adapter status helpers.

Estimated code review effort: 4 (Complex) | ~45 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/normalize-kernel-contract

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ehartford
ehartford marked this pull request as ready for review July 27, 2026 17:49
@ehartford
ehartford merged commit f493ca2 into main Jul 27, 2026
1 of 6 checks passed
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