Skip to content

Commit 7779b52

Browse files
authored
Merge pull request #5942 from HecaiYuan/develop
loongarch64: fix segfaults in copy kernels and adjust dsyrk block size
2 parents d7d3503 + d16316e commit 7779b52

4 files changed

Lines changed: 12 additions & 0 deletions

File tree

driver/level3/level3_syrk_threaded.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@
3737
/* or implied, of The University of Texas at Austin. */
3838
/*********************************************************************/
3939

40+
#if defined(__loongarch__) && defined(LA464) && defined(DOUBLE)
41+
#undef GEMM_P
42+
#define GEMM_P 96
43+
#endif
44+
4045
#ifndef CACHE_LINE_SIZE
4146
#define CACHE_LINE_SIZE 8
4247
#endif

kernel/loongarch64/dgemm_ncopy_4_lsx.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
172172
blt ZERO, I, .L_2II1
173173
.L_N1:
174174
move S1, TS
175+
andi J, N, 0x01
176+
beq ZERO, J, .L_N0
175177
beq ZERO, M, .L_N0
176178
.L_M1:
177179
fld.d F0, S1, 0x00

kernel/loongarch64/sgemm_ncopy_16_lasx.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,8 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
453453
.align 5
454454
.L_N1:
455455
move S1, TS
456+
andi J, N, 0x01
457+
beq ZERO, J, .L_N0
456458
beq ZERO, M, .L_N0
457459
.L_N1_M1:
458460
fld.s F0, S1, 0x00

kernel/loongarch64/sgemm_ncopy_8_lasx.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,10 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
288288
.align 5
289289
.L_N1:
290290
move S1, TS
291+
andi J, N, 0x01
292+
beq ZERO, J, .L_N0
291293
beq ZERO, M, .L_N0
294+
292295
.L_N1_M1:
293296
fld.s F0, S1, 0x00
294297
PTR_ADDI S1, S1, 0x04

0 commit comments

Comments
 (0)