Repository navigation
Conversation
added 3 commits
November 5, 2026 13:14
Seed RVV extrema reductions from valid inputs instead of FLT_MAX sentinels. Add regressions to the existing unit-test framework. Validated against pinned upstream 02f5854 with full BLAS/CBLAS suites in QEMU and on native RISC-V VLEN256 hardware.
This branch has not been deployed
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.
The RVV extrema kernels initialize their accumulators with FLT_MAX or -FLT_MAX, including in double precision. A finite input such as DZAMIN of one complex value {0x1p900, 0x1p899} therefore returns FLT_MAX instead of 0x1.8p900. The same initialization also clips all-positive-infinity minima and all-negative-infinity maxima.
Initialize both the reduction seed and vector accumulators from the first valid comparison value, after the existing empty/invalid-increment checks. This follows the scalar kernels and avoids introducing a finite sentinel into the reduction. Add twelve regression cases to the existing min/amin tests, including a finite double value immediately above FLT_MAX.
Local/QEMU validation used upstream
02f585444a0fba2505cfda77cc6684de008ea477, Clang 21.1.8, LP64D/32-bit BLAS integers, S/D/C/Z BLAS, pthreads with a two-thread limit, and QEMU 9.1.0:git apply --check --whitespace=error-allagainst the pinned upstream tree.BLAS was built with NO_LAPACK=1. A modern GCC RVV build and legacy C910V intrinsics have not been tested. No performance improvement is claimed.
Native RISC-V Linux validation (VLEN=256):
Native and QEMU results are separate correctness evidence; no hardware performance measurement is claimed.