Add bfloat16 based dot and conversion with single/double
authorChen, Guobing <guobing.chen@intel.com>
Wed, 26 Aug 2020 22:42:28 +0000 (06:42 +0800)
committerChen, Guobing <guobing.chen@intel.com>
Thu, 3 Sep 2020 18:31:25 +0000 (02:31 +0800)
commitdeaeb6c5b89f64bbe9d5ba0126690ae5d57ae0ce
tree733ec1be6ffeddd0621107a3ce68dcd862fb4c2e
parentc7ef7174e494781f9bc8cea8b035e7f2bffbdf04
Add bfloat16 based dot and conversion with single/double

1. Added bfloat16 based dot as new API: shdot
2. Implemented generic kernel and cooperlake-specific (AVX512-BF16) kernel for shdot
3. Added 4 conversion APIs for bfloat16 data type <=> single/double: shstobf16 shdtobf16 sbf16tos dbf16tod
     shstobf16 -- convert single float array to bfloat16 array
     shdtobf16 -- convert double float array to bfloat16 array
     sbf16tos  -- convert bfloat16 array to single float array
     dbf16tod  -- convert bfloat16 array to double float array
4. Implemented generic kernels for all 4 conversion APIs, and cooperlake-specific kernel for shstobf16 and shdtobf16
5. Update level1 thread facilitate functions and macros to support multi-threading for these new APIs
6. Fix Cooperlake platform detection/specify issue when under dynamic-arch building
7. Change the typedef of bfloat16 from unsigned short to more strict uint16_t

Signed-off-by: Chen, Guobing <guobing.chen@intel.com>
31 files changed:
Makefile.tail
cblas.h
cmake/kernel.cmake
common.h
common_interface.h
common_level1.h
common_macro.h
common_param.h
common_sh.h
common_thread.h
common_x86_64.h
driver/others/blas_l1_thread.c
driver/others/blas_server.c
driver/others/blas_server_omp.c
driver/others/blas_server_win32.c
driver/others/dynamic.c
exports/gensymbol
interface/Makefile
interface/bf16dot.c [new file with mode: 0644]
interface/bf16to.c [new file with mode: 0644]
interface/tobf16.c [new file with mode: 0644]
kernel/Makefile.L1
kernel/setparam-ref.c
kernel/x86_64/KERNEL
kernel/x86_64/bf16to.c [new file with mode: 0644]
kernel/x86_64/dtobf16_microk_cooperlake.c [new file with mode: 0644]
kernel/x86_64/shdot.c [new file with mode: 0644]
kernel/x86_64/shdot_microk_cooperlake.c [new file with mode: 0644]
kernel/x86_64/stobf16_microk_cooperlake.c [new file with mode: 0644]
kernel/x86_64/tobf16.c [new file with mode: 0644]
openblas_config_template.h