Browse Source

Merge pull request #3705 from RajalakshmiSR/bf16ppc

POWER: Enable bfloat16 kernels by default
tags/v0.3.21
Martin Kroeker GitHub 3 years ago
parent
commit
78da6a750a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions
  1. +1
    -0
      Makefile.system
  2. +6
    -0
      test/compare_sgemm_sbgemm.c

+ 1
- 0
Makefile.system View File

@@ -263,6 +263,7 @@ ifeq ($(ARCH), x86_64)
SMALL_MATRIX_OPT = 1
else ifeq ($(ARCH), power)
SMALL_MATRIX_OPT = 1
BUILD_BFLOAT16 = 1
endif
ifeq ($(SMALL_MATRIX_OPT), 1)
CCOMMON_OPT += -DSMALL_MATRIX_OPT


+ 6
- 0
test/compare_sgemm_sbgemm.c View File

@@ -51,9 +51,15 @@ typedef union
float v;
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 e:8;
uint32_t s:1;
#endif
} bits;
} float32_bits;



Loading…
Cancel
Save