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

Fix device_copyable test #1934

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

dmitriy-sobolev
Copy link
Contributor

@dmitriy-sobolev dmitriy-sobolev commented Nov 13, 2024

It turns out that the internal range type is instantiated with older ICPX compiler versions (2024.0 and older). The error:

In file included from oneDPL/test/general/implementation_details/device_copyable.pass.cpp:18:
In file included from oneDPL/include/oneapi/dpl/execution:67:
In file included from oneDPL/include/oneapi/dpl/pstl/algorithm_impl.h:26:
In file included from oneDPL/include/oneapi/dpl/pstl/execution_impl.h:22:
In file included from oneDPL/include/oneapi/dpl/pstl/parallel_backend.h:32:
In file included from oneDPL/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h:34:
oneDPL/include/oneapi/dpl/pstl/hetero/dpcpp/../../utils_ranges.h:115:52: error: no matching function for call to '__check_size'
using __difference_t = std::make_signed_t<decltype(__check_size<_R>(0))>;
                                                   ^~~~~~~~~~~~~~~~

Simplified reproducer: https://godbolt.org/z/seajbx35d.

This PR implements the suggestion by Dan to introduce surrogate range type: #1932 (comment).

Signed-off-by: Dmitriy Sobolev <[email protected]>
Copy link
Contributor

@danhoeflinger danhoeflinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, and is what I had in mind. Please wait for green CI.
Thanks

@dmitriy-sobolev dmitriy-sobolev merged commit 91f1cd4 into main Nov 14, 2024
23 checks passed
@dmitriy-sobolev dmitriy-sobolev deleted the dev/dmitriy-sobolev/device-copyable-test branch November 14, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Test only Change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants