-
Notifications
You must be signed in to change notification settings - Fork 115
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
Avoid specializations of the same submitters with the some policy type but with different type qualifiers (l-value
, r-value
)
#2093
Open
SergeyKopienko
wants to merge
52
commits into
main
Choose a base branch
from
dev/skopienko/fix_exec_policy_type_in_submitters_V1
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.
Open
+262
−239
Conversation
This file contains 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
0976051
to
0102ab8
Compare
629a956
to
e005551
Compare
l-value
, r-value
and etc.)
l-value
, r-value
and etc.)l-value
, r-value
)
fe6cd52
to
1880b1e
Compare
…allel_merge_submitter_large::operator()
…an_static_single_group_submitter::operator(), __parallel_transform_scan_dynamic_single_group_submitter::oeprator()
…up, __parallel_transform_reduce_then_scan
…tatic_single_group_submitter::operator(), __parallel_copy_if_static_single_group_submitter::operator()
…form_reduce_then_scan
…ral_registers_local_reduction_submitter::operator()
…omics_submitter::operator()
…_private_global_atomics_submitter::operator()
…rs_local_reduction, __histogram_general_local_atomics, __histogram_general_private_global_atomics
…impl, __parallel_transform_reduce_mid_impl, __parallel_transform_reduce_impl
…form_reduce_then_scan
….h - remove :: before std::decay_t in __kernel_name_generator
Co-authored-by: Dan Hoeflinger <109972525+danhoeflinger@users.noreply.github.com>
Insert example from #2041
Loading status checks…
…t case
3d9988c
to
ca5f2da
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 fix the issue #2083 and #2041
The problem statement.
Usually,
oneDPL
submitters which dosycl::queue::submit()
calls are implemented in three ways:operator()
implementation inside someclass
/struct
;submit()
function implementation inside someclass
/struct
;In all cases, these functions are template functions parametrized by
_ExecutioPolicy
type. Also they have_ExecutioPolicy&& __exec
in the list of functions parameters.This approach means that we may have two specializations of these functions:
__exec
isr-value
;The problems of this approach which already implemented in
oneDPL
:_ExecutionPolicy
type but also their qualifiers (l-value
,r-value
);The solution
As solution in this PR proposed the idea of @akukanov - to declare
_ExecutionPolicy
in submitters and on one upper level asconst _ExecutionPolicy&
(const reference).This approach fixes all point of the problem described below.
Some key changes in the code
_ExecutionPolicy
is not required inside__kernel_name_generator
template parameters anymore:-- before:
-- now:
Now we able to detect a lot of errors as described in #2041 - this test coverage implemented in the PR #2102
Another approach has been prepared in #2082
Please review this PR under switched off option "File changed - Gear button - Hide whitespace"