-
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
Avoid using execution_space as View template argument #4675
Avoid using execution_space as View template argument #4675
Conversation
Retest this please. |
Is this still a work in progress or is it ready for review? |
Seems like it worked immediately. 🙂 |
algorithms/src/Kokkos_Random.hpp
Outdated
@@ -892,7 +892,7 @@ template <class DeviceType = Kokkos::DefaultExecutionSpace> | |||
class Random_XorShift64_Pool { | |||
private: | |||
using execution_space = typename DeviceType::execution_space; | |||
using locks_type = View<int**, execution_space>; | |||
using locks_type = View<int**, typename DeviceType::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.
Why not jut
using locks_type = View<int**, typename DeviceType::memory_space>; | |
using locks_type = View<int**, DeviceType>; |
containers/src/Kokkos_Bitset.hpp
Outdated
@@ -302,7 +301,8 @@ class Bitset { | |||
private: | |||
unsigned m_size; | |||
unsigned m_last_block_mask; | |||
View<unsigned*, execution_space, MemoryTraits<RandomAccess> > m_blocks; | |||
View<unsigned*, typename Device::memory_space, MemoryTraits<RandomAccess> > |
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.
View<unsigned*, typename Device::memory_space, MemoryTraits<RandomAccess> > | |
View<unsigned*, Device, MemoryTraits<RandomAccess> > |
containers/src/Kokkos_Bitset.hpp
Outdated
@@ -383,7 +383,9 @@ class ConstBitset { | |||
|
|||
private: | |||
unsigned m_size; | |||
View<const unsigned*, execution_space, MemoryTraits<RandomAccess> > m_blocks; | |||
View<const unsigned*, typename Device::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.
View<const unsigned*, typename Device::memory_space, | |
View<const unsigned*, Device, |
core/src/impl/Kokkos_ViewArray.hpp
Outdated
@@ -355,7 +355,9 @@ class ViewMapping<Traits, Kokkos::Array<>> { | |||
|
|||
using execution_space = typename alloc_prop::execution_space; | |||
using memory_space = typename Traits::memory_space; | |||
using functor_type = ViewValueFunctor<execution_space, scalar_type>; | |||
using functor_type = | |||
ViewValueFunctor<Kokkos::Device<execution_space, 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.
ViewValueFunctor<Kokkos::Device<execution_space, memory_space>, | |
ViewValueFunctor<typename Traits::device_type, |
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.
PIng
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.
See 820c00c.
Also this is not adding any test. How did you verify it resolves the issue reported? |
I checked manually compiling with I'm not quite sure if we require a test here. |
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.
After thinking it more over I agree that DeviceType is better as the type than DeviceType::memory_space, it actually is closer to the original intend of using the optimal execution memory space for the chosen execution 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.
After thinking it more over I agree that DeviceType is better as the type than DeviceType::memory_space, it actually is closer to the original intend of using the optimal execution memory space for the chosen execution space.
* Avoid using execution_space as View template argument * Prefer device type over memory space type as View template parameter * Fix one more
Should also fix #3475.