Skip to content
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

update requirements for ReducerArgumentNonConst #498

Open
nmm0 opened this issue Feb 12, 2024 · 2 comments
Open

update requirements for ReducerArgumentNonConst #498

nmm0 opened this issue Feb 12, 2024 · 2 comments
Assignees

Comments

@nmm0
Copy link
Contributor

nmm0 commented Feb 12, 2024

Parallel reduce requirements say:

If ExecPolicy is TeamThreadRange a “reducing” functor is not allowed and the ReducerArgument must satisfy the Reducer concept or ReducerArgumentNonConst must be a POD type with operator += and operator = or a Kokkos::View

Rather we would like requirements that reflect that the type is:

  • default constructible
  • copyable
  • and "behaves ok when cudaMemcpy is called on it"
@nmm0
Copy link
Contributor Author

nmm0 commented Feb 12, 2024

sycl has an applicable requirement "Device copyable": https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#sec::device.copyable

@ajpowelsnl
Copy link
Contributor

TODO:

  • Check parallel_reduce documentation, and verify behavior that is accurately described (i.e., POD types are no longer a thing in a thing);
  • Remove mention of POD (for C++ 20 and beyond) info from our documentation; a POD object does not have user-defined constructors
  • Understand if current behavior (above) is the same as desired behavior
  • Please verify that if a CPU pointer is copied to device, you get "correct" behavior; i.e., the type (copied from CPU) must be device-usable and is correct, without pointers to host memory spaces

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants