Skip to content

Reject deferred Tensor outputs in PMPP v2 checkers - #174

Merged
msaroufim merged 1 commit into
mainfrom
fix-pmpp-v2-materialized-outputs
Nov 5, 2026
Merged

msaroufim merged 1 commit into
mainfrom
fix-pmpp-v2-materialized-outputs

Conversation

@msaroufim

@msaroufim msaroufim commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

A Tensor subclass can move the actual kernel into torch_function, so it runs only when the correctness checker reads the returned object. This can pass value comparisons while the timed custom_kernel call performs no GPU work.

Require an ordinary materialized torch.Tensor before reading any output property or invoking any output operation. Document that contract for all eight PMPP v2 tasks. Add eight independently authored regression cases whose subclass hooks raise if the checker invokes them; all are rejected without dispatching user code.

Validation: 126 CPU tests, Ruff, diff checks and GitHub CI pass. An isolated A100 reproduction of the deferred scan is rejected by the new guard; inspecting its backing storage with subclass hooks disabled independently finds all 1023 values wrong. The historical audit uses that raw-storage check so an eager subclass alone does not trigger score invalidation. The preceding change's 32 positive controls return ordinary materialized tensors and remain compatible. No contestant source is included.

@msaroufim
msaroufim marked this pull request as ready for review November 5, 2026 10:10
@msaroufim
msaroufim merged commit 7b62f5f into main Nov 5, 2026
1 check 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