Skip to content

Direct Solver: Skeletonization#30

Merged
inducer merged 8 commits intoinducer:mainfrom
alexfikl:direct-solver-skeletonization
Jun 30, 2022
Merged

Direct Solver: Skeletonization#30
inducer merged 8 commits intoinducer:mainfrom
alexfikl:direct-solver-skeletonization

Conversation

@alexfikl
Copy link
Collaborator

Attempting to break up the direct solver MR into smaller, more reviewable pieces. As a rundown

  • [Done] Add proxy generation (already in linalg.proxy).
  • [Current] Add single-level skeletonization.
  • [TODO] Add multi-level skeletonization.
  • [TODO] Add the actual multi-level direct solver.

Previously found https://gitlab.tiker.net/inducer/pytential/-/merge_requests/211.
The code for this is mostly in the deprecated https://gitlab.tiker.net/inducer/pytential/-/merge_requests/137.

@alexfikl alexfikl force-pushed the direct-solver-skeletonization branch from add8d42 to de75fa8 Compare March 4, 2021 22:18
Base automatically changed from master to main March 8, 2021 05:22
@alexfikl alexfikl marked this pull request as draft March 24, 2021 23:17
@alexfikl alexfikl force-pushed the direct-solver-skeletonization branch from 169c617 to 840e8ff Compare May 26, 2021 20:14
This was referenced Jun 3, 2021
@alexfikl alexfikl force-pushed the direct-solver-skeletonization branch 4 times, most recently from eca3be7 to 2baf1f3 Compare June 10, 2021 14:57
@alexfikl alexfikl force-pushed the direct-solver-skeletonization branch from 2baf1f3 to 72915ec Compare June 16, 2021 16:20
@alexfikl alexfikl force-pushed the direct-solver-skeletonization branch 2 times, most recently from f3feb25 to 6efd2b6 Compare June 30, 2021 20:24
@alexfikl alexfikl force-pushed the direct-solver-skeletonization branch from 6aae775 to d89d687 Compare August 18, 2021 00:05
@alexfikl alexfikl force-pushed the direct-solver-skeletonization branch from d89d687 to c0bc55a Compare September 27, 2021 21:08
@alexfikl alexfikl force-pushed the direct-solver-skeletonization branch from 64563d9 to 149f785 Compare January 14, 2022 20:16
@alexfikl alexfikl force-pushed the direct-solver-skeletonization branch 3 times, most recently from 1fff384 to 5045ee9 Compare January 31, 2022 16:57
@alexfikl alexfikl force-pushed the direct-solver-skeletonization branch from ff25741 to eaa5224 Compare February 5, 2022 02:07
@alexfikl alexfikl force-pushed the direct-solver-skeletonization branch 2 times, most recently from a4a312b to cbd4860 Compare February 16, 2022 15:38
@alexfikl alexfikl force-pushed the direct-solver-skeletonization branch from cbd4860 to 7b942b6 Compare February 23, 2022 16:41
@alexfikl alexfikl force-pushed the direct-solver-skeletonization branch 2 times, most recently from 39325fe to c6c830a Compare March 28, 2022 17:19
@alexfikl alexfikl force-pushed the direct-solver-skeletonization branch 2 times, most recently from 86430ec to 8b8ec2a Compare April 6, 2022 18:11
@alexfikl alexfikl force-pushed the direct-solver-skeletonization branch from 46813d8 to ffccac0 Compare April 18, 2022 00:42
@alexfikl alexfikl marked this pull request as ready for review April 18, 2022 01:12
@alexfikl alexfikl force-pushed the direct-solver-skeletonization branch from 9a0341b to 06a015e Compare April 19, 2022 01:37
@alexfikl alexfikl force-pushed the direct-solver-skeletonization branch from a6d3146 to 844a499 Compare May 5, 2022 01:45
@alexfikl alexfikl mentioned this pull request May 8, 2022
1 task
@alexfikl alexfikl force-pushed the direct-solver-skeletonization branch 2 times, most recently from 40ede23 to 6e37dd8 Compare June 12, 2022 06:16
@alexfikl alexfikl force-pushed the direct-solver-skeletonization branch from 64a04c5 to 471a0c7 Compare June 19, 2022 07:13
@alexfikl
Copy link
Collaborator Author

alexfikl commented Jun 19, 2022

@inducer Gave this another read and it's looking very boring to me now (i.e. no big sketchy issues). It should be good to go!

@alexfikl alexfikl requested a review from inducer June 19, 2022 12:45
@alexfikl alexfikl force-pushed the direct-solver-skeletonization branch from 471a0c7 to 07f392e Compare June 24, 2022 06:54
@inducer inducer force-pushed the direct-solver-skeletonization branch from 07f392e to 0e6e4f7 Compare June 29, 2022 23:46
@inducer
Copy link
Owner

inducer commented Jun 29, 2022

LGTM, thanks! While I was reading, I saw various things I thought that would be nice to have, but generally nothing that I thought warranted holding this up. It's been long enough!

@inducer inducer enabled auto-merge (rebase) June 29, 2022 23:48
@inducer inducer merged commit b29a492 into inducer:main Jun 30, 2022
@alexfikl alexfikl deleted the direct-solver-skeletonization branch June 30, 2022 07:34
@alexfikl
Copy link
Collaborator Author

LGTM, thanks! While I was reading, I saw various things I thought that would be nice to have, but generally nothing that I thought warranted holding this up. It's been long enough!

@inducer Feel free to either leave the comments here or make an issue. I'll go through them with time!

Copy link
Owner

@inducer inducer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for offering! Left a few notes based on my read yesterday.


# {{{ cluster matrix errors

def cluster_skeletonization_error(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a docstring?

return tgt_error, src_error


def skeletonization_error(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a docstring?

@@ -0,0 +1,645 @@
__copyright__ = "Copyright (C) 2018-2022 Alexandru Fikl"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this file, it of then took me a while to understand the shape of ndarrays. Mentioning what it is when it's not already specified would help!

Comment on lines +537 to +543
.. attribute:: L

A block diagonal :class:`~numpy.ndarray` object array.

.. attribute:: R

A block diagonal :class:`~numpy.ndarray` object array.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's in the object array? What shape?

"""

import scipy.linalg.interpolative as sli # pylint:disable=no-name-in-module
if rank is None:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error if both rank and eps are specified?

# {{{ interpolative decomposition

def interp_decomp(
A: np.ndarray, rank: Optional[int], eps: Optional[float],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*, rank?

replace(SKELETONIZE_TEST_CASES[0], op_type="double", knl_class_or_helmholtz_k=5),
])
def test_skeletonize_symbolic(actx_factory, case, visualize=False):
"""Tests that the symbolic manipulations work for different kernels / IntGs."""
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "work" mean?

def test_skeletonize_by_proxy_convergence(
actx_factory, case, weighted=True,
visualize=False):
"""Test single-level level skeletonization accuracy."""
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be more precise here.

@@ -0,0 +1,645 @@
__copyright__ = "Copyright (C) 2018-2022 Alexandru Fikl"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throughout this file, document the weighting schemes a bit better. I feel that might be hard to reverse-engineer later on.

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

Successfully merging this pull request may close these issues.

2 participants