Skip to content

GEMM(H, H, LR) Improvement #73

Description

@wawando

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions