Skip to content

BLAS TESTING: cover the zero-scalar quick return in ?axpy and ?axpby - #1417

Open
ACSimon33 wants to merge 1 commit into
Reference-LAPACK:masterfrom
ACSimon33:blas-cov-axpy-zero-scalar
Open

ACSimon33 wants to merge 1 commit into
Reference-LAPACK:masterfrom
ACSimon33:blas-cov-axpy-zero-scalar

Conversation

@ACSimon33

Copy link
Copy Markdown
Collaborator

Description

This PR adds one check per tester at the end of CHECK2, with the scalar set to zero: ?axpy must leave Y bit-for-bit untouched, and ?axpby must return beta*Y. beta is 0.5 in the real testers and (0.7,-0.4) in the complex ones, so for the real case the expected result is exact and STEST compares against it directly.

Coverage

Measured locally with gfortran 13.3.0: BLAS/SRC built -O0 -g --coverage -fno-inline, the four ?blat1 drivers linked against it and run, then gcov -b -n. Percentages are lines executed and branches taken at least once; the denominators are gcov's.

Routine Lines before Lines after Branches before Branches after
saxpy.f, daxpy.f 100% of 24 100% 86.36% of 22 90.91%
caxpy.f, zaxpy.f 100% of 15 100% 92.86% of 14 100%
saxpby.f, daxpby.f, caxpby.f, zaxpby.f 88.24% of 17 100% 92.86% of 14 100%

The two branches still untaken in saxpy/daxpy after this are the back edges of the 4-way unrolled loop, which only repeats at N >= 8; the testers stop at N = 4. That is a separate gap, addressed in #1413.

@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.36%. Comparing base (a6c6e74) to head (2d8b68f).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1417   +/-   ##
=======================================
  Coverage   69.36%   69.36%           
=======================================
  Files        6122     6122           
  Lines      486711   486759   +48     
  Branches    23268    23268           
=======================================
+ Hits       337584   337640   +56     
+ Misses     148689   148681    -8     
  Partials      438      438           
Components Coverage Δ
BLAS 98.00% <ø> (+0.05%) ⬆️
CBLAS 96.98% <ø> (ø)
LAPACK 82.38% <ø> (ø)
LAPACKE 2.17% <ø> (ø)
TMGLIB 55.69% <ø> (ø)
BLAS testing 88.36% <100.00%> (+0.03%) ⬆️
CBLAS testing 89.63% <ø> (ø)
LAPACK testing 82.20% <ø> (ø)
LAPACKE testing ∅ <ø> (∅)
Files with missing lines Coverage Δ
BLAS/TESTING/cblat1.f 89.21% <100.00%> (+0.44%) ⬆️
BLAS/TESTING/dblat1.f 91.08% <100.00%> (+0.23%) ⬆️
BLAS/TESTING/sblat1.f 92.17% <100.00%> (+0.20%) ⬆️
BLAS/TESTING/zblat1.f 89.21% <100.00%> (+0.44%) ⬆️

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6c6e74...2d8b68f. Read the comment docs.

This branch has not been deployed

No deployments
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