Browse Source

make building the bfloat16 functions conditional on BUILD_HALF

pull/2590/head
Martin Kroeker GitHub 6 years ago
parent
commit
7bf1865656
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions
  1. +5
    -2
      CMakeLists.txt
  2. +3
    -0
      Makefile.rule
  3. +1
    -0
      Makefile.system

+ 5
- 2
CMakeLists.txt View File

@@ -86,10 +86,13 @@ if (NOT NO_LAPACK)
list(APPEND SUBDIRS lapack)
endif ()

if (NOT DEFINED BUILD_HALF)
set (BUILD_HALF false)
endif ()
# set which float types we want to build for
if (NOT DEFINED BUILD_SINGLE AND NOT DEFINED BUILD_DOUBLE AND NOT DEFINED BUILD_COMPLEX AND NOT DEFINED BUILD_COMPLEX16)
# if none are defined, build for all
set(BUILD_HALF true)
# set(BUILD_HALF true)
set(BUILD_SINGLE true)
set(BUILD_DOUBLE true)
set(BUILD_COMPLEX true)
@@ -121,7 +124,7 @@ if (BUILD_COMPLEX16)
list(APPEND FLOAT_TYPES "ZCOMPLEX") # defines COMPLEX and DOUBLE
endif ()

if (BUILD_SINGLE OR BUILD_HALF)
if (BUILD_HALF)
message(STATUS "Building Half Precision")
list(APPEND FLOAT_TYPES "HALF") # defines nothing
endif ()


+ 3
- 0
Makefile.rule View File

@@ -273,6 +273,9 @@ COMMON_PROF = -pg
#
# CPP_THREAD_SAFETY_TEST = 1


# If you want to enable the experimental BFLOAT16 support
# BUILD_HALF = 1
#
# End of user configuration
#

+ 1
- 0
Makefile.system View File

@@ -1395,6 +1395,7 @@ export KERNELDIR
export FUNCTION_PROFILE
export TARGET_CORE
export NO_AVX512
export BUILD_HALF

export SHGEMM_UNROLL_M
export SHGEMM_UNROLL_N


Loading…
Cancel
Save