Add concretize() fallback for ReduceSymbolicExpr#317
Merged
mark14wu merged 3 commits intosupport-tl-max-1-argmax-argmin-z3from Mar 13, 2026
Merged
Add concretize() fallback for ReduceSymbolicExpr#317mark14wu merged 3 commits intosupport-tl-max-1-argmax-argmin-z3from
mark14wu merged 3 commits intosupport-tl-max-1-argmax-argmin-z3from
Conversation
Add _NUMPY_REDUCE_OPS mapping and concretize() method so that reduce expressions can fall back to concrete NumPy evaluation when the Z3 path is not needed (e.g. for simple constant inputs). argmax/argmin results are cast to int32 to match the declared dtype. GPC: support-tl-max-2-concretize
This was referenced Mar 6, 2026
89d0f6e to
268d94c
Compare
f9ee11c to
2c8c0c7
Compare
2 tasks
Jokeren
approved these changes
Mar 9, 2026
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
_NUMPY_REDUCE_OPSmapping for concrete NumPy evaluationReduceSymbolicExpr.concretize()method as fallback when Z3 path is not neededint32to match the declared dtypeTest plan
pytest tests/unit/test_sanitizer.py::test_reduce_argmax_argmin_concretize_dtype -xvs[FEAT] Add concretize() fallback for ReduceSymbolicExpr
Add _NUMPY_REDUCE_OPS mapping and concretize() method so that reduce
expressions can fall back to concrete NumPy evaluation when the Z3
path is not needed (e.g. for simple constant inputs). argmax/argmin
results are cast to int32 to match the declared dtype.
PR chain
you're doing. This PR is part of a chain of PRs, and clicking the merge
button will not merge it into master.