Skip to content

Commit

Permalink
Merge pull request #1784 from masterleinad/fix_sycl_printf
Browse files Browse the repository at this point in the history
Use KOKKOS_IMPL_DO_NOT_USE_PRINTF in Test_Common_UpperBound.hpp
  • Loading branch information
lucbv authored Apr 13, 2023
2 parents 8154037 + 4ca54ed commit b654dd6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions common/unit_test/Test_Common_UpperBound.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ struct ThreadUpperBoundFunctor {
if (0 == i) {
hv_size_type idx = KokkosKernels::upper_bound_thread(haystack_, needle_);
if (idx != expected_) {
printf("%s:%d thread %d expected %d got %d\n", __FILE__, __LINE__,
int(i), int(expected_), int(idx));
KOKKOS_IMPL_DO_NOT_USE_PRINTF("%s:%d thread %d expected %d got %d\n",
__FILE__, __LINE__, int(i),
int(expected_), int(idx));
++lerrCount;
}
}
Expand Down Expand Up @@ -99,8 +100,9 @@ struct TeamUpperBoundFunctor {
hv_size_type idx =
KokkosKernels::upper_bound_team(handle, haystack_, needle_);
if (idx != expected_) {
printf("%s:%d thread %d expected %d got %d\n", __FILE__, __LINE__,
int(handle.team_rank()), int(expected_), int(idx));
KOKKOS_IMPL_DO_NOT_USE_PRINTF("%s:%d thread %d expected %d got %d\n",
__FILE__, __LINE__, int(handle.team_rank()),
int(expected_), int(idx));
++lerrCount;
}
}
Expand Down Expand Up @@ -242,4 +244,4 @@ EXECUTE_TEST(float, TestExecSpace)
EXECUTE_TEST(double, TestExecSpace)
#endif

#undef EXECUTE_TEST
#undef EXECUTE_TEST

0 comments on commit b654dd6

Please sign in to comment.