Skip to content

[Feat][Manifest] Add spec-only entries for the 200-operator release plan - #2279

Open
lcy-seso wants to merge 4 commits into
tile-ai:mainfrom
lcy-seso:feat/manifest/new-op-specs
Open

lcy-seso wants to merge 4 commits into
tile-ai:mainfrom
lcy-seso:feat/manifest/new-op-specs

Conversation

@lcy-seso

@lcy-seso lcy-seso commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #2271.

Problems

  • The 24 new ops of the 200-operator plan have no manifest entry, so no contract exists for an implementation to conform to.
  • Nothing checks a spec-only entry against its reference, and the roofline oracle covers implemented entries only.
  • Dtype logic is spelled as dtype-name literals outside the registry, and module constants sit between functions.

Changes

  • Add 24 spec-only entries (table below) and a sampling family; the badge moves from 172/177 to 172/201.
  • New generator attn.sparse_topk_positions; constraints no predicate expresses are caller obligations in the entry comments.
  • tests/test_spec_reference.py runs each entry's reference on its workload rows and checks outputs, written inputs and one rejected call; the roofline oracle now covers spec-only entries.
  • test_public_surface_is_the_manifest requires implemented ⊆ public ⊆ manifest.
  • The dtype registry classifies dtypes (FLOAT8_DTYPES) and formulas query it; module constants move to the top of their modules. Roofline values and validator output are unchanged.
  • Test node delta: +64.
Op Family Issue
INT8QuantPerTensorFwdOp, INT8QuantPerChannelFwdOp, INT8QuantPerBlockFwdOp quantization #2245–#2247
INT4QuantPerGroupFwdOp, SmoothQuantFwdOp quantization #2248, #2249
INT8DequantPerTensorFwdOp, INT8DequantPerChannelFwdOp, INT8DequantPerBlockFwdOp quantization #2250–#2252
FP8QuantPerBlockFwdOp quantization #2253
TopKMaskFwdOp, MinPMaskFwdOp, TopPMaskFwdOp, TopKTopPMaskFwdOp sampling #2254–#2257
SamplingFromProbsFwdOp, ChainSpeculativeSamplingFwdOp sampling #2258, #2259
MultiHeadLatentAttentionPagedFwdOp, MultiHeadLatentAttentionVarlenFwdOp attention #2260, #2261
PagedKVCacheWriteFwdOp, MultiHeadLatentAttentionKVCacheWriteFwdOp, PagedKVCacheGatherFwdOp attention #2262, #2264, #2267
MergeAttentionStatesFwdOp, DeepSeekSparseAttentionPagedFwdOp attention #2265, #2266
FusedQKNormRopeFwdOp norm #2263
KimiDeltaAttentionFwdOp linear_attention #2272

@lcy-seso
lcy-seso requested review from a team and a lite review from Copilot September 27, 2026 15:09

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added the feature New feature or new operator label Sep 27, 2026
@lcy-seso
lcy-seso force-pushed the feat/manifest/new-op-specs branch from 6578f91 to eb0e28a Compare September 27, 2026 15:16
Adds 24 spec-only entries: nine quantization ops, six sampling ops in a new
sampling family, seven attention and KV-cache ops, a fused Q/K RMSNorm plus
RoPE op, and Kimi Delta Attention. Each entry states its reference contract,
workload rows from its issue and a roofline; the counts that depend on
metadata values are functions in tileops.perf.formulas.

The DeepSeek sparse attention rows need per-request top-k positions padded
with -1, which no existing generator yields, so attn.sparse_topk_positions
is added with its test. A spec-only entry may have no class yet, so the
public-surface test requires every implemented entry to be reachable
rather than every entry.
…nstants

The dtype registry now records each dtype's category next to its bits, and
derives FLOAT8_DTYPES from both. The roofline formulas that price an 8-bit
float cache test membership in it rather than naming float8_e4m3fn, the
category primitive reads the registry, and integer promotion asks for the
category instead of listing the integer names. The elementwise workload's
signed-integer branch uses torch's own dtype properties.

Module-level constants defined after the first function or class move above
it, unchanged. An assignment whose value reads a later module-level name, or
calls anything but a pure builtin constructor, stays where it is. Every
manifest row's roofline value and the validator output are unchanged.
… recount their rooflines

test_spec_reference.py runs each new entry's reference, the torch
expression its issue names or FLA's recurrence for Kimi Delta Attention,
on every workload row with data on meta and metadata on the CPU. The
reference's outputs must have the signature's names, shapes and dtypes, it
must write exactly the inputs the call's effects mark written, and one call
the signature rejects must be rejected by the reference too.

The roofline oracle now ranges over spec-only entries as well: the binder
builds a spec-only op from its signature alone, since a recount needs no
implementation. The entries whose traffic follows their metadata get
hand-written recounts of bytes and flops, and the three whose flops alone
follow it get flops recounts.
@lcy-seso
lcy-seso force-pushed the feat/manifest/new-op-specs branch from eb0e28a to c4b5600 Compare September 27, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or new operator

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants