Skip to content

Commit 795285c

Browse files
committed
Fix thinko in skylake beta handling
casting ints is cheaper but it has a rounding, not memory casing effect, resulting in invalid outcome
1 parent e1eab96 commit 795285c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

kernel/x86_64/dgemm_beta_skylakex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1, FLOAT beta,
5050
FLOAT ctemp5, ctemp6, ctemp7, ctemp8;
5151

5252
/* fast path.. just zero the whole matrix */
53-
if (m == ldc && (unsigned long)beta == (unsigned long)ZERO) {
53+
if (m == ldc && beta == ZERO) {
5454
memset(c, 0, m * n * sizeof(FLOAT));
5555
return 0;
5656
}

kernel/x86_64/sgemm_beta_skylakex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1, FLOAT beta,
5050
FLOAT ctemp5, ctemp6, ctemp7, ctemp8;
5151

5252
/* fast path.. just zero the whole matrix */
53-
if (m == ldc && (unsigned long)beta == (unsigned long)ZERO) {
53+
if (m == ldc && beta == ZERO) {
5454
memset(c, 0, m * n * sizeof(FLOAT));
5555
return 0;
5656
}

0 commit comments

Comments
 (0)