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

GEMM(H, H, LR) Improvement #73

Open
wawando opened this issue Apr 25, 2022 · 0 comments
Open

GEMM(H, H, LR) Improvement #73

wawando opened this issue Apr 25, 2022 · 0 comments

Comments

@wawando
Copy link
Contributor

wawando commented Apr 25, 2022

Current gemm(H, H, LR) implementation converts C to Dense and recurse to gemm(H, H, D).

define_method(
  void, gemm_omm,
  (
    const Hierarchical& A, const Hierarchical& B, LowRank& C,
    const double alpha, const double beta,
    const bool TransA, const bool TransB
  )
) {
  Dense CD(C);
  gemm(A, B, CD, alpha, beta, TransA, TransB);
  C = LowRank(CD, C.eps); //or C = LowRank(CD, rank);
}

However, converting C to Hierarchical (e.g. use split function) might be better since this avoids unnecessary multiplications with Dense block.

  Hierarchical CH(C);
  gemm(A, B, CH, alpha, beta, TransA, TransB);
  C = LowRank(CH, C.eps); //or C = LowRank(CH, rank);

For this to work, additional LowRank constructor from a Hierarchical object is needed. Also when converting LowRank C to Hierarchical, make sure that C.eps is passed down to the resulting LowRank blocks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant