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

Reuse scratch memory in SYCL TeamPolicy #3889

Merged
merged 4 commits into from
Apr 27, 2021

Conversation

masterleinad
Copy link
Contributor

@masterleinad masterleinad commented Mar 25, 2021

Similar to #3873, we can reuse the scratch memory allocated for TeamPolicy.

@masterleinad masterleinad marked this pull request as ready for review March 26, 2021 04:13
@masterleinad
Copy link
Contributor Author

The whole implementation is pretty much taken from the Cuda backend.

core/src/SYCL/Kokkos_SYCL_Instance.cpp Outdated Show resolved Hide resolved
core/src/SYCL/Kokkos_SYCL_Parallel_Team.hpp Outdated Show resolved Hide resolved
core/src/SYCL/Kokkos_SYCL_Parallel_Team.hpp Outdated Show resolved Hide resolved
@dalg24
Copy link
Member

dalg24 commented Mar 31, 2021

Plz rebase

@masterleinad
Copy link
Contributor Author

Plz rebase

Done.

Copy link
Member

@dalg24 dalg24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good other than the header includes

@@ -42,6 +42,7 @@
//@HEADER
*/

#include <Kokkos_Core.hpp>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you including <Kokkos_Core.hpp>?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for kokkos_malloc. I could try forward declaring in Kokkos_core_fwd.hpp instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just makes little sense to include everything and below include selected headers.

@crtrott crtrott merged commit 4ca3803 into kokkos:develop Apr 27, 2021
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

Successfully merging this pull request may close these issues.

None yet

4 participants