Skip to content

Commit e1de5e9

Browse files
authored
Enable shp-tests (#743)
* resolve ambiguity (format_to) * re-enable shp tests
1 parent 2d215b1 commit e1de5e9

File tree

6 files changed

+8
-10
lines changed

6 files changed

+8
-10
lines changed

.github/workflows/pr.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ jobs:
5555
- name: MHP unit tests
5656
run: ctest --test-dir build -L MHP -j 4
5757
- name: SHP unit tests
58-
# Does not work on CPU
59-
if: false
6058
run: ctest --test-dir build -L SHP -j 4
6159
- uses: actions/upload-artifact@v4
6260
if: always()

benchmarks/gbench/mhp/fft3d.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ struct fmt::formatter<std::complex<Base>, char>
3131
: public formatter<string_view> {
3232
template <typename FmtContext>
3333
auto format(std::complex<Base> c, FmtContext &ctx) const {
34-
format_to(ctx.out(), "{}+{}i", c.real(), c.imag());
34+
fmt::format_to(ctx.out(), "{}+{}i", c.real(), c.imag());
3535
return ctx.out();
3636
}
3737
};

benchmarks/gbench/shp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ if(NOT ENABLE_CUDA)
3434
target_sources(shp-bench PRIVATE ../common/black_scholes.cpp)
3535
endif()
3636
target_link_libraries(shp-bench shp-benchmark)
37-
add_shp_disabled_ctest(shp-bench shp-bench --vector-size 200000 --check)
37+
add_shp_ctest(shp-bench shp-bench --vector-size 200000 --check)
3838

3939
# builds only 1 benchmark for quick testing. Change this to the benchmark you
4040
# are testing

include/dr/detail/mdspan_utils.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,14 +260,14 @@ struct fmt::formatter<Mdspan, char> : public formatter<string_view> {
260260
index[dim] = i;
261261
if (dim == mdspan.rank() - 1) {
262262
if (i == 0) {
263-
format_to(ctx.out(), "{}: ", index);
263+
fmt::format_to(ctx.out(), "{}: ", index);
264264
}
265-
format_to(ctx.out(), "{:4} ", mdspan(index));
265+
fmt::format_to(ctx.out(), "{:4} ", mdspan(index));
266266
} else {
267267
format_mdspan(ctx, mdspan, index, dim + 1);
268268
}
269269
}
270-
format_to(ctx.out(), "\n");
270+
fmt::format_to(ctx.out(), "\n");
271271
}
272272
};
273273

include/dr/mhp/halo.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ template <>
426426
struct fmt::formatter<dr::mhp::halo_bounds> : formatter<string_view> {
427427
template <typename FmtContext>
428428
auto format(dr::mhp::halo_bounds hb, FmtContext &ctx) {
429-
return format_to(ctx.out(), "prev: {} next: {}", hb.prev, hb.next);
429+
return fmt::format_to(ctx.out(), "prev: {} next: {}", hb.prev, hb.next);
430430
}
431431
};
432432

test/gtest/shp/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ foreach(test-exec IN ITEMS shp-tests shp-tests-3 shp-quick-test)
2626
endforeach()
2727

2828
# timeout in SHP tests
29-
add_shp_disabled_ctest(shp-tests shp-tests)
30-
add_shp_disabled_ctest(shp-tests-3 shp-tests --devicesCount 3)
29+
add_shp_ctest(shp-tests shp-tests)
30+
add_shp_ctest(shp-tests-3 shp-tests --devicesCount 3)
3131

3232
add_shp_ctest(shp-tests-3-only shp-tests-3 --devicesCount 3)

0 commit comments

Comments
 (0)