Update from develop for 0.3.34 release#5922
Merged
Merged
Conversation
Fix misoptimization of C/ZGETF2 by Clang on Apple M
… ZVL128B/ZVL256B
Add a RISC-V subsection to docs/install.md inside 'Building from source',
between the existing MIPS and FreeBSD sections, covering:
- Target selection table (RISCV64_GENERIC / RISCV64_ZVL128B /
RISCV64_ZVL256B / C910V / x280) and what each is for.
- The general property that GENERIC / ARCH_GENERIC targets across
all architectures map to the non-vectorized plain-C reference
path, with the Makefile.riscv64 scalar -march override noted as
the RISC-V-specific compounding factor.
- GCC 14+ requirement for the ZVL targets on current OpenBLAS
releases (GCC 13 does not implement the __riscv_vsseg* intrinsics
used by the _rvv.c kernels and falls back to scalar silently,
detectable only by disassembly).
- Reference objdump-based verification command and expected
opcode-count range for a correct RISCV64_ZVL128B build.
README.md now keeps a single one-line pointer to the new install.md
section at the spot where users encounter the RISC-V build commands,
so the signposting is preserved without bloating the page that GitHub
renders by default.
v2 of this PR, addresses review feedback from @martin-frbg on
relocation and on the broader GENERIC framing.
Co-authored-by: Vaibhav805 <Vaibhav805@users.noreply.github.com>
On Apple, the shared library link rule for Fortran used GCC-specific flags: -x f95-cpp-input (GCC preprocessing flag; NAG does not support it) -Wl,-shared (Linux linker flag; macOS needs -dynamiclib) The fix is NAG-specific — other non-GNU compilers (Intel, flang, Cray, etc.) are left alone since they may handle the existing code paths fine. Fix in two places (both already inside if(APPLE) / if(APPLE AND BUILD_STATIC_LIBS)): 1. Before add_library() (affects the main CMake Fortran shared lib rule): For NAG Fortran, substitute CMAKE_C_CREATE_SHARED_LIBRARY so the C compiler link rule is used instead. 2. Inside the APPLE AND BUILD_STATIC_LIBS block (the static->shared conversion trick for long argument lists): add an elseif(NAG) branch that uses the C compiler with -dynamiclib and auto-detects the NAG Fortran runtime (libf72rts) from the compiler's directory so that NAGf90_* symbols resolve. Tested with NAG 7.2.7243 on macOS/arm64.
Fix shared lib build with NAG Fortran on macOS
Replace normal vector pair pointer dereferences with the optimized __builtin_vsx_lxvp builtin across DGEMM, ZGEMM, and DGEMV kernels. Also done some identation corrections in dgemm_kernel_power10.c. This is done as part of POWER code cleanup and may not have any performance impact. Signed-off-by: Amrita H S <amritahs@linux.vnet.ibm.com>
Corrected the register constraints for the PowerPC dcbt (Data Cache Block Touch) instruction in Power10 kernel implementations. The dcbt instruction has special behavior where if the first operand (RA) is r0, it uses the value 0 instead of the register contents. Therefore, RA must use the "b" constraint (any GPR except r0), while RB can use "r" (any GPR including r0). Changes: - Changed first operand constraint from "r" to "b" to exclude r0 - Changed second operand constraint from "b" to "r" for flexibility This ensures correct prefetch behavior and compliance with PowerPC ISA specifications, preventing potential issues where r0 might be incorrectly used as the base address register. Signed-off-by: Amrita H S <amritahs@linux.vnet.ibm.com>
Faster GEMV for RVV
Fix OpenMP reentrancy issues in LLVM compilations with gmake on ARM64
Power10: Replace vector pair loads with __builtin_vsx_lxvp
optimize zgemm, ic/zamin and sdot lsx kernel for 2k3000 cpu
Fix AIX build with OpenXL (ibm-clang)
The optional NaN checks performed by LAPACKE front-ends computed array offsets and lengths in 32-bit lapack_int arithmetic, which overflows for large matrices (e.g. LAPACKE_dpotrf with n = lda >= 46341 overflows j*lda in LAPACKE_dtr_nancheck, leading to out-of-bounds reads and crashes). Several nancheck helpers (ge, gb, tp, tf) already cast to size_t; this applies the same treatment to the ones that were missed: - ?tr_nancheck: cast a[i+j*lda] index to size_t (also covers po/sy/he checks, i.e. the POTRF/Cholesky path) - ?_nancheck (vector): iterate by element count instead of n*inc, with size_t indexing - ?sp/?pp/?pf/?hp/?tp/?tf_nancheck: compute n*(n+1)/2 length in size_t - ?tz_nancheck: widen the part offsets to int64_t (keeping the -1 sentinel) and compute them with a widening cast Verified with UBSan: LAPACKE_str_nancheck at n = lda = 47000 previously reported signed integer overflow and crashed with SEGV at -O0; it now passes and still detects the NaN. Old and new code produce identical results across 1907 enumerated small-size cases (all layouts, uplo, diag, shapes and NaN positions for tr/tz/vector/packed variants). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fix 32-bit integer overflow in LAPACKE nancheck index arithmetic
Fix incorrect inline assembly constraints in dcbt prefetch instructions
Fix corruption due to lock sharding issues by centralizing locking
Add support for QEMU's virtual AMD cpu to avoid misdetection as Opteron
Add SiFive U74 target with a scalar 4×4 register-tiled GEMM kernel
RISC-V: cache-aware GEMM blocking (get_L2_size + blas_set_parameter)
Add cpu detection for Sifive U74
Fix test failures in ?CHKLQ when NB=1 with M=N (Reference-LAPACK PR 1298)
Replace HUGE intrinsic in ?TGSJA for consistency (Reference-LAPACK PR 1305)
Fix seed advancement in SLARUV/DLARUV (Reference-LAPACK PR 1288)
Rework the -mpwr10 option to be only applied to POWER9/10 on FreeBSD
Fix workspace queries for TZRZF/UNMRZ in ?GELSY (Reference-LAPACK PR1289/1325)
Relax C910V qemu utest timeout
Extends GEADD to support independent transposition of both A and C, matching the behavior of cuBLAS's geam and Apple's Accelerate geadd. Previously only A could be transposed. - Add transc parameter across cblas.h, common_interface.h, common_level3.h, common_param.h - Add transc handling to interface/geadd.c and interface/zgeadd.c - Extend kernel/generic/geadd.c and kernel/generic/zgeadd.c with stride logic for transposed C - Add transpose test coverage (hand-verified 2x2 cases and randomized large-matrix tests) for sgeadd, dgeadd, cgeadd, zgeadd
…accumulation (#5918) * Zero d0 register as it may not be identical with OUT, amend clobber list * Add sdot/ddot reproducer from issue 5917 as ARM64-specific utest
* Add transpose support for C in GEADD (fixes #4646) Extends GEADD to support independent transposition of both A and C, matching the behavior of cuBLAS's geam and Apple's Accelerate geadd. Previously only A could be transposed. - Add transc parameter across cblas.h, common_interface.h, common_level3.h, common_param.h - Add transc handling to interface/geadd.c and interface/zgeadd.c - Extend kernel/generic/geadd.c and kernel/generic/zgeadd.c with stride logic for transposed C - Add transpose test coverage (hand-verified 2x2 cases and randomized large-matrix tests) for sgeadd, dgeadd, cgeadd, zgeadd * Add self to CONTRIBUTORS.md
Avoid large intermediates in (C/Z)LARTG (Reference-LAPACK PR 1245)
…n 32bit FreeBSD/x86
…+ on 32bit FreeBSD/x86
…cc15+ on 32bit FreeBSD/x86
…cc15+ on 32bit FreeBSD/x86
…cc15+ on 32bit FreeBSD/x86
Mark temporaries as volatile to avoid SIGBUS in multithreaded builds with gcc15+ on 32bit FreeBSD/x86
* Update for 0.3.34
Merging this PR will improve performance by 18.12%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | test_nrm2[100-d] |
38.1 µs | 25.4 µs | +49.84% |
| ⚡ | test_dot[100] |
22.5 µs | 17.7 µs | +27.55% |
| ⚡ | test_daxpy[100-d] |
24.5 µs | 20.1 µs | +21.75% |
| ⚡ | test_daxpy[100-s] |
24.3 µs | 20.1 µs | +20.63% |
| ⚡ | test_daxpy[100-c] |
25.4 µs | 21.1 µs | +20.54% |
| ⚡ | test_daxpy[100-z] |
26.3 µs | 21.9 µs | +20.21% |
| ⚡ | test_dot[1000] |
28.6 µs | 24.2 µs | +18.24% |
| ⚡ | test_daxpy[1000-d] |
32.7 µs | 27.7 µs | +17.84% |
| ⚡ | test_daxpy[1000-s] |
27.8 µs | 23.6 µs | +17.62% |
| ⚡ | test_nrm2[100-dz] |
29 µs | 24.9 µs | +16.67% |
| ⚡ | test_nrm2[1000-d] |
30.7 µs | 26.5 µs | +15.78% |
| ⚡ | test_daxpy[1000-c] |
33 µs | 28.6 µs | +15.16% |
| ⚡ | test_nrm2[1000-dz] |
35.5 µs | 31.5 µs | +12.97% |
| ⚡ | test_daxpy[1000-z] |
40.9 µs | 36.6 µs | +11.91% |
| ⚡ | test_dgbmv[1-100-s] |
37.5 µs | 33.5 µs | +11.9% |
| ⚡ | test_dgbmv[1-100-d] |
38.2 µs | 34.3 µs | +11.43% |
| ⚡ | test_dgbmv[1-100-c] |
40.6 µs | 36.6 µs | +11.05% |
| ⚡ | test_dgbmv[1-100-z] |
42.4 µs | 38.4 µs | +10.44% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing develop (0769008) with release-0.3.0 (62bcfb0)1
Footnotes
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.
No description provided.