docs(changelog): correct two stale claims in the v0.12.0 notes - #255
Merged
Conversation
The nan-reduction entry said integer and boolean input is exempt from the new NaN-scan pass, without qualification. That holds for the reductions built on numpy's _replace_nan, but nanmedian, nanpercentile and nanquantile route through _remove_nan_1d, which calls np.isnan whatever the dtype, so they charge the pass at every dtype: on 100 elements nanmedian costs 400 against median's 200 for int32 as well as for float. The code has always been explicit that this is deliberate, and docs/reference/cost-model.md states it correctly; only the release notes were wrong, and they are the notes for the release that opened Phase 2, so they understated which calls got more expensive. The 0-d operand bullet was truncated mid-sentence and said nothing about the change. It also sits under "Costs less" while actually turning a wrongly-refused call into a priced one, which the completed text now says. Also drops a validation term from the symmetry guide's cost estimates: the internal validation pass is not billed, and the guide now notes that Reynolds accumulates in float64 so it is charged at that rate whatever the input dtype.
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.
Found while checking the changelogs for stale values.
The nan-reduction dtype exemption was overstated. The v0.12.0 entry says the new NaN-scan pass is charged "only where NumPy actually performs it: integer and boolean input is exempt", without qualification. That is true of the reductions built on NumPy's
_replace_nan, butnanmedian,nanpercentileandnanquantileroute through_remove_nan_1d, which callsnp.isnanwhatever the dtype, so they charge the extra pass at every dtype.Measured on 100 elements, current release:
mediannanmediannanpercentileis 408 againstpercentile's 208, same pattern.The behaviour is deliberate and the code says so at
src/flopscope/_pointwise.py:4831-4841("Charged UNCONDITIONALLY, unlike the factory-built nan reductions"), anddocs/reference/cost-model.mdstates it correctly. Only the release notes were wrong — and they are the notes for the release that opened Phase 2, so they understated which calls got more expensive for anyone reading them to plan a submission.A bullet was truncated.
- **dot,innerand two-arraymulti_dotaccept a 0-d operand.** NumPy treats— and then nothing. It also sits under "Costs less" while the change actually turns a wrongly-refused call into a priced one; the completed text says that rather than leaving it filed as a reduction.Also drops a validation term from the symmetry guide. Its cost estimates carried "+ validation" for
symmetrizeandrandom.symmetric; that pass is not billed. The guide now also notes that Reynolds accumulates in float64, so it is charged at the float64 rate whatever the input dtype, whilemode="canonical-copy"keeps the input's own rate.No code changes.