Add some macro helpers for ProgramOp - #16923
Open
Ian Hincks (ihincks) wants to merge 1 commit into
Open
Conversation
Coverage Report for CI Build 34398811426Warning No base build found for commit Coverage: 88.028%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
Ian Hincks (ihincks)
marked this pull request as ready for review
September 3, 2026 23:27
Ian Hincks (ihincks)
requested a review
from Alexander Ivrii (alexanderivrii)
September 3, 2026 23:27
Collaborator
|
One or more of the following people are relevant to this code:
|
Ian Hincks (ihincks)
requested review from
Matthew Treinish (mtreinish)
and removed request for
Alexander Ivrii (alexanderivrii)
September 3, 2026 23:32
Ian Hincks (ihincks)
force-pushed
the
ihincks/qp-05-arity-macro
branch
from
September 9, 2026 17:39
e2976c3 to
c981417
Compare
OpNodeTypeProgramOp
Every op in the catalogue destructured its operand slice against a pattern and panicked otherwise, which wrote the arity a second time in the panic message. `unpack_operands!` takes the count from `arity()` instead. It is exported because an op defined outside the crate writes the same block. The three reductions differed only in the dtype they produce and in the fold itself, so `reduction_op!` generates what they share and each op supplies `reduce_axis`.
Matthew Treinish (mtreinish)
force-pushed
the
ihincks/qp-05-arity-macro
branch
from
September 9, 2026 20:04
c981417 to
92374e7
Compare
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.
This PR adds a macro for unpacking operands that is generic enough for a bunch of
nodes to use. It also adds a macro to help implement op nodes that perform reduction
along an axis, like
Mean.AI/LLM disclosure
Stack created with GitHub Stacks CLI • Give Feedback 💬