Skip to content

Split the omp model into omp-for and omp-target models to avoid making extra copies of buffers - #43

Open
nicolas-bouton wants to merge 3 commits into
UoB-HPC:mainfrom
SiPearl:nb/split-omp-model-into-2-models
Open

Split the omp model into omp-for and omp-target models to avoid making extra copies of buffers#43
nicolas-bouton wants to merge 3 commits into
UoB-HPC:mainfrom
SiPearl:nb/split-omp-model-into-2-models

Conversation

@nicolas-bouton

Copy link
Copy Markdown

This MR turns the omp model into 2 models, omp-for and omp-target, avoids making extra copies of buffers for the omp-for model based on the std-range model, whereas the omp-target model is still making extra copies of buffers for the device.

The code from the omp model was used as the code for the omp-target model, since the kernel for this model was not modified, so it is clear in the git diff that the code for this model is not touched.

The Kokkos cmake file was also modified to let the user use an already compiled Kokkos library.

Remove occurences of `#pragma omp parallel for`. And doesn't change the behavior
of the cmake, same variables need to be passed to enable offloading.

* CMakeLists.txt,
src/main.cpp,
src/omp-target/fasten.hpp,
src/omp-target/model.cmake: Here.

Signed-off-by: Nicolas Bouton <nicolas.bouton@sipearl.com>
Provide a revised version of the `#pragma omp parallel for` implementation that
avoids making extra copies of buffers (like the std-ranges model), reducing
memory overhead and improving performance.

* CMakeLists.txt,
src/main.cpp,
src/omp-for/fasten.hpp,
src/omp-for/model.cmake: Here.

Signed-off-by: Nicolas Bouton <nicolas.bouton@sipearl.com>
* src/kokkos/model.cmake: Here.

Signed-off-by: Nicolas Bouton <nicolas.bouton@sipearl.com>
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.

1 participant