-
Notifications
You must be signed in to change notification settings - Fork 57
Add Unmanaged
to scratch View
in TeamPolicy example
#699
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
base: main
Are you sure you want to change the base?
Conversation
@@ -168,7 +168,7 @@ Examples | |||
int scan = team_handle.team_scan(tid+1, &global); | |||
// scan == tid*(tid+1)/2 on every thread | |||
// global == ts*(ts-1)/2 on every thread | |||
Kokkos::View<int*, policy_type::execution_space::scratch_memory_type> | |||
Kokkos::View<int*, policy_type::execution_space::scratch_memory_type, Kokkos::MemoryTraits<Kokkos::Unmanaged>> |
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.
Just to note that I couldn't find any reference to a scratch_memory_type
alias in recent versions of the code.
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.
yeah, grep shows no hits ... I will change to scratch_memory_space
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.
done 79c16f7
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 found "works" a little unclear and suggested a slight rewording. Otherwise, this looks good.
Of course, that's not required to create an unmanaged View. The example would also work without it. |
Co-authored-by: Daniel Arndt <[email protected]>
Co-authored-by: Daniel Arndt <[email protected]>
From a discussion with @dalg24 and @dholladay00 on slack.
The
Unmanaged
trait seems to be missing in the view allocation in the example. This PR also adds a hint on theScratchMemorySpace
requiringUnmanaged