Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test] Reduce test input sizes for debug builds with OpenMP in transform_binary.pass #1921

Merged
merged 4 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ if (ONEDPL_BACKEND MATCHES "^(tbb|dpcpp|dpcpp_only)$")

target_compile_definitions(oneDPL INTERFACE
$<$<CONFIG:Debug>:TBB_USE_DEBUG=1>
$<$<CONFIG:Debug>:PSTL_USE_DEBUG>
$<$<CONFIG:Debug>:PSTL_USE_DEBUG=1>
dmitriy-sobolev marked this conversation as resolved.
Show resolved Hide resolved
$<$<BOOL:${SET_BACKEND_DPCPP_ONLY}>:ONEDPL_USE_TBB_BACKEND=0>
$<$<BOOL:${SET_BACKEND_TBB}>:ONEDPL_USE_DPCPP_BACKEND=0>
)
Expand Down Expand Up @@ -340,6 +340,7 @@ elseif(ONEDPL_BACKEND MATCHES "^(omp)$")
target_link_libraries(oneDPL INTERFACE OpenMP::OpenMP_CXX)
endif()
target_compile_definitions(oneDPL INTERFACE
$<$<CONFIG:Debug>:PSTL_USE_DEBUG=1>
ONEDPL_USE_TBB_BACKEND=0
ONEDPL_USE_DPCPP_BACKEND=0
ONEDPL_USE_OPENMP_BACKEND=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,15 @@ template <::std::size_t CallNumber, typename In1, typename In2, typename Out, ty
void
test(Predicate pred, _IteratorAdapter adap = {})
{
for (size_t n = 0; n <= 100000; n = n <= 16 ? n + 1 : size_t(3.1415 * n))
// Testing is restricted for debug build + OpenMp backend as without optimization the compiler generates
dmitriy-sobolev marked this conversation as resolved.
Show resolved Hide resolved
// very slow code leading to test timeouts.
size_t max_n =
#if PSTL_USE_DEBUG && ONEDPL_USE_OPENMP_BACKEND
10000;
#else
100000;
#endif
for (size_t n = 0; n <= max_n; n = n <= 16 ? n + 1 : size_t(3.1415 * n))
{
Sequence<In1> in1(n, [](size_t k) { return k % 5 != 1 ? In1(3 * k + 7) : 0; });
Sequence<In2> in2(n, [](size_t k) { return k % 7 != 2 ? In2(5 * k + 5) : 0; });
Expand Down
Loading