Skip to content

Commit

Permalink
loosen tolerance in order-4 CP unit tests which fail on Linux CI jobs…
Browse files Browse the repository at this point in the history
… with netlib blas
  • Loading branch information
evaleev committed Sep 25, 2024
1 parent 5fcf9e1 commit be6ed6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions unittest/tensor_cp_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ TEST_CASE("CP")
btas::TUCKER_CP_ALS<tensor, conv_class> A1(d, 1e-3);
conv.set_norm(norm4);
double diff = A1.compute_rank(55, conv, 1, true, 55);
CHECK(std::abs(diff) <= epsilon);
CHECK(std::abs(diff) <= /* NB error too large with netlib blas on linux */ 3 * epsilon);
}
#endif
#if BTAS_ENABLE_RANDOM_CP_UT
Expand Down Expand Up @@ -222,7 +222,7 @@ TEST_CASE("CP")
btas::TUCKER_CP_RALS<tensor, conv_class> A1(d, 1e-3);
conv.set_norm(norm4);
double diff = A1.compute_rank(55, conv, 1, true, 55);
CHECK(std::abs(diff) <= epsilon);
CHECK(std::abs(diff) <= /* NB error too large with netlib blas on linux */ 3 * epsilon);
}
#endif
#if BTAS_ENABLE_RANDOM_CP_UT
Expand Down
4 changes: 2 additions & 2 deletions unittest/ztensor_cp_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ TEST_CASE("ZCP") {
CP_ALS<ztensor, zconv_class> A1(Z4);
conv.set_norm(norm4.real());
double diff = A1.compute_error(conv, 1e-2, 1, 100, true, 57);
CHECK(std::abs(diff) <= epsilon);
CHECK(std::abs(diff) <= /* NB error too large with netlib blas on linux */ 3 * epsilon);
}
SECTION("ALS MODE = 4, Finite rank") {
CP_ALS<ztensor, zconv_class> A1(Z4);
conv.set_norm(norm4.real());
double diff = A1.compute_rank(57, conv, 1, true, 57);
CHECK(std::abs(diff) <= epsilon);
CHECK(std::abs(diff) <= /* NB error too large with netlib blas on linux */ 3 * epsilon);
}
#if BTAS_ENABLE_TUCKER_CP_UT
SECTION("ALS MODE = 4, Tucker + CP") {
Expand Down

0 comments on commit be6ed6d

Please sign in to comment.