Skip to content

docs(changelog): correct two stale claims in the v0.12.0 notes - #255

Merged
spMohanty merged 1 commit into
mainfrom
docs/correct-v0120-nan-reduction-claim
Aug 29, 2026
Merged

docs(changelog): correct two stale claims in the v0.12.0 notes#255
spMohanty merged 1 commit into
mainfrom
docs/correct-v0120-nan-reduction-claim

Conversation

@spMohanty

Copy link
Copy Markdown
Member

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, but nanmedian, nanpercentile and nanquantile route through _remove_nan_1d, which calls np.isnan whatever the dtype, so they charge the extra pass at every dtype.

Measured on 100 elements, current release:

median nanmedian
int32 200 400
int64 200 400

nanpercentile is 408 against percentile'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"), 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 for anyone reading them to plan a submission.

A bullet was truncated. - **dot, innerand two-arraymulti_dot accept 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 symmetrize and random.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, while mode="canonical-copy" keeps the input's own rate.

No code changes.

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.
@spMohanty
spMohanty merged commit 33cf0c0 into main Aug 29, 2026
24 checks passed
@spMohanty
spMohanty deleted the docs/correct-v0120-nan-reduction-claim branch August 29, 2026 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant