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

Fix nightly builds following promotion of the math functions in Kokkos #1339

Merged
merged 4 commits into from
Feb 23, 2022
Merged
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
4 changes: 2 additions & 2 deletions perf_test/blas/blas3/KokkosBlas3_gemm_perf_test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1574,8 +1574,8 @@ static inline bool __gemm_print_compare_failure(ViewType h_expected,
ViewType h_actual, int i, int j,
int k, double epsilon) {
STATUS;
auto diff = static_cast<double>(Kokkos::Experimental::fabs(
static_cast<double>(h_expected(i, j, k) - h_actual(i, j, k))));
auto diff =
std::fabs(static_cast<double>(h_expected(i, j, k) - h_actual(i, j, k)));

if (diff > epsilon) {
printf(
Expand Down
13 changes: 9 additions & 4 deletions src/batched/dense/impl/KokkosBatched_SVD_Serial_Internal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,15 @@ struct SerialSVDInternal {
KOKKOS_INLINE_FUNCTION static void symEigen2x2(value_type a11, value_type a21,
value_type a22, value_type& e1,
value_type& e2) {
value_type a = Kokkos::ArithTraits<value_type>::one();
value_type b = -a11 - a22;
value_type c = a11 * a22 - a21 * a21;
value_type sqrtDet = Kokkos::Experimental::sqrt(b * b - 4 * a * c);
value_type a = Kokkos::ArithTraits<value_type>::one();
value_type b = -a11 - a22;
value_type c = a11 * a22 - a21 * a21;
#if KOKKOS_VERSION >= 30699
using Kokkos::sqrt;
#else
using Kokkos::Experimental::sqrt;
#endif
value_type sqrtDet = sqrt(b * b - 4 * a * c);
e1 = (-b + sqrtDet) / (2 * a);
e2 = (-b - sqrtDet) / (2 * a);
}
Expand Down
2 changes: 1 addition & 1 deletion unit_test/batched/dense/Test_Batched_SerialSVD.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ double simpleNorm2(const Vector& v) {
double m = KAT::abs(vhost(i));
d += m * m;
}
return Kokkos::Experimental::sqrt(d);
return std::sqrt(d);
}

template <typename V1, typename V2>
Expand Down