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

Test hemm no yield async rw mutex #1207

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions ci/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
include:
- local: 'ci/cpu/asan_ubsan_lsan.yml'
# - local: 'ci/cpu/asan_ubsan_lsan.yml'
- local: 'ci/cpu/clang15_release_cxx20.yml'
- local: 'ci/cpu/clang15_release_stdexec.yml'
- local: 'ci/cpu/clang15_release.yml'
- local: 'ci/cpu/clang16_release.yml'
- local: 'ci/cpu/clang18_release.yml'
- local: 'ci/cpu/gcc11_release_stdexec.yml'
- local: 'ci/cpu/gcc11_debug_stdexec.yml'
# - local: 'ci/cpu/gcc11_debug_stdexec.yml'
- local: 'ci/cpu/gcc12_release_cxx20.yml'
- local: 'ci/cpu/gcc13_codecov.yml'
# - local: 'ci/cpu/gcc13_codecov.yml'
- local: 'ci/cpu/gcc13_release.yml'
- local: 'ci/cuda/gcc11_release.yml'
- local: 'ci/cuda/gcc11_release_scalapack.yml'
- local: 'ci/cuda/gcc11_codecov.yml'
- local: 'ci/cuda/gcc11_debug_scalapack.yml'
- local: 'ci/cuda/gcc13_release_stdexec.yml'
- local: 'ci/rocm/clang14_release.yml'
- local: 'ci/rocm/clang14_release_stdexec.yml'
# - local: 'ci/cuda/gcc11_release.yml'
# - local: 'ci/cuda/gcc11_release_scalapack.yml'
# - local: 'ci/cuda/gcc11_codecov.yml'
# - local: 'ci/cuda/gcc11_debug_scalapack.yml'
# - local: 'ci/cuda/gcc13_release_stdexec.yml'
# - local: 'ci/rocm/clang14_release.yml'
# - local: 'ci/rocm/clang14_release_stdexec.yml'
4 changes: 2 additions & 2 deletions ci/ctest_to_gitlab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ JOB_TEMPLATE="
USE_MPI: 'YES'
DISABLE_AFTER_SCRIPT: 'YES'
DLAF_HDF5_TEST_OUTPUT_PATH: \$CI_PROJECT_DIR
script: mpi-ctest -L {{LABEL}}
script: mpi-ctest --timeout 300 --repeat-until-fail 50 -R test_multiplication_hermitian -L {{LABEL}}
artifacts:
paths:
- codecov-reports/"
Expand Down Expand Up @@ -100,7 +100,7 @@ JOB_TEMPLATE="
USE_MPI: 'YES'
DISABLE_AFTER_SCRIPT: 'YES'
DLAF_HDF5_TEST_OUTPUT_PATH: \$CI_PROJECT_DIR
script: mpi-ctest -L {{LABEL}}"
script: mpi-ctest --timeout 60 --repeat-until-fail 50 -R test_multiplication_hermitian -L {{LABEL}}"
fi

JOBS=""
Expand Down
3 changes: 3 additions & 0 deletions ci/docker/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ packages:
# Force git as non-buildable to allow deprecated versions in environments
# https://github.com/spack/spack/pull/30040
buildable: false
pika:
require:
- '@git.no-yield-async-rw-mutex=0.29.0'
131 changes: 74 additions & 57 deletions test/unit/multiplication/test_multiplication_hermitian.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,16 @@ void testHermitianMultiplication(const blas::Side side, const blas::Uplo uplo, c
// SCOPED_TRACE cannot yield.
mat_ch.waitLocalTiles();
SCOPED_TRACE(::testing::Message() << "m " << m << "n " << n << ", mb " << mb << ", nb " << nb);
auto t_before = pika::get_worker_thread_num();
CHECK_MATRIX_NEAR(res_c, mat_ch, 10 * (m + 1) * TypeUtilities<T>::error,
10 * (m + 1) * TypeUtilities<T>::error);
auto t_after = pika::get_worker_thread_num();
if (t_before != t_after) {
std::cerr << "worker thread index changed from " << t_before << " to " << t_after << std::endl;
}
else {
std::cerr << "worker thread index is still " << t_before << std::endl;
}
}

template <class T, Backend B, Device D>
Expand Down Expand Up @@ -154,70 +162,79 @@ TYPED_TEST(HermitianMultiplicationTestMC, CorrectnessLocal) {
if (side != blas::Side::Left || uplo != blas::Uplo::Lower)
continue;
for (const auto& [m, n, mb, nb] : sizes) {
std::cerr << "side: " << side;
std::cerr << ", uplo: " << uplo;
std::cerr << ", m: " << m;
std::cerr << ", n: " << n;
std::cerr << ", mb: " << mb;
std::cerr << ", nb: " << nb << std::endl;
TypeParam alpha = TypeUtilities<TypeParam>::element(-1.2, .7);
TypeParam beta = TypeUtilities<TypeParam>::element(1.12, -.1);

testHermitianMultiplication<TypeParam, Backend::MC, Device::CPU>(side, uplo, m, n, mb, nb, alpha,
beta);
pika::wait();
std::cerr << "done\n";
}
}
}
}

TYPED_TEST(HermitianMultiplicationTestMC, CorrectnessDistributed) {
for (auto& comm_grid : this->commGrids()) {
for (const auto side : blas_sides) {
for (const auto uplo : blas_uplos) {
if (side != blas::Side::Left || uplo != blas::Uplo::Lower)
continue;

for (const auto& [m, n, mb, nb] : sizes) {
TypeParam alpha = TypeUtilities<TypeParam>::element(-1.2, .7);
TypeParam beta = TypeUtilities<TypeParam>::element(1.12, -.1);

testHermitianMultiplication<TypeParam, Backend::MC, Device::CPU>(comm_grid, side, uplo, m, n,
mb, nb, alpha, beta);
pika::wait();
}
}
}
}
}

#ifdef DLAF_WITH_GPU
TYPED_TEST(HermitianMultiplicationTestGPU, CorrectnessLocal) {
for (const auto side : blas_sides) {
for (const auto uplo : blas_uplos) {
if (side != blas::Side::Left || uplo != blas::Uplo::Lower)
continue;
for (const auto& [m, n, mb, nb] : sizes) {
TypeParam alpha = TypeUtilities<TypeParam>::element(-1.2, .7);
TypeParam beta = TypeUtilities<TypeParam>::element(1.12, -.1);

testHermitianMultiplication<TypeParam, Backend::GPU, Device::GPU>(side, uplo, m, n, mb, nb,
alpha, beta);
}
}
}
}

TYPED_TEST(HermitianMultiplicationTestGPU, CorrectnessDistributed) {
for (auto& comm_grid : this->commGrids()) {
for (const auto side : blas_sides) {
for (const auto uplo : blas_uplos) {
if (side != blas::Side::Left || uplo != blas::Uplo::Lower)
continue;

for (const auto& [m, n, mb, nb] : sizes) {
TypeParam alpha = TypeUtilities<TypeParam>::element(-1.2, .7);
TypeParam beta = TypeUtilities<TypeParam>::element(1.12, -.1);

testHermitianMultiplication<TypeParam, Backend::GPU, Device::GPU>(comm_grid, side, uplo, m, n,
mb, nb, alpha, beta);
pika::wait();
}
}
}
}
}
#endif
// TYPED_TEST(HermitianMultiplicationTestMC, CorrectnessDistributed) {
// for (auto& comm_grid : this->commGrids()) {
// for (const auto side : blas_sides) {
// for (const auto uplo : blas_uplos) {
// if (side != blas::Side::Left || uplo != blas::Uplo::Lower)
// continue;

// for (const auto& [m, n, mb, nb] : sizes) {
// TypeParam alpha = TypeUtilities<TypeParam>::element(-1.2, .7);
// TypeParam beta = TypeUtilities<TypeParam>::element(1.12, -.1);

// testHermitianMultiplication<TypeParam, Backend::MC, Device::CPU>(comm_grid, side, uplo, m, n,
// mb, nb, alpha, beta);
// pika::wait();
// }
// }
// }
// }
// }

// #ifdef DLAF_WITH_GPU
// TYPED_TEST(HermitianMultiplicationTestGPU, CorrectnessLocal) {
// for (const auto side : blas_sides) {
// for (const auto uplo : blas_uplos) {
// if (side != blas::Side::Left || uplo != blas::Uplo::Lower)
// continue;
// for (const auto& [m, n, mb, nb] : sizes) {
// TypeParam alpha = TypeUtilities<TypeParam>::element(-1.2, .7);
// TypeParam beta = TypeUtilities<TypeParam>::element(1.12, -.1);

// testHermitianMultiplication<TypeParam, Backend::GPU, Device::GPU>(side, uplo, m, n, mb, nb,
// alpha, beta);
// pika::wait();
// }
// }
// }
// }

// TYPED_TEST(HermitianMultiplicationTestGPU, CorrectnessDistributed) {
// for (auto& comm_grid : this->commGrids()) {
// for (const auto side : blas_sides) {
// for (const auto uplo : blas_uplos) {
// if (side != blas::Side::Left || uplo != blas::Uplo::Lower)
// continue;

// for (const auto& [m, n, mb, nb] : sizes) {
// TypeParam alpha = TypeUtilities<TypeParam>::element(-1.2, .7);
// TypeParam beta = TypeUtilities<TypeParam>::element(1.12, -.1);

// testHermitianMultiplication<TypeParam, Backend::GPU, Device::GPU>(comm_grid, side, uplo, m, n,
// mb, nb, alpha, beta);
// pika::wait();
// }
// }
// }
// }
// }
// #endif
Loading