Skip to content

Commit

Permalink
add also gpu test
Browse files Browse the repository at this point in the history
  • Loading branch information
albestro committed May 27, 2024
1 parent 43f4df5 commit 8ff6a8e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/unit/permutations/test_permutations_distributed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ struct PermutationsDistTestMC : public TestWithCommGrids {};

TYPED_TEST_SUITE(PermutationsDistTestMC, RealMatrixElementTypes);

#ifdef DLAF_WITH_GPU
template <class T>
struct PermutationsDistTestGPU : public TestWithCommGrids {};

TYPED_TEST_SUITE(PermutationsDistTestGPU, RealMatrixElementTypes);
#endif

// n, nb, i_begin, i_end, permutation
// permutation has to be defined using element indices wrt to the range described by [i_begin, i_end)
// tiles and not global indices.
Expand Down Expand Up @@ -265,3 +272,17 @@ TYPED_TEST(PermutationsDistTestMC, ColumnsLocal) {
}
}
}

#ifdef DLAF_WITH_GPU
TYPED_TEST(PermutationsDistTestGPU, ColumnsLocal) {
using T = TypeParam;
constexpr auto GPU = Device::GPU;

for (auto& comm_grid : this->commGrids()) {
for (const auto& [n, nb, i_begin, i_end] : params2) {
testDistPermutationsAsLocal<T, GPU, Coord::Col>(comm_grid, n, nb, i_begin, i_end);
pika::wait();
}
}
}
#endif

0 comments on commit 8ff6a8e

Please sign in to comment.