Skip to content

Commit

Permalink
Merge support for ensemble build
Browse files Browse the repository at this point in the history
This allows building and testing all backends simultaneously in a single binary.
Required CMake flags:
```
cmake -GNinja -DCMAKE_CXX_COMPILER=dpcpp -DOpenMP_CXX_FLAGS=-qopenmp -DOpenMP_CXX_LIB_NAMES=libiomp5 -DOpenMP_libiomp5_LIBRARY=/opt/intel/oneapi/compiler/latest/linux/compiler/lib/intel64_lin/libiomp5.so 
```

Related PR: #1333
  • Loading branch information
upsj authored Jul 6, 2023
2 parents 64e9a4b + 4755c23 commit d60b02c
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 14 deletions.
7 changes: 0 additions & 7 deletions include/ginkgo/core/base/math.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <ginkgo/core/base/utils.hpp>


// Using SYCL_LANGUAGE_VERSION will lead the mismatch sycl namespace from 6.0.0
// when using dpcpp compiler without dpcpp module
#if GINKGO_DPCPP_MAJOR_VERSION
#include <CL/sycl.hpp>
#endif


namespace gko {


Expand Down
6 changes: 6 additions & 0 deletions test/matrix/fft_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ TYPED_TEST(Fft, Apply1DIsEqualToReference)

TYPED_TEST(Fft, ApplyStrided1DIsEqualToReference)
{
#if defined(GKO_COMPILING_HIP) && GINKGO_HIP_PLATFORM_HCC
GTEST_SKIP() << "rocFFT has a bug related to strided 1D FFT";
#endif
using T = typename TestFixture::value_type;

this->fft->apply(this->data_strided, this->out_strided);
Expand All @@ -160,6 +163,9 @@ TYPED_TEST(Fft, Apply1DInverseIsEqualToReference)

TYPED_TEST(Fft, ApplyStrided1DInverseIsEqualToReference)
{
#if defined(GKO_COMPILING_HIP) && GINKGO_HIP_PLATFORM_HCC
GTEST_SKIP() << "rocFFT has a bug related to strided 1D FFT";
#endif
using T = typename TestFixture::value_type;

this->ifft->apply(this->data_strided, this->out_strided);
Expand Down
5 changes: 4 additions & 1 deletion test/mpi/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
add_subdirectory(distributed)
ginkgo_create_common_and_reference_test(matrix MPI_SIZE 3 DISABLE_EXECUTORS dpcpp)
ginkgo_create_common_and_reference_test(vector MPI_SIZE 3)

add_subdirectory(preconditioner)
add_subdirectory(solver)
4 changes: 0 additions & 4 deletions test/mpi/distributed/CMakeLists.txt

This file was deleted.

1 change: 0 additions & 1 deletion test/mpi/distributed/preconditioner/CMakeLists.txt

This file was deleted.

File renamed without changes.
1 change: 1 addition & 0 deletions test/mpi/preconditioner/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ginkgo_create_common_and_reference_test(schwarz MPI_SIZE 3 DISABLE_EXECUTORS dpcpp)
File renamed without changes.
2 changes: 1 addition & 1 deletion test/mpi/solver/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ginkgo_create_common_and_reference_test(solver MPI_SIZE 3)
ginkgo_create_common_and_reference_test(solver MPI_SIZE 3 DISABLE_EXECUTORS dpcpp)
File renamed without changes.
5 changes: 5 additions & 0 deletions test/solver/idr_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <gtest/gtest.h>


#ifdef GKO_COMPILING_DPCPP
#include <CL/sycl.hpp>
#endif


#include <ginkgo/core/base/array.hpp>
#include <ginkgo/core/base/exception.hpp>
#include <ginkgo/core/base/executor.hpp>
Expand Down

0 comments on commit d60b02c

Please sign in to comment.