Make shgemm kernels conditional on BUILD_HALF

This commit is contained in:
Martin Kroeker 2020-04-29 15:58:59 +02:00 committed by GitHub
parent fd267b58b2
commit 75e0495a75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -137,7 +137,10 @@ function (build_core TARGET_CORE KDIR TSUFFIX KERNEL_DEFINITIONS)
foreach (float_type SINGLE DOUBLE HALF)
string(SUBSTRING ${float_type} 0 1 float_char)
if (${float_type} STREQUAL "HALF")
set (float_char "SH")
if (NOT ${BUILD_HALF})
continue ()
else
set (float_char "SH")
endif ()
GenerateNamedObjects("${KERNELDIR}/${${float_char}GEMMKERNEL}" "" "gemm_kernel" false "" "" false ${float_type})
endforeach()