-
Notifications
You must be signed in to change notification settings - Fork 407
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
SharedHostPinnedSpace
alias in fwd declaration
#5405
Conversation
d97c10d
to
43f177e
Compare
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.
Needs the "does this exist" macro and constexpr bool.
43f177e
to
e1d4eb3
Compare
using SharedSpace = HostSpace; | ||
using SharedSpace = HostSpace; |
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.
not sure what clang-format is doing here ...
using SharedHostPinnedSpace = HIPHostPinnedSpace; | ||
#define KOKKOS_HAS_SHARED_HOST_PINNED_SPACE 1 | ||
#elif defined(KOKKOS_ENABLE_SYCL) | ||
using SharedHostPinnedSpace = Experimental::SYCLHostUSMSpace; | ||
#define KOKKOS_HAS_SHARED_HOST_PINNED_SPACE 1 | ||
#elif !defined(KOKKOS_ENABLE_OPENACC) && !defined(KOKKOS_ENABLE_OPENMPTARGET) | ||
using SharedHostPinnedSpace = HostSpace; | ||
#define KOKKOS_HAS_SHARED_HOST_PINNED_SPACE 1 |
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.
... and here ...
is added in 5ae6d4 |
Co-authored-by: Damien L-G <dalg24+github@gmail.com>
ab0f14b
to
2430226
Compare
Co-authored-by: Damien L-G <dalg24+github@gmail.com>
Co-authored-by: Damien L-G <dalg24+github@gmail.com>
@@ -196,7 +196,7 @@ using SharedSpace = Experimental::SYCLSharedUSMSpace; | |||
#define KOKKOS_HAS_SHARED_SPACE 1 |
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.
Would you remind me why we gave this a value instead of using a simple
#define KOKKOS_HAS_SHARED_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.
my reasoning was to allow using it inside an if
... even though we have the constexp
var
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 like it but this was already there. Maybe we can discuss at the developer meeting today and possibly update in a follow up PR.
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.
Sounds good.
my reasoning was to allow using it inside an if ... even though we have the constexp var godbolt.org/z/TdoWfrMoG
In that case, I would have expected that the macro is defined with value 0 if the feature is not available.
Co-authored-by: Damien L-G <dalg24+github@gmail.com>
Co-authored-by: Damien L-G <dalg24+github@gmail.com>
Kokkos::RangePolicy<ExecutionSpace, Kokkos::IndexType<size_t>>{ | ||
0, view_.size()}, | ||
*this, Kokkos::Sum<unsigned>(numErrors)); | ||
Kokkos::fence(); |
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.
Why did you add a fence by the way?
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.
That fence is not needed.
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.
None of the two fences are
Retest this please. |
CUDA-10.1-Clang-Tidy shows:
|
Retest this please |
1 similar comment
Retest this please |
Will need a rebase after #5289 is merged -> done
At the moment there is no
SharedHostPinnedSpace
forOpenMPTarget
andOpenACC
.The unittest checks the existance of the alias and asserts that the changes made in one ExecutionSpace are visible in the other.
Some of the examples/tutorials could be changed to use the new
SharedSpace
andSharedHostPinnedSpace
-> separate prSharedHostPinnedSpace
documentation kokkos-core-wiki#177