Skip to content

Commit

Permalink
Splines tuning cpu (#239)
Browse files Browse the repository at this point in the history
* tuning cpu

* tuning
  • Loading branch information
blegouix authored Nov 23, 2023
1 parent c8cd5f0 commit 0f72c16
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions benchmarks/splines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,14 @@ int par_chunks_per_seq_chunk_ref = 1;
unsigned int preconditionner_max_block_size_ref = 1u;
#elif defined(KOKKOS_ENABLE_OPENMP)
std::string chip = "cpu";
int cols_per_par_chunk_ref = 512;
int cols_per_par_chunk_ref = 256;
int par_chunks_per_seq_chunk_ref = Kokkos::OpenMP().concurrency();
unsigned int preconditionner_max_block_size_ref = 8u;
unsigned int preconditionner_max_block_size_ref = 32u;
#elif defined(KOKKOS_ENABLE_SERIAL)
std::string chip = "cpu";
int cols_per_par_chunk_ref = 512;
int cols_per_par_chunk_ref = 256;
int par_chunks_per_seq_chunk_ref = 1;
unsigned int preconditionner_max_block_size_ref = 8u;
unsigned int preconditionner_max_block_size_ref = 32u;
#endif

BENCHMARK(characteristics_advection)
Expand Down
8 changes: 4 additions & 4 deletions include/ddc/kernels/splines/matrix_sparse.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ class Matrix_Sparse : public Matrix
} else {
#ifdef KOKKOS_ENABLE_SERIAL
if (std::is_same_v<ExecSpace, Kokkos::Serial>) {
m_cols_per_par_chunk = 512;
m_cols_per_par_chunk = 256;
}
#endif
#ifdef KOKKOS_ENABLE_OPENMP
if (std::is_same_v<ExecSpace, Kokkos::OpenMP>) {
m_cols_per_par_chunk = 512;
m_cols_per_par_chunk = 256;
}
#endif
#ifdef KOKKOS_ENABLE_CUDA
Expand Down Expand Up @@ -117,12 +117,12 @@ class Matrix_Sparse : public Matrix
} else {
#ifdef KOKKOS_ENABLE_SERIAL
if (std::is_same_v<ExecSpace, Kokkos::Serial>) {
m_preconditionner_max_block_size = 8u;
m_preconditionner_max_block_size = 32u;
}
#endif
#ifdef KOKKOS_ENABLE_OPENMP
if (std::is_same_v<ExecSpace, Kokkos::OpenMP>) {
m_preconditionner_max_block_size = 8u;
m_preconditionner_max_block_size = 32u;
}
#endif
#ifdef KOKKOS_ENABLE_CUDA
Expand Down

0 comments on commit 0f72c16

Please sign in to comment.