Commit Graph

131 Commits

Author SHA1 Message Date
moluopro 8ac41809cf test: register XERBLA for level 3 BLAS 2026-07-11 19:52:20 +08:00
moluopro e4891bc055 test: register XERBLA for level 2 BLAS 2026-07-11 19:50:56 +08:00
moluopro 7a24cf7a6a test: harden Makefile result handling 2026-07-11 19:49:33 +08:00
moluopro b5fa89f351 cmake: harden regular BLAS error tests 2026-07-11 19:48:33 +08:00
moluopro 066e9076c3 test: add a regular BLAS XERBLA bridge 2026-07-11 19:47:54 +08:00
Martin Kroeker 8af8d8f4b6
Merge branch 'develop' into jn/build-exe 2026-07-08 16:39:07 +02:00
hheei 71f2260186 lapack/laed3: guard sqrt(-w[i]) against spuriously positive w[i]
When eigenvalues are nearly degenerate, numerical accumulation in
the divide-and-conquer merge can push w[i] slightly above zero.
The subsequent sqrt(-w[i]) then produces NaN, which propagates
through the entire eigenvector output of DSYEVD/DSTEDC.

Use fmax(-w[i], 0.0) to safely clamp the sqrt argument, yielding
zero instead of NaN for spuriously positive w[i].  The fmax call
maps to a single vmaxsd instruction on x86_64 with zero overhead.

Add test/test_laed3_nan.c which exercises DSYEVD on a rank-1
perturbed identity matrix designed to create near-degenerate
eigenvalue clusters.
2026-07-02 23:03:38 +08:00
Paul Gessinger 88705a9328 Use FEXTRALIB in test Makefile
See https://github.com/OpenMathLib/OpenBLAS/issues/5795
When the compiler toolchain is not the same for C/C++ and fortran, the
linker can fail to resolve the `gfortran` library.
2026-05-04 17:13:04 +02:00
Martin Kroeker d9786d387c
fix missing eol 2026-04-14 10:56:04 +02:00
Martin Kroeker b9da7dbd24
Quote the respective SUMM file on failure in BLAS2/3 tests 2026-04-12 23:17:36 +02:00
yuanjia e6eba9fa21 Add optimized FP16 shgemm for for NEOVERSEN2 target 2026-03-27 17:55:06 +08:00
Martin Kroeker 983fca52d5
Merge branch 'develop' into jn/build-exe 2026-03-23 18:59:02 +01:00
Martin Kroeker e5793d8406
Split failure count between comparison to SGEMM and naive loop 2026-03-18 21:46:48 +01:00
Martin Kroeker afbd7c2b0d
Reduce expected accuracy compared to naive code and silence matrix element printout 2026-03-18 21:38:39 +01:00
Martin Kroeker d0a6e36896
Fix rules for running the GEMM3M tests 2026-02-18 11:41:25 +01:00
Jameson Nash 7414e363f0 Add $(EXE) suffix to executables in Makefiles
Define EXE variable in Makefile.system (set to .exe on Windows,
empty otherwise) and update all test executables to use it for
Windows compatibility.

- Makefile.system: Add EXE variable definition
- test/Makefile: Update all executables with $(EXE) suffix
- ctest/Makefile: Update all executables with $(EXE) suffix
- utest/Makefile: Update UTESTBIN and UTESTEXTBIN with $(EXE) suffix
- Makefile.install: Update install_tests target with $(EXE) suffix
- .gitignore: Add *.exe pattern

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 14:49:34 -05:00
Martin Kroeker ee6aa89fb0
Add BFLOAT16 and HFLOAT16 tests 2025-10-16 03:56:43 -07:00
Martin Kroeker 887f4f32ed
Merge branch 'OpenMathLib:develop' into issue5497 2025-10-15 14:01:13 -07:00
Martin Kroeker 19be504cd0
Add tests varying alpha and beta 2025-10-15 14:00:58 -07:00
Martin Kroeker 05adb52353
copypaste fix 2025-10-15 00:29:26 +02:00
Martin Kroeker 87470a3b18
remove unused definitions 2025-10-12 14:21:33 -07:00
Martin Kroeker a5fda2e2c3
fix missed bfloat/hfloat edit
Co-authored-by: Christopher Sidebottom <chris.sidebottom@arm.com>
2025-10-10 23:38:43 +02:00
Martin Kroeker fba2014239
remove spurious POSIX define 2025-10-10 14:36:33 +02:00
Martin Kroeker 5c89e4c770
remove the stricted build flags 2025-10-10 11:09:56 +02:00
Martin Kroeker 09c18779bb
Add test for SHGEMM 2025-10-10 01:40:28 -07:00
Chris Sidebottom 37fc3bbca0 Add Infrastructure for SHGEMV
This adds all the relevant bits and pieces to add a `shgemv` path as
well as a future `hgemm`/`hgemv` path in a similar model to `sb` and `b`
interfaces.

I've also fixed a few bits and pieces around `shgemm` which didn't build
in a few situations.
2025-10-07 15:03:24 +00:00
Chris Sidebottom 578e7dae85 Fix bf16->f32 conversion for NEOVERSEV1 and NEOVERSEN2 targets
This fixes an issue originally introduced with the BGEMM kernel.

I've updated the tests to run with `beta=1.0` so as to test loading and
updating from C.

Alongside this, the tests now return sensible return values to reduce
the risk of them being ignored.

Also fixed a bug in `generic/gemv_t.c` resulting in weird outputs for
`bgemv`.
2025-10-06 18:05:58 +00:00
Martin Kroeker b66a01f909
Fix building of bgemm tests on GEMM3M-capable (x86) targets 2025-07-28 22:43:28 +02:00
Chris Sidebottom ea2faf0c9a Add optimized BGEMM for NEOVERSEN2 target
This re-uses the existing NEOVERSEN2 8x4 `sbgemm` kernel to implement `bgemm`.
2025-07-24 10:59:28 +00:00
Chris Sidebottom 2c3cdaf74e Optimized BGEMV for NEOVERSEV1 target
- Adds bgemv T based off of sbgemv T kernel
- Adds bgemv N which is slightly alterated to not use Y as an
accumulator due to the output being bf16 which results in loss of
precision
- Enables BGEMM_GEMV_FORWARD to proxy BGEMM to BGEMV with new kernels
2025-07-23 10:51:41 +01:00
Martin Kroeker 38e6999295
format cleanup 2025-07-18 23:45:08 +02:00
Martin Kroeker 3df503cafd
portability fix and cleanup 2025-07-18 23:41:57 +02:00
Chris Sidebottom e105411460 Add infrastructure for bgemv/bscal
- Sets up all the various entrypoints for `bgemv`
- Adds `bscal` for use in the `bgemv` interface
- Adds test cases for comparing `sgemv` and `bgemv`
- Adds generic kernels for `bgemv_n` and `bgemv_t` which are accurate
enough to pass above tests
2025-07-15 14:48:57 +01:00
Chris Sidebottom 09a016fdf6 Split sbgemv test from sbgemm test 2025-07-13 13:39:44 +00:00
Chris Sidebottom 3f110c8272 Improve bgemm and sbgemm testing
- Fixes wrong return type for `is_close`
- Adds stricter compiler flags for test files so we don't see the above
issue again
- Re-uses test helper functions between compare_sgemm_sbgemm/bgemm.c
2025-07-13 12:48:09 +00:00
Martin Kroeker aad97c7763
Fix return type declaration 2025-07-11 15:32:41 +02:00
Chris Sidebottom 740efd71c4 Add optimized BGEMM kernel for NEOVERSEV1 target
This also improves the testing and generic kernel by re-using the BF16
conversion functions.

Built on top of https://github.com/OpenMathLib/OpenBLAS/pull/5357 and derived from https://github.com/OpenMathLib/OpenBLAS/pull/5287

Co-authored-by: Ye Tao <ye.tao@arm.com>
2025-07-10 23:23:27 +00:00
Martin Kroeker 9a272fece6
Re-enable the BGEMM tests 2025-07-10 15:02:59 +02:00
Martin Kroeker b54aec804e
remove spurious include 2025-07-10 15:00:30 +02:00
Chris Sidebottom 8cd4be8d47 Temporarily disable test_bgemm 2025-07-09 08:27:18 +01:00
Chris Sidebottom f95e7b0e32 Add infrastructure for BGEMM
Setting up all the infrastructure for BGEMM support in OpenBLAS, hopefully I found all the right places.

Derived mostly from the previous work done in https://github.com/OpenMathLib/OpenBLAS/pull/5287

Co-authored-by: Ye Tao <ye.tao@arm.com>
2025-07-08 16:22:41 +01:00
Martin Kroeker 70865a894e
Merge pull request #5180 from ywwry66/openmp_use_cmake
CMake: Pass `OpenMP` compiler and linker flags through CMake targets
2025-04-08 13:16:07 -07:00
Martin Kroeker 1c5d0d5539
move libomp to extralib 2025-04-08 10:44:36 +02:00
Ruiyang Wu 1b0c0f00e9 CMake: Avoid mixed OpenMP linkage 2025-03-26 23:52:13 -04:00
Ye Tao 4346b91559 add beta and alpha testcase for sbgemv 2025-02-28 16:48:47 +00:00
Chip Kerchner 36bd3eeddf Vectorize BF16 GEMV (VSX & MMA). Use GEMM_GEMV_FORWARD_BF16 (for Power). 2024-10-13 13:46:11 -05:00
Rohit Goswami 722e4ae07a
MAINT: Explicitly replace instead of unknown 2024-10-05 16:23:02 +00:00
Rohit Goswami a6b7751881
BUG: Allow tests to be run multiple times
Without failures due to existing files
2024-10-05 16:22:56 +00:00
Chip Kerchner 89702e1f4a Fix zero element GEMV test. 2024-08-16 11:37:39 -05:00
Chip Kerchner 77f85c7c00 GEMV tests don't like zero elements. 2024-08-16 11:15:32 -05:00