Skip to content

Commit cdb22b8

Browse files
authored
Disable power10 kernels other than sgemm, dgemm. (#705)
Details: - There is a power10 sandbox which uses microkernels for datatypes other than float and double (or scomplex/dcomplex). In a regular power10- configured build (that is, with the sandbox disabled), there were compile errors for some of these other non-sgemm/non-dgemm microkernels. This commit protects those kernels with a new cpp macro guard (which is defined in sandbox/power10/bli_sandbox.h) that prevents that kernel code from being compiled for normal, non-sandbox power10 builds.
1 parent d220f9c commit cdb22b8

File tree

7 files changed

+26
-4
lines changed

7 files changed

+26
-4
lines changed

kernels/power10/3/bli_i16gemm_power10_mma.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
3333
*/
3434

35+
#ifdef BLIS_SANDBOX_POWER10
36+
3537
#include "vector_int_macros.h"
3638

3739
#define I16_ACCUMULATE \
@@ -139,4 +141,5 @@ void bli_i16gemm_power10_mma_8x16
139141
SAVE_ACC_bz(iv4sf_t, &acc6, rs_c, 8+4*rs_c);
140142
SAVE_ACC_bz(iv4sf_t, &acc7, rs_c, 12+4*rs_c);
141143
}
142-
}
144+
}
145+
#endif // BLIS_SANDBOX_POWER10

kernels/power10/3/bli_i16sgemm_power10_mma.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
3333
*/
3434

35+
#ifdef BLIS_SANDBOX_POWER10
36+
3537
#include "vector_int_macros.h"
3638

3739
#define I16S_ACCUMULATE \
@@ -139,4 +141,5 @@ void bli_i16sgemm_power10_mma_8x16
139141
SAVE_ACC_bz(iv4sf_t, &acc6, rs_c, 8+4*rs_c);
140142
SAVE_ACC_bz(iv4sf_t, &acc7, rs_c, 12+4*rs_c);
141143
}
142-
}
144+
}
145+
#endif // BLIS_SANDBOX_POWER10

kernels/power10/3/bli_i4gemm_power10_mma.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
3333
*/
3434

35+
#ifdef BLIS_SANDBOX_POWER10
36+
3537
#include "vector_int_macros.h"
3638

3739
#define I4_ACCUMULATE \
@@ -140,3 +142,4 @@ void bli_i4gemm_power10_mma_8x16
140142
SAVE_ACC_bz(iv4sf_t, &acc7, rs_c, 12+4*rs_c);
141143
}
142144
}
145+
#endif // BLIS_SANDBOX_POWER10

kernels/power10/3/bli_i8gemm_power10_mma.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
3333
*/
3434

35+
#ifdef BLIS_SANDBOX_POWER10
36+
3537
#include "vector_int_macros.h"
3638

3739
#define I8_ACCUMULATE \
@@ -139,3 +141,4 @@ void bli_i8gemm_power10_mma_8x16
139141
SAVE_ACC_bz(iv4sf_t, &acc7, rs_c, 12+4*rs_c);
140142
}
141143
}
144+
#endif // BLIS_SANDBOX_POWER10

kernels/power10/3/bli_sbgemm_power10_mma.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
3333
*/
3434

35+
#ifdef BLIS_SANDBOX_POWER10
36+
3537
#include "vector_int_macros.h"
3638

3739
#define B_ACCUMULATE \
@@ -140,4 +142,5 @@ void bli_sbgemm_power10_mma_8x16
140142
SAVE_ACC_bz(fv4sf_t, &acc7, rs_c, 12+4*rs_c);
141143
}
142144

143-
}
145+
}
146+
#endif // BLIS_SANDBOX_POWER10

kernels/power10/3/bli_shgemm_power10_mma.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
3333
*/
3434

35+
#ifdef BLIS_SANDBOX_POWER10
36+
3537
#include "vector_int_macros.h"
3638

3739
#define H_ACCUMULATE \
@@ -140,4 +142,5 @@ void bli_shgemm_power10_mma_8x16
140142
SAVE_ACC_bz(fv4sf_t, &acc7, rs_c, 12+4*rs_c);
141143
}
142144

143-
}
145+
}
146+
#endif // BLIS_SANDBOX_POWER10

sandbox/power10/bli_sandbox.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
#ifndef BLIS_SANDBOX_H
3636
#define BLIS_SANDBOX_H
3737

38+
#ifndef BLIS_SANDBOX_POWER10
39+
#define BLIS_SANDBOX_POWER10
40+
#endif
41+
3842
#include "blis.h"
3943
#include "gemm_prototypes.h"
4044

0 commit comments

Comments
 (0)