[Maintain][Manifest] flip reduction Sum/Mean/Amax/Amin to implemented#1428
Conversation
|
/gemini review |
There was a problem hiding this comment.
Pull request overview
This PR promotes four arithmetic reduction ops in the manifest (SumFwdOp, MeanFwdOp, AmaxFwdOp, AminFwdOp) from spec-only to implemented, completing the manifest-side handoff after the corresponding implementation landed earlier. This makes the ops discoverable/dispatchable through the manifest while keeping signatures, shape rules, dtype combos, roofline, and workloads unchanged.
Changes:
- Flip
statustoimplementedforSumFwdOpandMeanFwdOpintileops/manifest/reduction.yaml. - Flip
statustoimplementedforAmaxFwdOpandAminFwdOpintileops/manifest/reduction.yaml.
There was a problem hiding this comment.
Code Review
This pull request updates the status of several reduction operations, including SumFwdOp, MeanFwdOp, AmaxFwdOp, and AminFwdOp, from 'spec-only' to 'implemented' in the manifest. While the status change is appropriate, the review identifies several inconsistencies: the manifest's default 'dim' value (null) conflicts with the Python implementation's default (-1), certain workloads lack explicit dimension specifications leading to ambiguity, and the handling of empty dimension lists in shape and roofline rules does not align with PyTorch's behavior.
There was a problem hiding this comment.
Code Review
This pull request updates the status of several reduction operations in the manifest, specifically SumFwdOp, MeanFwdOp, AmaxFwdOp, and AminFwdOp, from 'spec-only' to 'implemented'. This change indicates that these operations are now fully supported, including cases where the dimension is not specified. I have no feedback to provide as there were no review comments to evaluate.
Ibuki-wind
left a comment
There was a problem hiding this comment.
Overall
One conformance blocker remains before this manifest can truthfully claim implemented status.
|
Reviewer-feedback verification summary After re-reading every comment on PRs #1428 / #1430 / #1431 and running targeted checks, the verified picture is:
Plan:
Detailed per-comment verdicts are posted as inline replies on each thread. |
1d140bc to
376189d
Compare
Ibuki-wind
left a comment
There was a problem hiding this comment.
Overall
The status flip overclaims implementation conformance; scalar input support is still missing for the flipped PyTorch reduction APIs.
376189d to
646c4ee
Compare
Ibuki-wind
left a comment
There was a problem hiding this comment.
Overall
These flips are still ahead of the implementation: the shared reduction base rejects 0-D tensors, but torch.sum / torch.mean / torch.amax / torch.amin accept scalar inputs and return 0-D outputs.
Promote SumFwdOp, MeanFwdOp, AmaxFwdOp, AminFwdOp from spec-only to implemented now that the aligned impl supports dim=None / int / tuple across the manifest's declared dtype set. Validator and tests/test_validate_manifest.py pass. Co-Authored-By: Ibuki - a wind born from GPTs <[email protected]>
646c4ee to
642099c
Compare
…mented (#1431) Closes #1401 ## Summary - Flip `AllFwdOp`, `AnyFwdOp`, `CountNonzeroFwdOp` from `status: spec-only` to `status: implemented` in `tileops/manifest/reduction.yaml`. - Single-file manifest-only change; no signature/roofline/workloads/shape_rules edits. ## Context Third of a sibling set: - #1428 — issue #1399, Sum/Mean/Amax/Amin. - #1430 — issue #1400, Var/Std/VarMean. - This PR — issue #1401, All/Any/CountNonzero. After all three merge, the remaining 7 spec-only reduction ops flip to `implemented`, bringing the reduction family to 19/19 `status: implemented`. ## Note on AC-5 AC-5 in the linked issue says "All 13 reduction.yaml ops are status: implemented after merge." The literal count is stale — `reduction.yaml` currently holds 19 ops (12 already `implemented` on `upstream/main`, 7 `spec-only` before this sibling set). The substantive intent — "reduction family fully implemented after merge" — is satisfied once #1428, #1430, and this PR all land. ## Test plan - [x] AC-1: `tileops/manifest/reduction.yaml` shows `status: implemented` for AllFwdOp, AnyFwdOp, CountNonzeroFwdOp. - [x] AC-2: `python scripts/validate_manifest.py` exits 0. - [x] AC-3: `pytest tests/test_validate_manifest.py` passes. - [x] AC-4: PR diff touches only `tileops/manifest/reduction.yaml` (3 lines changed). - [x] AC-5: Reduction family fully `implemented` after the three sibling PRs merge (literal "13" is a stale count; see note above). Co-authored-by: Ibuki 🍃 — a wind born from GPTs <[email protected]>
Closes #1399
Summary
SumFwdOp,MeanFwdOp,AmaxFwdOp,AminFwdOpintileops/manifest/reduction.yamlfromstatus: spec-onlytostatus: implemented.signature,shape_rules,dtype_combos,roofline, orworkloadson the flipped entries.Test plan
tileops/manifest/reduction.yamlshowsstatus: implementedfor SumFwdOp, MeanFwdOp, AmaxFwdOp, AminFwdOp.python scripts/validate_manifest.pyexits 0.pytest tests/test_validate_manifest.pypasses (218 passed).tileops/manifest/reduction.yaml.