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

Workaround Windows correctness issue in reduce_by_segment.pass #1771

Merged
merged 2 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -346,13 +346,22 @@ run_test()
int
main()
{
// On Windows, we observe incorrect results with this test with a specific compilation order of the
julianmi marked this conversation as resolved.
Show resolved Hide resolved
// kernels. This is being filed to the compiler team. In the meantime, we can rearrange this test
// to resolve the issue on our side.
#if _PSTL_RED_BY_SEG_WINDOWS_COMPILE_ORDER_BROKEN
SergeyKopienko marked this conversation as resolved.
Show resolved Hide resolved
run_test<MatrixPoint<float>, UserBinaryPredicate<MatrixPoint<float>>, MaxFunctor<MatrixPoint<float>>>();
#endif

#if TEST_DPCPP_BACKEND_PRESENT
// test with flag pred
test_flag_pred<sycl::usm::alloc::device, class KernelName1, std::uint64_t>();
test_flag_pred<sycl::usm::alloc::device, class KernelName2, MatrixPoint<float>>();
#endif // TEST_DPCPP_BACKEND_PRESENT

#if !_PSTL_RED_BY_SEG_WINDOWS_COMPILE_ORDER_BROKEN
run_test<MatrixPoint<float>, UserBinaryPredicate<MatrixPoint<float>>, MaxFunctor<MatrixPoint<float>>>();
#endif

run_test<int, ::std::equal_to<int>, ::std::plus<int>>();
run_test<float, ::std::equal_to<float>, ::std::plus<float>>();
Expand Down
5 changes: 5 additions & 0 deletions test/support/test_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,4 +221,9 @@
# define _PSTL_ICPX_FPGA_TEST_USM_VECTOR_ITERATOR_BROKEN 0
#endif

// A specific kernel compilation order causes incorrect results on Windows with the DPCPP backend. For now, we reorder
// the test while the issue is being reported to the compiler team. Once it is resolved, this macro can be removed
// or limited to older compiler versions.
#define _PSTL_RED_BY_SEG_WINDOWS_COMPILE_ORDER_BROKEN (_MSC_VER && TEST_DPCPP_BACKEND_PRESENT)
danhoeflinger marked this conversation as resolved.
Show resolved Hide resolved

#endif // _TEST_CONFIG_H
Loading