-
Notifications
You must be signed in to change notification settings - Fork 5
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
KOKKOS_FUNCTION-annotated for_each and transform_reduce #708
Draft
blegouix
wants to merge
29
commits into
CExA-project:main
Choose a base branch
from
blegouix:annotated_for_each
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
Changes from 28 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
a8a4cbc
init
blegouix 2ce680e
wip
blegouix 00469c3
wip
blegouix 81d8c9b
wip
blegouix 4b83f7c
wip
blegouix f6d53fc
wip
blegouix df3da08
fix
blegouix 98866b4
Apply suggestions from code review
blegouix d1f17f6
Apply suggestions from code review
blegouix f85b51a
Apply suggestions from code review
blegouix 63b15d8
Apply suggestions from code review
blegouix 8edf5fd
wip
blegouix 95ba907
Update for_each.hpp
blegouix ef388cd
Update transform_reduce.hpp
blegouix 102f0a9
Update for_each.cpp
blegouix b8a31a5
Update transform_reduce.cpp
blegouix b1d7075
clang-format
blegouix fa63605
wip
blegouix be9d263
doc
blegouix bbc693f
doc
blegouix ce927d9
1D test with for_each
blegouix f73122f
nonsense fix
blegouix 5a2b798
Apply suggestions from code review
blegouix 615f922
clang-format
blegouix 6a3625e
HIPCC_COMPATIBLE_MAYBE_UNUSED
blegouix 382d5b1
doc
blegouix 6c37f29
comment the issue with nvcc
blegouix 73ee089
fix attempt for hipcc
blegouix 484f996
remove static_cast<int>
blegouix 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
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.
This
static_cast<int>
is a nonsense workaround sinceElement
aliasesstd::size_t
. Without it the loop does not iterate withnvcc
in the new tests.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.
What does it print if you remove the cast ?
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.
begin[I]
is0
as expected 🤷 but still it does not iterate.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.
(if I print something inside the loop it appears only once)
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.
If it can print something inside the loop it means it can iterate once ?
What is the value of end[I] ?
Have you tried to run in debug ?
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.
sorry what do you want me to print inside the loop ? In my tests i was just printing a string like "test", not "%i" involved
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.
You could print
ii
?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.
Kokkos::printf("%llu\n", ii);
prints0
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.
I do reproduce with
g++-12
, but not with-G
, so it seems to be an optimization issue indeed.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.
I don't see anything with compute-sanitizer (tried every
--tool
)