Skip to content

Commit

Permalink
Try to get RALS working
Browse files Browse the repository at this point in the history
  • Loading branch information
kmp5VT committed Jan 22, 2024
1 parent fd015d5 commit 0c66507
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions btas/generic/cp_als.h
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,7 @@ namespace btas {
Tensor temp(A[n].extent(0), rank);
Tensor an(A[n].range());

}
#ifdef BTAS_HAS_INTEL_MKL

// Computes the Khatri-Rao product intermediate
Expand Down
9 changes: 3 additions & 6 deletions unittest/ztensor_cp_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,17 +146,14 @@ TEST_CASE("ZCP") {
SECTION("RALS MODE = 4, Finite rank") {
CP_RALS<ztensor, zconv_class> A1(Z4);
conv.set_norm(norm4.real());
double diff = A1.compute_rank(65, conv, 1, true, 65);
double diff = A1.compute_rank(67, conv, 1, true, 65);
CHECK(std::abs(diff) <= epsilon);
}
SECTION("RALS MODE = 4, Finite error"){
CP_RALS<ztensor, zconv_class> A1(Z4);
conv.set_norm(norm4.real());
double diff = A1.compute_error(conv, 1e-5, 1, 100, true, 65);
std::cout.precision(16);
std::cout << diff << std::endl;
std::cout << epsilon << std::endl;
std::cout << A1.get_factor_matrices()[1].extent(1) << std::endl;
conv.verbose(true);
double diff = A1.compute_error(conv, 1e-5, 1, 67, true, 65);
CHECK(std::abs(diff) <= epsilon);
}
#if BTAS_ENABLE_TUCKER_CP_UT
Expand Down

0 comments on commit 0c66507

Please sign in to comment.