-
Notifications
You must be signed in to change notification settings - Fork 113
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
Add code change workaround for 64-bit reduce_by_segment bug #1791
Open
mmichel11
wants to merge
3
commits into
main
Choose a base branch
from
dev/mmichel11/red_by_seg_driver_bug_workaround
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.
+14
−50
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,21 +34,11 @@ namespace unseq_backend | |
//This optimization depends on Intel(R) oneAPI DPC++ Compiler implementation such as support of binary operators from std namespace. | ||
//We need to use defined(SYCL_IMPLEMENTATION_INTEL) macro as a guard. | ||
|
||
template <typename _Tp> | ||
inline constexpr bool __can_use_known_identity = | ||
# if ONEDPL_WORKAROUND_FOR_IGPU_64BIT_REDUCTION | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it okay if we directly remove this macro check, or should it be deprecated first with a |
||
// When ONEDPL_WORKAROUND_FOR_IGPU_64BIT_REDUCTION is defined as non-zero, we avoid using known identity for 64-bit arithmetic data types | ||
!(::std::is_arithmetic_v<_Tp> && sizeof(_Tp) == sizeof(::std::uint64_t)); | ||
# else | ||
true; | ||
# endif // ONEDPL_WORKAROUND_FOR_IGPU_64BIT_REDUCTION | ||
|
||
//TODO: To change __has_known_identity implementation as soon as the Intel(R) oneAPI DPC++ Compiler implementation issues related to | ||
//std::multiplies, std::bit_or, std::bit_and and std::bit_xor operations will be fixed. | ||
//std::logical_and and std::logical_or are not supported in Intel(R) oneAPI DPC++ Compiler to be used in sycl::inclusive_scan_over_group and sycl::reduce_over_group | ||
template <typename _BinaryOp, typename _Tp> | ||
using __has_known_identity = ::std::conditional_t< | ||
__can_use_known_identity<_Tp>, | ||
using __has_known_identity = | ||
# if _ONEDPL_LIBSYCL_VERSION >= 50200 | ||
typename ::std::disjunction< | ||
__dpl_sycl::__has_known_identity<_BinaryOp, _Tp>, | ||
|
@@ -60,16 +50,15 @@ using __has_known_identity = ::std::conditional_t< | |
::std::is_same<::std::decay_t<_BinaryOp>, __dpl_sycl::__minimum<_Tp>>, | ||
::std::is_same<::std::decay_t<_BinaryOp>, __dpl_sycl::__minimum<void>>, | ||
::std::is_same<::std::decay_t<_BinaryOp>, __dpl_sycl::__maximum<_Tp>>, | ||
::std::is_same<::std::decay_t<_BinaryOp>, __dpl_sycl::__maximum<void>>>>>, | ||
::std::is_same<::std::decay_t<_BinaryOp>, __dpl_sycl::__maximum<void>>>>>; | ||
# else //_ONEDPL_LIBSYCL_VERSION >= 50200 | ||
typename ::std::conjunction< | ||
::std::is_arithmetic<_Tp>, | ||
::std::disjunction<::std::is_same<::std::decay_t<_BinaryOp>, ::std::plus<_Tp>>, | ||
::std::is_same<::std::decay_t<_BinaryOp>, ::std::plus<void>>, | ||
::std::is_same<::std::decay_t<_BinaryOp>, __dpl_sycl::__plus<_Tp>>, | ||
::std::is_same<::std::decay_t<_BinaryOp>, __dpl_sycl::__plus<void>>>>, | ||
::std::is_same<::std::decay_t<_BinaryOp>, __dpl_sycl::__plus<void>>>>; | ||
# endif //_ONEDPL_LIBSYCL_VERSION >= 50200 | ||
::std::false_type>; // This is for the case of __can_use_known_identity<_Tp>==false | ||
|
||
#else //_USE_GROUP_ALGOS && defined(SYCL_IMPLEMENTATION_INTEL) | ||
|
||
|
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
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
Oops, something went wrong.
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.
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.
Let's use
__val_type
instead ofauto
- it's will more readable, I think.