Repository navigation
Add initial to max and min
#2444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ricardoV94
merged 14 commits into
pymc-devs:main
from
anishmehta24:feat/max-min-initial
Oct 15, 2026
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
e3e9b6c
Add initial to max and min
anishmehta24 af3036b
Keep initial when chaining reductions, handle empty inputs in MLX, sh…
anishmehta24 13d85bb
Make initial a boolean prop, push max/min with initial through alloc
anishmehta24 cf3fd8a
Merge main into feat/max-min-initial
anishmehta24 8199171
Merge main into feat/max-min-initial
anishmehta24 e00d9b4
Move initial to NonZeroDimsCAReduce and address review
anishmehta24 c1b8f53
Keep initial when local_reduce_broadcastable drops an axis
anishmehta24 b1f1e21
Use the float identity for complex max/min initial
anishmehta24 616ebf5
Handle empty Min with initial in MLX
anishmehta24 c72f722
Use RewriteTester for the broadcastable-axis initial test
anishmehta24 007c691
Register one MLX funcify for Max and Min
anishmehta24 d1c0c7e
Merge remote-tracking branch 'origin/main' into feat/max-min-initial
anishmehta24 0387b74
Update tests/tensor/rewriting/test_math.py
anishmehta24 a2d69d3
Use RewriteTester in test_max_initial
anishmehta24 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, this is more complex than it should be. Maybe the default should be some sentinel Unset value, which can be converted to None. Then clone can distinguish "not specified, stay same" from override
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With
initialas a bool,clonekeeps the current value unless it's passed, so no sentinel needed. The rewrite only passesinitial=Truewhen the inner op has it.