Skip to content

Commit

Permalink
Disable power10 kernels other than sgemm, dgemm. (#705)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nisanthmp authored Jan 11, 2023
1 parent d220f9c commit cdb22b8
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 4 deletions.
5 changes: 4 additions & 1 deletion kernels/power10/3/bli_i16gemm_power10_mma.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
*/

#ifdef BLIS_SANDBOX_POWER10

#include "vector_int_macros.h"

#define I16_ACCUMULATE \
Expand Down Expand Up @@ -139,4 +141,5 @@ void bli_i16gemm_power10_mma_8x16
SAVE_ACC_bz(iv4sf_t, &acc6, rs_c, 8+4*rs_c);
SAVE_ACC_bz(iv4sf_t, &acc7, rs_c, 12+4*rs_c);
}
}
}
#endif // BLIS_SANDBOX_POWER10
5 changes: 4 additions & 1 deletion kernels/power10/3/bli_i16sgemm_power10_mma.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
*/

#ifdef BLIS_SANDBOX_POWER10

#include "vector_int_macros.h"

#define I16S_ACCUMULATE \
Expand Down Expand Up @@ -139,4 +141,5 @@ void bli_i16sgemm_power10_mma_8x16
SAVE_ACC_bz(iv4sf_t, &acc6, rs_c, 8+4*rs_c);
SAVE_ACC_bz(iv4sf_t, &acc7, rs_c, 12+4*rs_c);
}
}
}
#endif // BLIS_SANDBOX_POWER10
3 changes: 3 additions & 0 deletions kernels/power10/3/bli_i4gemm_power10_mma.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
*/

#ifdef BLIS_SANDBOX_POWER10

#include "vector_int_macros.h"

#define I4_ACCUMULATE \
Expand Down Expand Up @@ -140,3 +142,4 @@ void bli_i4gemm_power10_mma_8x16
SAVE_ACC_bz(iv4sf_t, &acc7, rs_c, 12+4*rs_c);
}
}
#endif // BLIS_SANDBOX_POWER10
3 changes: 3 additions & 0 deletions kernels/power10/3/bli_i8gemm_power10_mma.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
*/

#ifdef BLIS_SANDBOX_POWER10

#include "vector_int_macros.h"

#define I8_ACCUMULATE \
Expand Down Expand Up @@ -139,3 +141,4 @@ void bli_i8gemm_power10_mma_8x16
SAVE_ACC_bz(iv4sf_t, &acc7, rs_c, 12+4*rs_c);
}
}
#endif // BLIS_SANDBOX_POWER10
5 changes: 4 additions & 1 deletion kernels/power10/3/bli_sbgemm_power10_mma.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
*/

#ifdef BLIS_SANDBOX_POWER10

#include "vector_int_macros.h"

#define B_ACCUMULATE \
Expand Down Expand Up @@ -140,4 +142,5 @@ void bli_sbgemm_power10_mma_8x16
SAVE_ACC_bz(fv4sf_t, &acc7, rs_c, 12+4*rs_c);
}

}
}
#endif // BLIS_SANDBOX_POWER10
5 changes: 4 additions & 1 deletion kernels/power10/3/bli_shgemm_power10_mma.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
*/

#ifdef BLIS_SANDBOX_POWER10

#include "vector_int_macros.h"

#define H_ACCUMULATE \
Expand Down Expand Up @@ -140,4 +142,5 @@ void bli_shgemm_power10_mma_8x16
SAVE_ACC_bz(fv4sf_t, &acc7, rs_c, 12+4*rs_c);
}

}
}
#endif // BLIS_SANDBOX_POWER10
4 changes: 4 additions & 0 deletions sandbox/power10/bli_sandbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
#ifndef BLIS_SANDBOX_H
#define BLIS_SANDBOX_H

#ifndef BLIS_SANDBOX_POWER10
#define BLIS_SANDBOX_POWER10
#endif

#include "blis.h"
#include "gemm_prototypes.h"

Expand Down

0 comments on commit cdb22b8

Please sign in to comment.