Commit Graph

2619 Commits

Author SHA1 Message Date
Martin Kroeker edaa73fd24
Hide the local 2VLx2VL symbol as static is insufficient for this with gcc 2025-08-20 06:33:28 -07:00
Martin Kroeker 501728a354
adjust register 20 accesses to 21 after moving x18 2025-08-20 06:24:38 -07:00
Martin Kroeker 107c883c8a
Update SME-related kernels 2025-08-19 05:13:28 -07:00
Martin Kroeker 05dbb54362
Delete misplaced file 2025-08-19 05:12:09 -07:00
Martin Kroeker 0bc19a1335
Update SME kernel details 2025-08-18 14:38:16 -07:00
Martin Kroeker ca542f319f
Add VORTEXM4 2025-08-18 08:41:38 -07:00
Martin Kroeker 0203657f40
Add sgemm_direct_performant for ARM64 2025-08-18 01:42:32 -07:00
Martin Kroeker e82bcd2740
Update ARM64 sgemm_direct object generation 2025-08-18 01:41:13 -07:00
Martin Kroeker 731f4dd686
Add VORTEXM4 settings 2025-08-18 01:39:35 -07:00
Martin Kroeker 53d3bb50cc
Get symbol name from build system; change b.first to b.mi for AppleClang compatibility 2025-08-18 01:37:50 -07:00
Martin Kroeker 08a00326a4
Build symbol name from build system variables 2025-08-18 01:35:41 -07:00
Martin Kroeker 89898fc499
Add sgemm_direct_performant for switching between direct and regular kernels 2025-08-18 01:31:40 -07:00
Martin Kroeker 22c6607db9
Use ASMNAME to get symbol name from build system; leave x18 unused as reserved on MacOS 2025-08-18 01:30:10 -07:00
Martin Kroeker ca22e28ca1
Rename sgemm_direct_sme1.S to sgemm_direct_sme1_2VLx2VL.S 2025-08-18 01:25:44 -07:00
Martin Kroeker 9d6df1dd3e
Merge pull request #5422 from ChipKerchner/addRVVVectorizedPacking
Add and use vectorized packing in ZVL128B and ZVL256B for RISCV
2025-08-16 13:45:35 -07:00
Martin Kroeker f3b2a15fad
Merge pull request #5420 from yuanjia111/develop
Move the value assignment of vector x in gemv_n_sve.c to the outermos…
2025-08-16 12:06:53 -07:00
Chip Kerchner 64401b4417 Disable vectorized packing for DGEMM - since it is slower than scalar. 2025-08-13 13:41:12 +00:00
Chip Kerchner c00afc86a6 Add and use vectorized packing to ZVL128B and ZVL256B. Up to 3x+ faster than generic scalar functions. 2025-08-12 17:18:56 +00:00
yuanjia 803e8d4838 Move the value assignment of vector x in gemv_n_sve.c to the outermost loop to reduce the repeated data retrieval.
1.Verify correctness using BLAS-Tester
    2.Using the built-in benchmark to verify performance, the performance of float and doule type improved by about 60% and about 40% respectively.The test command is:
     export OMP_NUM_THREADS=1;numactl -C 10 -l ./sgemv.goto 3000 4000 100
     export OMP_NUM_THREADS=1;numactl -C 10 -l ./dgemv.goto 3000 4000 100
2025-08-12 18:03:16 +08:00
Chris Sidebottom 5f47b872f1 Remove older kernels for BGEMM on NEOVERSEV1 2025-08-11 09:25:19 +00:00
Chris Sidebottom 114316f361 Optimize SBGEMM / BGEMM for NEOVERSEV1 further
This changes the kernels to pack full SVE vectors and reduces the
overall complexity of the inner GEMM loop.
2025-08-11 09:25:13 +00:00
Martin Kroeker f1ee61ea30
Include NEON header for the bfloat conversion functions 2025-08-04 00:21:39 -07:00
Martin Kroeker b3ffd5524a
Include NEON header for the bfloat conversion functions 2025-08-04 00:20:28 -07:00
Martin Kroeker 0968dddf1a
Merge pull request #5409 from martin-frbg/issue5372
Work around gcc15.1 on POWER misoptimizing DGEMV at -O3
2025-07-30 10:36:39 -07:00
Martin Kroeker a3b9c933c5
mark xbuffer as volatile to work around gcc15.1 optimizer bug 2025-07-30 17:05:36 +02:00
Chip Kerchner 72f082f31d Fix bad vector zero initializer and other compiler warnings for RISC-V. 2025-07-30 14:04:43 +00:00
Martin Kroeker a5e7c0e3e0
Merge pull request #5396 from abhishek-iitmadras/abhishekk_bfloat16
ARM64: Enable bfloat16 kernels by default
2025-07-28 13:39:08 -07:00
abhishek-fujitsu 0bc79da587 add neon header 2025-07-25 11:10:20 +05:30
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 e2d941e9af
Declare the "small" kernel static in addition to inline 2025-07-22 11:02:32 +02:00
Martin Kroeker 8214700930
Declare the "small" kernel static in addition to inline 2025-07-22 11:01:37 +02:00
Martin Kroeker 39c90f9859
Merge pull request #5380 from quic/topic/sgemm_direct_sme1_alpha_beta
SME1 based direct kernel (with alpha and beta) for cblas_sgemm level 3
2025-07-18 23:23:39 +02:00
Rajendra Prasad Matcha eae0abfdb6 SME1 based direct kernel with alpha and beta for cblas_sgemm level 3 API. 2025-07-17 16:14:31 +05:30
Chris Sidebottom 947d7af4c9 Fix CMake references to bscal and bgemv 2025-07-15 15:41:53 +01: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 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 343830c26f
Add BGEMM parameter tables 2025-07-10 14:59:46 +02:00
Martin Kroeker ff614575c9
Fix arm64 HAVE_SME setting for DYNAMIC_ARCH builds 2025-07-09 14:44:25 +02:00
Martin Kroeker 0e11537cab
Merge pull request #5357 from Mousius/bgemm-init
Add infrastructure for BGEMM
2025-07-09 09:34:58 +02:00
Chris Sidebottom 66d9185ebe Fix CMake support 2025-07-08 22:49:55 +00:00
Martin Kroeker fd37406817
Merge branch 'develop' into optimized_gemv_n_1x3 2025-07-08 21:05:30 +02: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
Iha, Taisei f7ad906b49 Performance improvements of [SD]DOT with loop-unrolling on A64FX 2025-07-04 22:57:44 +09:00
Martin Kroeker d96daa220d
Merge pull request #5290 from Srangrang/develop
Add support for FP16 to openBLAS and shgemm on RISCV
2025-06-24 23:10:15 +02:00
Martin Kroeker ee26caffb3
Merge pull request #5309 from davidz-ampere/dev-ampereone
Add support for Ampere AmpereOne processors
2025-06-24 12:27:08 +02:00
davidz-ampere aa90ab4142 Add support for Ampere AmpereOne processors 2025-06-24 00:12:34 -04:00
Ian McInerney badef1d32e Update sbgemm_tcopy_4_neoversev1 kernel to use standard C types 2025-06-19 14:26:16 +01:00
Martin Kroeker 3318a2b904
override CDOT and ZDOT with the generic C kernel 2025-06-17 22:41:40 +02:00
davidz-ampere 84730068af reduce duplicate kernel code 2025-06-17 03:05:34 -04:00
davidz-ampere be68ef03b4 Add support for Ampere processors 2025-06-15 22:00:40 -04:00
Srangrang 9f13b2c6ac style: modify HALF to BFLOAT16 in benchmark folder 2025-06-15 20:57:05 +08:00
Srangrang ec14e1648c fix: resolve non-RISCV host build failed issue
- adjust interface to disable "small matrix" pathway
- separate HFLOAT16 from BFLOAT16
- remove SHGEMM_UNROLL_M and SHGEMM_UNROLL_N equal conditions

Related to PR#5290
Co-authored-by Martin
2025-06-15 20:25:15 +08:00
Martin Kroeker e338d34ce1
fix path 2025-06-13 13:37:15 +02:00
Martin Kroeker d36093d084
temporarily change default C/ZSCAL to the non-asm implementation 2025-06-13 13:32:02 +02:00
Martin Kroeker b3c90564d7
resync with the generic arm version for inf/nan handling 2025-06-13 00:54:27 -07:00
Martin Kroeker 6bdc7f9eb7
Merge pull request #5300 from martin-frbg/fixup5296
kernel/riscv64: Fix cscal/zscal for riscv64_generic
2025-06-12 15:02:22 -07:00
Martin Kroeker 73af02b89f
use dummy2 as Inf/NAN handling flag 2025-06-12 13:33:56 -07:00
Martin Kroeker 549a9f1dbb
Disable the default SSE kernels for CSCAL/ZSCAL for now 2025-06-12 18:54:33 +02:00
Martin Kroeker 58eeb9041c
fix handling of dummy2 2025-06-12 03:03:01 -07:00
Martin Kroeker 7c77537b25
Merge pull request #5297 from martin-frbg/zscal_x86_sparc
kernel/(x86|sparc): Fix cscal and zscal by reverting to the generic C kernels
2025-06-12 01:10:35 -07:00
Martin Kroeker 63287e1855
Merge pull request #5296 from martin-frbg/zscal_riscv
kernel/riscv64: Fix cscal and zscal
2025-06-12 01:10:15 -07:00
Martin Kroeker d2855d3dab
Merge pull request #5285 from martin-frbg/zscal_zarch
kernel/zarch: Fix cscal and zscal
2025-06-12 01:09:52 -07:00
Martin Kroeker 1408be5fe0
Merge pull request #5282 from martin-frbg/zscal_power
kernel/power: Fixed cscal and zscal
2025-06-12 01:04:38 -07:00
Martin Kroeker 1589d0b21e
Merge pull request #5281 from martin-frbg/zscal_arm64
kernel/arm64: fixed cscal and zscal
2025-06-12 01:04:18 -07:00
Martin Kroeker a86419fb66
Merge pull request #5280 from martin-frbg/zscal_x86_64
kernel/x86_64: fixed cscal and zscal
2025-06-12 01:03:55 -07:00
Martin Kroeker 11ff18bb0f
Merge pull request #5081 from XiWeiGu/kernel_generic_fixed_cscal_zscal
kernel/generic: Fixed cscal and zscal
2025-06-12 01:03:00 -07:00
Martin Kroeker f4194fc65f
Merge branch 'develop' into la64_fixed_cscal_zscal 2025-06-11 14:28:41 -07:00
Martin Kroeker e12132abd4
Use generic C/ZSCAL kernels to address inf/nan handling for now 2025-06-11 22:12:10 +02:00
Martin Kroeker 1cefbea7ea
Use generic SCAL kernels to address inf/nan handling for now 2025-06-11 22:10:46 +02:00
Sharif Inamdar 8279e68805 Optimize gemv_n_sve_v1x3 kernel
- Calculate predicate outside the loop
- Divide matrix in blocks of 3
2025-06-11 10:16:56 +00:00
Martin Kroeker f18b7a46bf
add dummy2 flag handling for inf/nan agnostic zeroing 2025-06-11 01:47:43 -07:00
Martin Kroeker fe220a0d7d
Merge pull request #5291 from guoyuanplct/develop
kernel/riscv64:fixed the performance problem in RISCV64_ZVL256 when OPENBLAS_K is small
2025-06-09 23:42:04 -07:00
Arne Juul 5442aff218 Accumulate results in output register explicitly 2025-06-09 19:03:22 +00:00
guoyuanplct 2ae019161a fixed the performance problem in RISCV64_ZVL256 when OPENBLAS_K is small 2025-06-05 21:53:03 +08:00
Srangrang fb89820f20 Merge branch 'develop' of https://github.com/Srangrang/OpenBLAS into develop 2025-06-04 20:27:05 +08:00
Srangrang 4e1a381e5b fix: resolve the compilation failure without zfh instruction
- modify the macro conditions in Makefile.system
- Delete development test code

Related to issue#5279
2025-06-04 20:00:12 +08:00
gkdddd 670ec6f757 Added shgemm_kernel_8x8 for RISCV64_ZVL128B and shgemm_kernel_16x8 for RISCV64_ZVL256B
Added HFLOAT16 support for RISCV64
Added shgemm_kernel_8x8 for RISCV64_ZVL128B and shgemm_kernel_16x8 for RISCV64_ZVL256B based on HFLOAT16
The instruction sets used are ZVFH and ZFH, which need to be supported by RVV1.0

Related to issue #5279
Co-authored-by Linjin Li <linjin_li@163.com>
2025-06-03 20:14:30 +08:00
guoyuanplct d2003dc886 del lines 2025-05-29 18:38:22 +08:00
guoyuanplct 45fd2d9b07 Optimized the axpby function. 2025-05-29 17:50:44 +08:00
Martin Kroeker fb8dc8ff5c
Add dummy2 flag handling 2025-05-25 14:47:06 -07:00
Srangrang 2996c25c94 add shgemm for RISCV_ZVL128B 2025-05-24 23:55:49 +08:00
Martin Kroeker cf06250d36
add handling of dummy2 flag 2025-05-24 06:06:24 -07:00
Martin Kroeker 28f8fdaf0f
support flag for NaN/Inf handling and fix scaling of NaN/Inf values 2025-05-23 14:59:59 +02:00
Martin Kroeker 669c847ceb
support extra flag for NaN handling 2025-05-23 05:52:48 -07:00
Martin Kroeker 0b0bb9951d
Merge pull request #5265 from guoyuanplct/develop
kernel/riscv64:Added support for omatcopy on RISCV64_ZVL256B
2025-05-17 05:08:47 -07:00
guoyuanplct be9f7550b5 Format Code 2025-05-15 18:55:47 +08:00
guoyuanplct 4d213653d8 kernel/riscv64:Added support for omatcopy on riscv64. 2025-05-15 13:29:14 +08:00
Martin Kroeker 8afddc1a81
Merge pull request #5262 from guoyuanplct/develop
kernel/riscv64:Fixed the bug of openblas_utest_ext failing in c/zgemv and some c/zgbmv tests:
2025-05-14 02:40:32 -07:00
guoyuanplct 9a7e3f102b kernel/riscv64:Fixed the bug of openblas_utest_ext failing in c/zgemv and some c/zgbmv tests: 2025-05-14 00:09:26 +08:00
pengxu a978ad3180 Loongarch64: add C functions of zgemm_ncopy_16 2025-05-13 16:09:12 +08:00
pengxu 0ccb050583 Loongarch64: fixed cgemm_ncopy_16_lasx 2025-05-13 16:08:33 +08:00
Martin Kroeker 5141a90993
Fix ARMV9SME target in DYNAMIC_ARCH and add SME query code for MacOS (#5222)
* Fix ARMV9SME target and add support_sme1 code for MacOS
* make sgemm_direct unconditionally available on all arm64
* build a (dummy) sgemm_direct kernel on all arm64





* Update dynamic_arm64.c
2025-05-10 22:39:32 +02:00
Martin Kroeker 151b74284e
Merge pull request #5203 from quic/fix-sgemmdirect-sme1
Add vector registers to clobber list to prevent compiler optimization.
2025-05-09 05:39:47 -07:00
Martin Kroeker cba32d001a
Merge pull request #5245 from guoyuanplct/develop
Optimized RVV_ZVL256B Implementation of zgemv_n
2025-05-01 03:04:38 -07:00
pengxu f19e72c402 Loongarch64: fixed swap_lasx 2025-04-30 16:42:52 +08:00
pengxu b471fa337b Loongarch64: fixed snrm2_lasx 2025-04-30 16:42:36 +08:00
pengxu 57bb46bedf Loongarch64: fixed rot_lasx 2025-04-30 16:42:22 +08:00
pengxu 6dc4ca2391 Loongarch64: fixed icamax_lasx 2025-04-30 16:42:12 +08:00
pengxu b528b1b8ea Loongarch64: fixed iamax_lasx 2025-04-30 16:41:58 +08:00