Skip to content

Commit ca86016

Browse files
committed
add timeout for the mhp-bench and add jira issue IDs`
1 parent 5e8079f commit ca86016

File tree

5 files changed

+64
-61
lines changed

5 files changed

+64
-61
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ function(add_mhp_ctest_impl)
223223
if(DEFINED AMC_TIMEOUT)
224224
set_tests_properties(${AMC_TEST_NAME} PROPERTIES TIMEOUT ${AMC_TIMEOUT})
225225
else()
226-
set_tests_properties(${AMC_TEST_NAME} PROPERTIES TIMEOUT 600)
226+
set_tests_properties(${AMC_TEST_NAME} PROPERTIES TIMEOUT 60)
227227
endif()
228228

229229
if(AMC_TESTLABEL)

benchmarks/gbench/common/distributed_vector.cpp

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -163,18 +163,20 @@ void check_reduce(T actual) {
163163
}
164164
}
165165

166-
// template <class... BackendT> static void Reduce_DR(benchmark::State &state) {
167-
// T actual{};
168-
// xhp::distributed_vector<T, BackendT...> src(default_vector_size, fill);
169-
// Stats stats(state, sizeof(T) * src.size(), 0);
170-
// for (auto _ : state) {
171-
// for (std::size_t i = 0; i < default_repetitions; i++) {
172-
// stats.rep();
173-
// actual = xhp::reduce(src);
174-
// }
175-
// }
176-
// check_reduce(actual);
177-
// }
166+
template <class... BackendT>
167+
[[maybe_unused]] static void Reduce_DR(benchmark::State &state) {
168+
T actual{};
169+
xhp::distributed_vector<T, BackendT...> src(default_vector_size, fill);
170+
Stats stats(state, sizeof(T) * src.size(), 0);
171+
for (auto _ : state) {
172+
for (std::size_t i = 0; i < default_repetitions; i++) {
173+
stats.rep();
174+
actual = xhp::reduce(src);
175+
}
176+
}
177+
check_reduce(actual);
178+
}
179+
// disabled due to DRA-134
178180
// DR_BENCHMARK(Reduce_DR);
179181

180182
#ifdef DRISHMEM

benchmarks/gbench/mhp/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ add_executable(
2222
mpi.cpp)
2323
# cmake-format: on
2424

25+
# disabled with SYCL due to DRA-135
2526
if(NOT ENABLE_SYCL)
2627
target_sources(mhp-bench PRIVATE mdspan.cpp)
2728
endif()
@@ -66,12 +67,12 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release" AND NOT MPI_IMPL STREQUAL "openmpi")
6667
# intermittent fails with: ONEAPI_DEVICE_SELECTOR=opencl:cpu mpirun -n 1
6768
# ./mhp-bench --vector-size 30000 --rows 100 --columns 100 --check
6869
add_mhp_ctest(
69-
NAME mhp-bench TARGS --vector-size 30000 --rows 100 --columns 100 --check
70-
--benchmark_filter=-FFT3D.*)
70+
NAME mhp-bench TIMEOUT 200 TARGS --vector-size 30000 --rows 100 --columns
71+
100 --check --benchmark_filter=-FFT3D.*)
7172
if(ENABLE_SYCL)
7273
add_mhp_ctest(
73-
NAME mhp-bench SYCL TARGS --vector-size 30000 --rows 100 --columns 100
74-
--check --benchmark_filter=-.*DPL.*)
74+
NAME mhp-bench TIMEOUT 200 SYCL TARGS --vector-size 30000 --rows 100
75+
--columns 100 --check --benchmark_filter=-.*DPL.*)
7576
endif()
7677
endif()
7778

benchmarks/gbench/mhp/shallow_water.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1286,7 +1286,8 @@ int main(int argc, char *argv[]) {
12861286

12871287
static void ShallowWater_DR(benchmark::State &state) {
12881288

1289-
int n = 1400;
1289+
// changed from 1400 to reduce CI time
1290+
int n = 140;
12901291
std::size_t nread, nwrite, nflop;
12911292
ShallowWater::calculate_complexity(n, n, nread, nwrite, nflop);
12921293
Stats stats(state, nread, nwrite, nflop);

benchmarks/gbench/mhp/stencil_2d.cpp

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -465,50 +465,49 @@ DR_BENCHMARK(Stencil2D_Reference);
465465
// Distributed vector of floats. Granularity ensures segments contain
466466
// whole rows. Explicitly process segments SPMD-style with SYCL
467467
//
468-
// static void Stencil2D_SegmentedSYCL_DR(benchmark::State &state) {
469-
// auto s = default_shape();
470-
// auto rows = s[0];
471-
// auto cols = s[1];
472-
473-
// if (rows == 0) {
474-
// return;
475-
// }
476-
477-
// auto dist = dr::mhp::distribution().halo(cols).granularity(cols);
478-
// dr::mhp::distributed_vector<T> a(rows * cols, init_val, dist);
479-
// dr::mhp::distributed_vector<T> b(rows * cols, init_val, dist);
480-
// Stats stats(state, sizeof(T) * a.size(), sizeof(T) * b.size());
481-
482-
// // fails on devcloud
483-
// // Checker checker;
484-
// auto in =
485-
// dr::mhp::local_segment(rng::subrange(a.begin() + cols, a.end() -
486-
// cols));
487-
// auto out =
488-
// dr::mhp::local_segment(rng::subrange(b.begin() + cols, b.end() -
489-
// cols));
490-
// auto size = rng::size(in);
491-
// assert(size % cols == 0);
492-
// auto row_slice = size / cols;
493-
494-
// auto q = dr::mhp::sycl_queue();
495-
// sycl::range global(row_slice, cols - 2);
496-
497-
// for (auto _ : state) {
498-
// for (std::size_t s = 0; s < stencil_steps; s++) {
499-
// stats.rep();
500-
// auto op = [=](auto it) {
501-
// stencil_1darray_op(in, out, cols, it[0], it[1] + 1);
502-
// };
503-
// dr::mhp::halo(stencil_steps % 2 ? b : a).exchange();
504-
// q.parallel_for(sycl::range(row_slice, cols - 2), op).wait();
505-
// std::swap(in, out);
506-
// }
507-
// // fails on devcloud
508-
// // checker.check(stencil_steps % 2 ? b : a);
509-
// }
510-
// }
468+
[[maybe_unused]] static void
469+
Stencil2D_SegmentedSYCL_DR(benchmark::State &state) {
470+
auto s = default_shape();
471+
auto rows = s[0];
472+
auto cols = s[1];
473+
474+
if (rows == 0) {
475+
return;
476+
}
477+
478+
auto dist = dr::mhp::distribution().halo(cols).granularity(cols);
479+
dr::mhp::distributed_vector<T> a(rows * cols, init_val, dist);
480+
dr::mhp::distributed_vector<T> b(rows * cols, init_val, dist);
481+
Stats stats(state, sizeof(T) * a.size(), sizeof(T) * b.size());
482+
483+
// fails on devcloud
484+
// Checker checker;
485+
auto in =
486+
dr::mhp::local_segment(rng::subrange(a.begin() + cols, a.end() - cols));
487+
auto out =
488+
dr::mhp::local_segment(rng::subrange(b.begin() + cols, b.end() - cols));
489+
auto size = rng::size(in);
490+
assert(size % cols == 0);
491+
auto row_slice = size / cols;
492+
493+
auto q = dr::mhp::sycl_queue();
494+
sycl::range global(row_slice, cols - 2);
511495

496+
for (auto _ : state) {
497+
for (std::size_t s = 0; s < stencil_steps; s++) {
498+
stats.rep();
499+
auto op = [=](auto it) {
500+
stencil_1darray_op(in, out, cols, it[0], it[1] + 1);
501+
};
502+
dr::mhp::halo(stencil_steps % 2 ? b : a).exchange();
503+
q.parallel_for(sycl::range(row_slice, cols - 2), op).wait();
504+
std::swap(in, out);
505+
}
506+
// fails on devcloud
507+
// checker.check(stencil_steps % 2 ? b : a);
508+
}
509+
}
510+
// disabled due to DRA-136
512511
// DR_BENCHMARK(Stencil2D_SegmentedSYCL_DR);
513512

514513
#endif // SYCL_LANGUAGE_VERSION

0 commit comments

Comments
 (0)