-
Notifications
You must be signed in to change notification settings - Fork 115
Extend test coverage for different policy qualifiers #2102
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
Draft
SergeyKopienko
wants to merge
55
commits into
main
Choose a base branch
from
dev/skopienko/extend_test_coverage_for_diff_policy_qualifiers
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Extend test coverage for different policy qualifiers #2102
SergeyKopienko
wants to merge
55
commits into
main
from
dev/skopienko/extend_test_coverage_for_diff_policy_qualifiers
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SergeyKopienko
commented
Mar 5, 2025
1929dc4
to
7e76a2a
Compare
SergeyKopienko
commented
Mar 5, 2025
SergeyKopienko
commented
Mar 5, 2025
The approach looks good to me to detect these sorts of issues assuming the compiler does not optimize out kernel compilation due to the |
SergeyKopienko
commented
Mar 6, 2025
736f5db
to
1ce4b3c
Compare
14aeb4a
to
717584a
Compare
717584a
to
580eeba
Compare
ecca23e
to
10fa5a2
Compare
…move temporary instance of sycl::queue
…or both cases - when TEST_DPCPP_BACKEND_PRESENT is defined and when TEST_DPCPP_BACKEND_PRESENT isn't defined
…orgotten std::forward<Policy>(exec) call
…ME + CLONE_NEW_POLICY + check compilation
…ME + CLONE_NEW_POLICY + check compilation
…d declaration of struct / class in Kernel names
…ompile_checker and create create_compile_checker(_ExecutionPolicy&& policy) function
…ompile_checker and create create_compile_checker(_ExecutionPolicy&& policy) function - apply in tests
…parameter of test_with_usm functions spezialization
…ass.cpp - fix compile error: avoid forward declaration of struct / class in Kernel names
…x compile error: forgot to specify policy type in template parameters
…ation of struct / class in Kernel names
…x compile error: avoid forward declaration of struct / class in Kernel names
…rs: extract lambdas from template code which depends on execution policy type
…mpile error: avoid forward declaration of struct / class in Kernel names
…void forward declaration of struct / class in Kernel names
…ompile error: avoid forward declaration of struct / class in Kernel names
… CREATE_NEW_POLICY_WITH_NAME + check compilation
0c278e8
to
763c97e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this PR we extend test coverage to detect compile-time errors in oneDPL code like described at #2041.
We extend test coverage under
false
-run-time condition check so we only compile additional Kernels without their runs.This idea was proposed by @danhoeflinger.
Also in this PR we modified a lot of tests.
The goal - to pass temporary created execution policies inside
oneDPL
algorithms asl-value
/r-value
depends on qualifiers of execution policy passed from test environment. This mandatory needed for detect compile errors...mangled name already used...
insideoneDPL
Kernel's code.Implementation details.
To achieve this goal we implements two things in tests:
l-value
/r-value
:CREATE_NEW_POLICY
macros to simplify creation and passing into calling algorithm new temporary execution policy:As result, now in
oneDPL
tests we are simplified a lot of code:Iterator result = ::std::adjacent_find(make_new_policy<new_kernel_name<Policy, 0>>(exec), first, last, comp);
in this code we passed new temporary execution policy into
oneDPL
algorithm asExecutionPolicy&&
(r-value
) and it's hide a lot of compile errors inoneDPL
Kernels when we going tomove
execution policy intooneDPL
algorithms in test environment.Iterator result = ::std::adjacent_find(CREATE_NEW_POLICY(exec, 0), first, last, comp);
in this code we passed new temporary execution policy into
oneDPL
algorithm with qualifiers which depends on source execution policy (exec
) type qualifiers (l-value
/r-value
).