-
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
Shared Memory Allocation Error at parallel_reduce #311
Comments
Both Bugs are confirmed. |
Ok I know what is going on with the shared memory size not being set and I know roughly what is going on with the first one not compiling. Both of those will get addressed as part of my work on adding a better generic reduction interface, and some internal code cleanup. For now you can work around the shared memory issue by setting the scratch size via the policy instead of the functor: Kokkos::parallel_reduce( team_policy_t(1, TEAMSIZE, VECTORSIZE).set_scratch_size(1,Kokkos::PerTeam(16384)), myfunc2(), reduction); |
This should fix part of issue #311. Not sure yet about the parallel for and parallel reduce operator in the same functor.
The shared memory thingy is fixed. The "can't compile thing" would be much harder, and for now my position is to retreat to: "If you want more than one operator in a class, you must use the Tag mechanism to distinguish them, even if they are technically distinguishable through the fact that one is a reduction operator the other one is not." The reason for that is that the internal Functor inspection would be getting more complicated, and its already complicated enough. |
Thanks Christian! |
Reopening until pushed to master |
This should fix part of issue kokkos#311. Not sure yet about the parallel for and parallel reduce operator in the same functor.
Team scratch memory allocations fail with parallel_reduce. Below is a simple example, where memory allocation works for parallel_for but fails for parallel_reduce. Also, for some reason I get a compile error if I uncomment the below line
Kokkos::parallel_reduce( team_policy_t(1, 8, 32), myfunc1(), reduction);
in the code.
The text was updated successfully, but these errors were encountered: