-
Notifications
You must be signed in to change notification settings - Fork 114
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
Bugfix to decay Policy for __result_and_scratch_storage
#2031
Conversation
Signed-off-by: Dan Hoeflinger <[email protected]>
Signed-off-by: Dan Hoeflinger <[email protected]>
(reverting part of #1997) Signed-off-by: Dan Hoeflinger <[email protected]>
Signed-off-by: Dan Hoeflinger <[email protected]>
Signed-off-by: Dan Hoeflinger <[email protected]>
@@ -1369,8 +1371,8 @@ __parallel_partition_copy(oneapi::dpl::__internal::__device_backend_tag __backen | |||
oneapi::dpl::__par_backend_hetero::__write_to_id_if_else<oneapi::dpl::__internal::__pstl_assign>; | |||
try | |||
{ | |||
return __parallel_reduce_then_scan_copy(__backend_tag, __exec, __rng, __result, __n, _GenMask{__pred}, | |||
_WriteOp{}, | |||
return __parallel_reduce_then_scan_copy(__backend_tag, std::forward<_ExecutionPolicy>(__exec), __rng, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
@@ -1543,17 +1546,18 @@ __parallel_set_op(oneapi::dpl::__internal::__device_backend_tag __backend_tag, c | |||
{ | |||
try | |||
{ | |||
return __parallel_set_reduce_then_scan(__backend_tag, __exec, __rng1, __rng2, __result, __comp, | |||
__is_op_difference); | |||
return __parallel_set_reduce_then_scan(__backend_tag, std::forward<_ExecutionPolicy>(__exec), __rng1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
@@ -2492,8 +2497,8 @@ __parallel_reduce_by_segment(oneapi::dpl::__internal::__device_backend_tag, cons | |||
try | |||
{ | |||
auto __res = oneapi::dpl::__par_backend_hetero::__parallel_reduce_by_segment_reduce_then_scan( | |||
oneapi::dpl::__internal::__device_backend_tag{}, __exec, __keys, __values, __out_keys, __out_values, | |||
__binary_pred, __binary_op); | |||
oneapi::dpl::__internal::__device_backend_tag{}, std::forward<_ExecutionPolicy>(__exec), __keys, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
@danhoeflinger , you wrote in description of this PR: May you explain how this bug has been fixed on |
The bug is in the usage of Perhaps we can add a using statement to define |
Signed-off-by: Dan Hoeflinger <[email protected]>
@mmichel11 @SergeyKopienko please look at #2033, do we like that additional change? It makes usage easier, but obfuscates what is going on. Edit: I've incorporated those changes. I think they are for the better on the whole. |
* improve usage pattern for reduce_and_scratch_storage Signed-off-by: Dan Hoeflinger <[email protected]> * adjust names Signed-off-by: Dan Hoeflinger <[email protected]> * missed a couple names to change Signed-off-by: Dan Hoeflinger <[email protected]> * adding comment Signed-off-by: Dan Hoeflinger <[email protected]> * Formatting Signed-off-by: Dan Hoeflinger <[email protected]> --------- Signed-off-by: Dan Hoeflinger <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Always decay the policy before use in
__result_and_scratch_storage
.This also reverts some of #1997 which was working around this bug in the usage of
__result_and_scratch_storage
.Also, there are some minor improvements to the template arguments of the reduce submitter to require the decayed policy used in
__result_and_scratch_storage
to match the policy used to submit.