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
Use Kokkos in functions struct replacing TBB #14633
Use Kokkos in functions struct replacing TBB #14633
Conversation
@masterleinad @kronbichler What would be a good setup to test this? I am happy to run some extended performance tests. |
If I configure with Kokkos_ENABLE_THREADS or Kokkos_ENABLE_OPENMP, right? Any preference between them or anything else we need to know? It would also be sensible to check if we see no overhead for an MPI-only run where one would not want vector operations to be threaded... |
Probably better to use OpenMP over threads. You want to set |
The benchmark in #2496 (comment) using |
/rebuild |
Kokkos::View<T *, typename MemorySpace::kokkos_space> new_values) | ||
: values_host_buffer(Kokkos::View<T *, Kokkos::HostSpace>("host buffer", 0)) | ||
, values(new_values) |
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're just copying new_values
twice this way. Make it a const
reference to avoid one of them.
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 need this constructor anymore anyway. It probably makes sense to replace MemorySpaceData
with Kokkos::View
at least internally in most places.
@masterleinad What do you want to do with this PR? |
I don't have plans to pursue this further at the moment. The performance results weren't that convincing when I initially opened this pull request. |
Currently, we are using TBB for most vector operations on the host and
Kokkos
for theDefault
memory space. This pull request unifies the implementation by always usingKokkos
. We should evaluate if the performance on the host is acceptable (ifKokkos
was configured with a parallel host execution space).