150 Commits
Author SHA1 Message Date
Martin Kroeker 7779b52f99 Merge pull request #5942 from HecaiYuan/develop
loongarch64: fix segfaults in copy kernels and adjust dsyrk block size
2026-08-15 18:37:08 +02:00
moluopro 404f288a9d LoongArch: Fix DSDOT accumulator initialization 2026-08-13 23:00:41 +08:00
pengxu 284bcbae13 loongarch: add small matrix kernel of sgemm_lasx/lsx and dgemm_lsx 2026-08-06 10:14:23 +08:00
yuanhecai 1b3358b3c5 LoongArch64: fix dgemm_ncopy_4_lsx.S segfault for small columns 2026-07-24 15:14:34 +08:00
yuanhecai 4c78593874 LoongArch64: fix sgemm_ncopy_16_lasx.S segfault for small columns 2026-07-24 15:13:42 +08:00
yuanhecai 018891aa98 LoongArch64: fix sgemm_ncopy_8_lasx.S segfault for small columns 2026-07-24 15:12:51 +08:00
wangweijie 2707282e8c LoongArch64: avoid SGEMM LA464 ncopy fallthrough from N2 to N1 2026-07-09 20:53:05 +08: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
pengxu 6731dac68b optimize zgemm lsx kernel for 2k3000 cpu 2026-05-29 10:05:39 +08:00
pengxu f6533ccea0 Fix floating point registers ld/st bug of Loongarch 2025-12-03 10:52:59 +08:00
Martin Kroeker f4194fc65f Merge branch 'develop' into la64_fixed_cscal_zscal 2025-06-11 14:28:41 -07:00
pengxu 0ccb050583 Loongarch64: fixed cgemm_ncopy_16_lasx 2025-05-13 16:08:33 +08: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
pengxu ba9569e382 Loongarch64: fixed dot_lasx 2025-04-30 16:41:48 +08:00
pengxu dc5fa29851 Loongarch64: fixed cscal_lasx 2025-04-30 16:41:39 +08:00
pengxu a98dd6d911 Loongarch64: fixed copy_lasx 2025-04-30 16:41:28 +08:00
pengxu d49319c2d2 Loongarch64: fixed cnrm2_lasx 2025-04-30 16:41:18 +08:00
pengxu 74c97ef814 Loongarch64: fixed cdot_lasx 2025-04-30 16:41:05 +08:00
pengxu be525521ad Loongarch64: fixed asum_lasx 2025-04-30 16:40:55 +08:00
pengxu 0cd5ca5527 Loongarch64: fixed amax_lasx 2025-04-30 16:40:44 +08:00
gxw 2c4a5cc6e6 LoongArch64: Fixed snrm2_lsx.S and cnrm2_lsx.S
When the data type is single-precision real or single-precision complex,
converting it to double precision does not prevent overflow (as exposed in LAPACK tests).
The only solution is to follow C's approach: find the maximum value in the
array and divide each element by that maximum to avoid this issue
2025-02-12 15:48:01 +08:00
gxw 9e75d6b3d1 LoongArch64: Fixed swap_lsx.S
Fixed the error when the stride is zero
2025-02-12 14:57:35 +08:00
gxw e8c740368c LoongArch64: Fixed rot_lsx.S ane crot_lsx.S
Do not check whether the input parameters c and s are zero,
as this may cause errors with special values (same as scal).
Although OpenBLAS's own test suite doesn't catch this, it will
cause LAPACK test cases to fail.
2025-02-12 14:52:49 +08:00
Hao Chen c2212d0abd LoongArch64: Fixed copy_lsx.S
Fixed incorrect store operation

Signed-off-by: gxw <guxiwei-hf@loongson.cn>
2025-02-12 14:52:20 +08:00
Hao Chen 7f1ebc7ae6 LoongArch64: Fixed iamax_lsx.S
Fixed index retrieval issue when there are
identical maximum absolute values

Signed-off-by: Hao Chen <chenhao@loongson.cn>
Signed-off-by: gxw <guxiwei-hf@loongson.cn>
2025-02-12 14:44:44 +08:00
Hao Chen 31d326f895 LoongArch64: Fixed dot_lsx.S
Fixed incorrect register usage in instructions

Signed-off-by: gxw <guxiwei-hf@loongson.cn>
2025-02-12 14:44:11 +08:00
Hao Chen 5d6356bc16 LoongArch64: Fixed amax_lsx.S
Fixed register zeroing operation

Signed-off-by: Hao Chen <chenhao@loongson.cn>
Signed-off-by: gxw <guxiwei-hf@loongson.cn>
2025-02-12 14:39:29 +08:00
Martin Kroeker 180ba5e7d0 Merge pull request #5069 from tingboliao/dev_rotm_20250107
Further rearranged the rotm kernel for the different architectures.
2025-01-23 10:16:43 +01:00
gxw 2da86b80c9 LoongArch64: Fixed scalar version of cscal and zscal 2025-01-22 14:32:20 +08:00
gxw 5392f6df69 LoongArch64: Fixed LASX version of cscal and zscal 2025-01-22 14:15:27 +08:00
tingbo.liao 3c8df6358f Further rearranged the rotm kernel for the different architectures.
Signed-off-by: tingbo.liao <tingbo.liao@starfivetech.com>
2025-01-22 11:41:12 +08:00
gxw b2117bb2ca LoongArch64: Fixed LSX version of cscal and zscal 2025-01-21 14:49:44 +08:00
gxw e0a8216554 LoongArch64: Update dsymv LSX version 2025-01-14 19:45:42 +08:00
gxw a9070ba3f9 LoongArch64: Update ssymv LSX version 2025-01-14 09:06:59 +00:00
Xi Ruoyao af10c132b8 LoongArch64: Fix dsymv and ssymv LASX version
"fmov.d $f2, $f4" leaves all the bits higher than the 63-th bit
unpredictable but it's obvious that the following code uses the value of
those high bits.  We actually want to replicate the lower 64 bits here,
so we should use xvreplve0.d instead.

LA464 (Loongson 3[A-Z]-5000) happens to replicate them for us due to
some uarch internal details so the issue was not detected, but for LA664
(Loongson 3[A-Z]-6000) and future uarch we need to do things correctly
or we end up getting a lot of test failures.

Closes: https://bbs.aosc.io/t/topic/302
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
2025-01-13 22:16:00 +08:00
gxw 20a8e48f25 LoongArch64: Update ssymv LASX version 2025-01-10 16:02:54 +08:00
gxw e0748588b8 LoongArch64: Update dsymv LASX version 2025-01-10 14:52:57 +08:00
gxw bb31bbef52 LoongArch64: Opt somatcopy_ct with LASX 2024-10-17 11:45:13 +00:00
gxw b37129341b LoongArch64: Opt somatcopy_cn with LASX 2024-10-17 11:27:55 +00:00
gxw acf6cab304 LoongArch64: Opt somatcopy_rn with LASX 2024-10-17 09:50:02 +00:00
gxw 15edb441bf LoongArch64: Opt somatcopy_rt with LASX 2024-10-17 09:15:42 +00:00
Martin Kroeker 9783dd07ab Rename KERNEL.LOONGSONGENERIC to KERNEL.LA64_GENERIC 2024-10-06 22:43:11 +02:00
Martin Kroeker de421b7764 Merge pull request #4904 from XiWeiGu/la64_cross_cmake
LoongArch64: Enable cmake cross-compilation
2024-10-03 15:53:57 +02:00
gxw 30af9278dc LoongArch64: Enable cmake cross-compilation 2024-09-29 10:13:30 +08:00
gxw 48698b2b1d LoongArch64: Rename core
Use microarchitecture name instead of meaningless strings to name the core,
the legacy core is still retained.
1. Rename LOONGSONGENERIC to LA64_GENERIC
2. Rename LOONGSON3R5 to LA464
3. Rename LOONGSON2K1000 to LA264
2024-09-29 09:35:21 +08:00