Commit Graph

2788 Commits

Author SHA1 Message Date
moluopro 130102e661 Clean up SSYR2K SME direct warnings
Mark read-only transpose inputs const and limit sve_cntw and ldb definitions to the variants that use them.
2026-07-06 16:00:21 +08:00
moluopro 3781e2c15d Clean up SSYRK SME direct warnings
Mark the read-only B input const and limit sve_cntw and ldb definitions to the variants that use them.
2026-07-06 15:59:53 +08:00
moluopro edd8ab196d Clean up SSYMM SME preprocessing warnings
Use const source pointers in the symmetric preprocessing helpers and compile only the LU or LL helper needed by each object variant.
2026-07-06 15:59:25 +08:00
moluopro 8cde36c9b8 Use integer round-up in ARM64 SME direct kernels
The padded SME dimensions are integer quantities, so compute them with integer arithmetic and drop the now-unused math.h include.
2026-07-06 15:33:29 +08:00
moluopro d49cd021dd Handle zero alpha/beta in SSYR2K SME direct kernel
Avoid loading C when beta is zero, and skip A/B preprocessing for alpha == 0 or K == 0 by reusing the triangular direct kernel with k = 0.
2026-07-06 15:30:42 +08:00
moluopro 9925b29db5 Handle zero alpha/beta in SSYRK SME direct kernel
Avoid loading C when beta is zero, and skip A preprocessing for alpha == 0 or K == 0 by reusing the triangular direct kernel with k = 0.
2026-07-06 15:30:37 +08:00
moluopro 35a841fd49 Handle zero alpha in SSYMM SME direct kernel
When alpha is zero, avoid preprocessing the symmetric matrix and reuse the SGEMM alpha/beta direct kernel with k = 0 for the beta-only update.
2026-07-06 15:30:27 +08:00
moluopro ab27636deb Handle zero alpha/beta in SGEMM SME direct kernel
Avoid loading C when beta is zero; ZA has already been initialized to zero.

For alpha == 0 or K == 0, skip A preprocessing and reuse the direct kernel with k = 0 to perform only the beta update.
2026-07-06 15:30:22 +08:00
Martin Kroeker e70a7a735f
Merge pull request #5868 from Vasudeva-bit/macTuneZEN4
Optimize Zen 4 GEMM macro block sizes (P, Q, R)
2026-07-05 00:01:20 +02:00
Vasudeva-bit 58846317d9 fix C89 scoping, dynamic R for memory issues, robust zen4/5 check 2026-07-04 11:30:34 +05:30
Julien Schueller 43f0a90e1b Fix ZA tile slice indices in ssyrk SME direct kernel
The kernel_2x2 function uses 4 ZA tiles (0-3) each with svl slices.
Tiles 0/1 handle rows 0..svl-1 with slice indices 0..svl-1.
Tiles 2/3 handle rows svl..2*svl-1, so their slice indices
must start at 0, i.e. (i - svl) instead of i.

Fix all three tile 2/3 access sites:
- C load into ZA (svwrite_hor_za32_f32_m)
- C writeback for UPPER (svst1_hor_za32)
- C writeback for LOWER (svst1_hor_za32)

Fixes #5873
2026-07-02 09:29:32 +02:00
Vasudeva-bit 753604cfe2 Optimize Zen 4 GEMM macro block sizes (P, Q, R) 2026-06-25 19:06:26 +05:30
zhir 46aa158dcc AArch64: NEON omatcopy CT/RT kernels 2026-06-20 22:54:04 +03:00
Martin Kroeker ef20ea1644
Merge pull request #5828 from amritahs-ibm/fix_dcbt_constraints
Fix incorrect inline assembly constraints in dcbt prefetch instructions
2026-06-15 11:22:10 +02:00
Ayappan Perumal faf7ddbbea Fix AIX build with OpenXL (ibm-clang) 2026-06-10 04:22:48 -05:00
Martin Kroeker 94f85eb6b1
Merge pull request #5822 from ErnstPeng/la-dev
optimize zgemm, ic/zamin and sdot lsx kernel for 2k3000 cpu
2026-06-09 18:15:48 +02:00
amritahs-ibm 7e3877f263
Merge branch 'develop' into fix_dcbt_constraints 2026-06-09 14:45:02 +05:30
Martin Kroeker 901c214a9b
Merge pull request #5827 from amritahs-ibm/use_lxvp_builtins
Power10: Replace vector pair loads with __builtin_vsx_lxvp
2026-06-09 09:41:47 +02:00
pengxu 4850f86e3d optimize sdot lsx kernel 2026-06-08 14:26:03 +08:00
pengxu d1df5928ae optimize ic/zamin lsx kernel 2026-06-08 14:25:26 +08:00
Martin Kroeker 16a5ea5b4c
Merge pull request #5829 from martin-frbg/issue5825
Fix OpenMP reentrancy issues in LLVM compilations with gmake on ARM64
2026-06-06 10:55:52 +02:00
Martin Kroeker 1145c75a96
Comment out the libclang_rt.builtins kludge in preparation for removal 2026-06-05 23:06:28 +02:00
Amrita H S 831b822b94 Fix incorrect inline assembly constraints in dcbt prefetch instructions
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>
2026-06-04 01:49:08 -05:00
Amrita H S 3863a7778d Power10: Replace vector pair loads with __builtin_vsx_lxvp
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>
2026-06-03 02:34:53 -05:00
Chip Kerchner 6a23c36313 Unroll inner loop - 2 rows at a time. Up to 1.5X faster. 2026-06-02 16:39:16 +00:00
pengxu 6731dac68b optimize zgemm lsx kernel for 2k3000 cpu 2026-05-29 10:05:39 +08:00
Martin Kroeker 70a5a53747
Fix contiguous memory check for SGEMM and DGEMM. (#5815) 2026-05-19 22:58:22 +02:00
Martin Kroeker fda55ad259
Fix gmake build of ARM64 DYNAMIC_ARCH on hosts lacking SVE (#5816)
* Add march=armv8.4-a+sve(+bf16) to non-PGI options for SVE-capable ARM64 targets
2026-05-19 22:46:13 +02:00
Chip Kerchner f3f718b228 Fix contiguous memory check for SGEMM and DGEMM. 2026-05-18 18:56:29 +00:00
Gražvydas Ignotas fc9d7c7fe3 rename arm32 sgemm_kernel to indicate neon support 2026-05-05 23:09:52 +03:00
Gražvydas Ignotas 9d58b8d64e provide a NEON version of arm/sgemm
benchmark/sgemm.goto before:
 M= 200, N= 200, K= 200 :     9262.97 MFlops   0.001727 sec
after:
 M= 200, N= 200, K= 200 :    30223.64 MFlops   0.000529 sec

Conveniently the registers are already allocated suitably for vector
operation, so the conversion from vfpv3 was rather straightforward.

Prefetching was left out because it doesn't help Cortex-A76,
only hurts it slightly.
2026-05-05 23:09:01 +03:00
Gražvydas Ignotas cd276c2c09 only save the required registers for arm/sgemm
According to ARM AAPCS (Procedure Call Standard) 5.1.2.1, only registers
s16-s31 must be preserved across subroutine calls; registers s0-s15
do not need to be preserved.
2026-05-05 22:36:08 +03:00
Gražvydas Ignotas d7aeae8933 convert labels to local labels for arm/sgemm
Non-local labels interfere with profiling. Same thing was done for arm64 in
commit a0128aa489.
2026-05-05 22:36:08 +03:00
Martin Kroeker 33c14c66c7
spell out ifdefined 2026-04-30 17:31:01 +02:00
Martin Kroeker 703710763d
Correct stack offset of FLAG on FreeBSD 2026-04-30 17:29:31 +02:00
Martin Kroeker 54efe8ae71
Correct stack offset of FLAG on FreeBSD 2026-04-30 17:28:10 +02:00
Martin Kroeker 57765364fc
Return to using assembly SCAL kernels on FreeBSD 2026-04-30 17:25:25 +02:00
teddygood ecca5e480d Add WASM128_GENERIC STRSM and DTRSM kernels 2026-04-16 17:52:37 +09:00
teddygood 2847354ffb Allow target-specific GEMM and TRSM overrides 2026-04-16 17:52:37 +09:00
Martin Kroeker 70faa9f19d
Merge pull request #5756 from OpenMathLib/issue5267
Work around miscompilation of the AVX512 ?GEMM kernels by Windows LLVM
2026-04-15 07:58:21 +02:00
Martin Kroeker c59578f314
fix conditionals 2026-04-14 21:32:36 +02:00
Martin Kroeker 172f41c818
Merge pull request #5674 from ChipKerchner/fasterRVVEdges
Improve performance on edges of GEMM for RISC-V
2026-04-11 22:04:21 +02:00
Martin Kroeker 94e053ac10
Work around miscompilation of the AVX512 ?GEMM kernels by Windows LLVM 2026-04-11 19:27:31 +02:00
Henry Chen 6a5d2142f4 Fix dsdot precision for arm/dot.c 2026-04-09 18:11:47 +08:00
Henry Chen e875a9cdd0 Remove redundant C implemetations from MIPS directories 2026-04-08 13:59:10 +08:00
Chip Kerchner 0a4d6b2e11 Forgot files from previous check-in. 2026-04-02 20:15:32 +00:00
Chip Kerchner cc1b5794a0 Reduce number of vectors in use from 32 to 24 for last stage of main block - now full LMUL2. 2026-04-02 20:14:57 +00:00
Chip Kerchner 22b7950baa Use LMUL2 for calculations in main block - just break them apart before last stage. 2026-04-02 16:24:15 +00:00
Chip Kerchner 3b1aef12c7 Use LMUL2 loads in main block. 2026-04-02 13:20:16 +00:00
Chip Kerchner daa3215fb4 Remove shadow variable. 2026-03-31 14:41:38 +00:00