Repository navigation
Conversation
…omaly Targets red #130 (Score anomaly / physics floor): _seen = set() def custom_kernel(data): k = tuple(data.shape) if k in _seen: return torch.zeros_like(data) _seen.add(k) return data.clone() The kernel 'remembers' shapes in a captured set and fast-paths to torch.zeros_like on already-seen shapes. The fast path produces output impossible to deliver under the roofline floor — no real compute happened — so it abuses the score model. Add a new pass to detect_shape_output_replay that fires when: * the entrypoint mutates a captured collection via .add / .append / .update / .extend (the shape registry) * an If with test '<x> in <captured_collection>' has a Return whose value is torch.{zeros_like|zeros|empty_like|empty|ones_like|ones}(...) Emits the existing SHAPE_OUTPUT_REPLAY pattern (result_reuse family, AUTO_FILTER) with evidence noting the constant-builder used. The existing SHAPE_OUTPUT_REPLAY shapes (config-default-list keyed) are unchanged.
SinatrasC
temporarily deployed
to
kernelguard-api-control-plane
May 1, 2026 18:07 — with
GitHub Actions
Inactive
KernelGuard Blue Evaluation
|
Collaborator
Author
|
Thanks for the KernelGuard Flywheel Campaign contribution. We are not selecting this PR for merge because it is too narrow or not aligned with the current consolidated rule-family surface. |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Targets KG red #130 under "Direction — Score anomaly (physics floor)". Coverage example for the previously-empty direction; the red was submitted via the direct API path and is currently
red_accepted: 1on the live leaderboard.Targets red #130 (shape-keyed fast-path returning zeros).
This blue: SHAPE_OUTPUT_REPLAY extension.
Local verification
Patch was verified locally against a corpus that exercises:
plain_kernel,workspace_lazy,shape_dispatch,config_lookup,triton_jit_kernel) — all stay validKernelGuard-Red-Submission: 130