POWER: Enable bfloat16 kernels by default
This patch enables bfloat16 kernels by default for POWER processors. Tested on Linux POWER8, POWER9, POWER10 and AIX POWER10 systems.
This commit is contained in:
parent
047a279f09
commit
1d97405c02
|
@ -263,6 +263,7 @@ ifeq ($(ARCH), x86_64)
|
||||||
SMALL_MATRIX_OPT = 1
|
SMALL_MATRIX_OPT = 1
|
||||||
else ifeq ($(ARCH), power)
|
else ifeq ($(ARCH), power)
|
||||||
SMALL_MATRIX_OPT = 1
|
SMALL_MATRIX_OPT = 1
|
||||||
|
BUILD_BFLOAT16 = 1
|
||||||
endif
|
endif
|
||||||
ifeq ($(SMALL_MATRIX_OPT), 1)
|
ifeq ($(SMALL_MATRIX_OPT), 1)
|
||||||
CCOMMON_OPT += -DSMALL_MATRIX_OPT
|
CCOMMON_OPT += -DSMALL_MATRIX_OPT
|
||||||
|
|
|
@ -51,9 +51,15 @@ typedef union
|
||||||
float v;
|
float v;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||||
|
uint32_t s:1;
|
||||||
|
uint32_t e:8;
|
||||||
|
uint32_t m:23;
|
||||||
|
#else
|
||||||
uint32_t m:23;
|
uint32_t m:23;
|
||||||
uint32_t e:8;
|
uint32_t e:8;
|
||||||
uint32_t s:1;
|
uint32_t s:1;
|
||||||
|
#endif
|
||||||
} bits;
|
} bits;
|
||||||
} float32_bits;
|
} float32_bits;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue