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

Execution spaces: support for memory backends and execution policies #543

Merged
merged 56 commits into from
Dec 19, 2022

Conversation

cnpetra
Copy link
Collaborator

@cnpetra cnpetra commented Sep 7, 2022

Abstraction needed to support multiple hardware backends. The goal is to allow multiple "backends" to run concurrently, e.g., Cuda/Hip linear algebra with Raja linear algebra. This proposed implementation differentiates between memory backend and execution policy to allow using Raja with Umpire memory, Raja with Cuda/Hip memory, or Raja with std memory.

Passes tests on Crusher (with Umpire memory backend and RAJA exec policies), in addition to all the CIs. Tested with CUDA memory backend and RAJA exec policies manually on Ascent.

@cnpetra cnpetra marked this pull request as draft September 7, 2022 16:13
@cnpetra cnpetra changed the title Abstraction of execution spaces: support for memory backends Execution spaces: support for memory backends and execution policies Sep 28, 2022
@cnpetra cnpetra marked this pull request as ready for review December 9, 2022 19:55
Copy link
Collaborator

@cameronrutherford cameronrutherford left a comment

Choose a reason for hiding this comment

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

Perhaps the biggest PR I have ever reviewed. Amazing work @cnpetra, and while I made 43 comments, they are all relatively minor.

src/Drivers/Sparse/CMakeLists.txt Show resolved Hide resolved
tests/LinAlg/vectorTestsRajaPar.hpp Show resolved Hide resolved
tests/LinAlg/vectorTestsPar.hpp Show resolved Hide resolved
tests/LinAlg/vectorTestsRajaPar.cpp Show resolved Hide resolved
tests/LinAlg/vectorTestsPar.cpp Show resolved Hide resolved
src/LinAlg/hiopVectorRajaImpl.hpp Show resolved Hide resolved
src/LinAlg/hiopVectorRajaImpl.hpp Outdated Show resolved Hide resolved
void hiopVectorRajaPar::print(FILE* file/*=nullptr*/, const char* msg/*=nullptr*/, int max_elems/*=-1*/, int rank/*=-1*/) const
template<class MEM, class POL>
void hiopVectorRaja<MEM,POL>::
print(FILE* file, const char* msg/*=NULL*/, int max_elems/*=-1*/, int rank/*=-1*/) const
Copy link
Collaborator

Choose a reason for hiding this comment

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

These default values should be enforced either in header file or here... I commented on another function that had default values removed, so wanted to make sure that functionality wasn't lost.

src/LinAlg/hiopVectorRajaImpl.hpp Show resolved Hide resolved
src/LinAlg/hiopVectorRajaImpl.hpp Outdated Show resolved Hide resolved
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.

3 participants