diff --git a/CMakeLists.txt b/CMakeLists.txt index 17b5dcd1b..ba751526b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -175,6 +175,17 @@ if(SYCL_CTS_MEASURE_BUILD_TIMES) endif() # ------------------ +# ------------------ +# Math builtin fragment size option +set(SYCL_CTS_MATH_BUILTIN_FRAGMENT_SIZE "230" CACHE STRING +"Control the size of the fragment files generated for the math builtin tests.\ + Decreasing this may help increase the parallelizability of the compilation of\ + the math builtin, but may also increase the overall compilation time.") +if(NOT "${SYCL_CTS_MATH_BUILTIN_FRAGMENT_SIZE}" MATCHES "^[1-9][0-9]*$") + message(FATAL_ERROR "SYCL_CTS_MATH_BUILTIN_FRAGMENT_SIZE (${SYCL_CTS_MATH_BUILTIN_FRAGMENT_SIZE}) must be an integer greater than 0.") +endif() +# ------------------ + enable_testing() add_subdirectory(util) diff --git a/tests/math_builtin_api/CMakeLists.txt b/tests/math_builtin_api/CMakeLists.txt index 8b80d5430..4483a760f 100644 --- a/tests/math_builtin_api/CMakeLists.txt +++ b/tests/math_builtin_api/CMakeLists.txt @@ -30,7 +30,7 @@ foreach(cat ${MATH_CAT_WITH_VARIANT}) FILE_PREFIX "math_builtin_${cat}_${var}" EXT "cpp" INPUT "math_builtin.template" - EXTRA_ARGS -test ${cat} -variante ${var} -marray true -fragment-size 150 + EXTRA_ARGS -test ${cat} -variante ${var} -marray true -fragment-size ${SYCL_CTS_MATH_BUILTIN_FRAGMENT_SIZE} DEPENDS ${math_builtin_depends} ) endforeach() @@ -44,7 +44,7 @@ foreach(cat ${MATH_CAT}) FILE_PREFIX "math_builtin_${cat}" EXT "cpp" INPUT "math_builtin.template" - EXTRA_ARGS -test ${cat} -marray true -fragment-size 150 + EXTRA_ARGS -test ${cat} -marray true -fragment-size ${SYCL_CTS_MATH_BUILTIN_FRAGMENT_SIZE} DEPENDS ${math_builtin_depends} ) endforeach()