Skip to content

Commit

Permalink
Add SYCL_CTS_MATH_BUILTIN_FRAGMENT_SIZE option
Browse files Browse the repository at this point in the history
Signed-off-by: Larsen, Steffen <[email protected]>
  • Loading branch information
steffenlarsen committed Jan 2, 2025
1 parent cb940f9 commit 34c138b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tests/math_builtin_api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 230
EXTRA_ARGS -test ${cat} -variante ${var} -marray true -fragment-size ${SYCL_CTS_MATH_BUILTIN_FRAGMENT_SIZE}
DEPENDS ${math_builtin_depends}
)
endforeach()
Expand All @@ -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 230
EXTRA_ARGS -test ${cat} -marray true -fragment-size ${SYCL_CTS_MATH_BUILTIN_FRAGMENT_SIZE}
DEPENDS ${math_builtin_depends}
)
endforeach()
Expand Down

0 comments on commit 34c138b

Please sign in to comment.