Direct Solver: Recursive Skeletonization - #164
Conversation
39e8347 to
80bb8e1Compare8e3731d to
78699ecComparealexfikl
commented
Jul 14, 2022
@inducer This should be ready for a look. It doesn't do much:
|
7ed33f4 to
ea42c82Compare80fe1fb to
b44f4a8Comparecc4be24 to
0176d32Compare0176d32 to
f71a21bCompare
inducer
left a comment
There was a problem hiding this comment.
Noticed a pending review. Figured it'd be better to submit it. :) Don't quite know how old this is.
| Current level that is represented. | ||
| .. attribute:: nlevels |
There was a problem hiding this comment.
Reworked this a while back, so not quite sure if your comment still applies?
Uh oh!
There was an error while loading. Please reload this page.
| # {{{ cluster tree | ||
| @dataclass(frozen=True) | ||
| class ClusterTreeLevel: |
There was a problem hiding this comment.
Yeah, separated into a ClusterTree and ClusterLevel with a ClusterTree.levels() iterator to go through them for the recursive skeletonization.
Naming could still be better probably?
| logger.info("\n%s", case) | ||
| run_skeletonize_by_proxy(actx, case, case.resolutions[0], visualize=visualize) | ||
| dd = sym.DOFDescriptor(case.name, discr_stage=case.skel_discr_stage) |
There was a problem hiding this comment.
Update the test docstring to describe precisely what's being tested here.
There was a problem hiding this comment.
Updated the blurb in
https://github.com/inducer/pytential/compare/f71a21b1a54791b02b35712225b9cfaca4be60cf..9a8db7ff410051a6b7d86cd8d5b934d02d094fef
Let me know if it's clear enough!
9a8db7f to
ce00d4eComparec1e986c to
814b8acCompare9630b4f to
32ecc58Comparef79175f to
19f4098Compare19f4098 to
e9643ccCompare| def make_cluster_parent_map(parent_ids: np.ndarray) -> np.ndarray: | ||
| """Construct a parent map for :attr:`ClusterLevel.parent_map`.""" |
There was a problem hiding this comment.
Rephrase/rework? "All children in a bucket"?
There was a problem hiding this comment.
Rephrased and added some more context in https://github.com/inducer/pytential/compare/e9643cc480e53575274e4dc8e14d81d9b060f6b6..20fbc31a57c1a9a642abfa0a9b7a83ad81f1a1d5. Thoughts?
e9643cc to
20fbc31Comparealexfikl
commented
Oct 30, 2023
@inducer I think inducer/ci-support@1475971 broke pylint (it's not finding the cython stuff anymore?). Any suggestion for a fix? |
inducer
commented
Nov 1, 2023
20fbc31 to
6983a42Compare6983a42 to
ab228e6Compareab228e6 to
c92b7f0Comparef6e7c6e to
78eebbfComparec479984 to
8aa200fCompare9c5bb68 to
a7c5d19Compare8bef46c to
ae443aaCompareae443aa to
85033dbCompare85033db to
15eee49Compare15eee49 to
78c496dCompareba99713 to
963f568CompareThere was a problem hiding this comment.
Pull request overview
This PR advances the direct solver work by introducing hierarchical clustering infrastructure and wiring it into proxy-based skeletonization to enable recursive (multi-level) skeletonization, along with the associated test and documentation updates.
Changes:
- Add a new
pytential.linalg.clustermodule providing cluster trees/levels, clustering helpers, andpartition_by_nodes. - Extend skeletonization to produce richer results (including diagonal blocks) and add
rec_skeletonize_by_proxyfor multi-level skeletonization. - Update proxy and skeletonization tests (and docs) to match the new clustering/tree and neighbor-gathering APIs.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
pytential/linalg/cluster.py | New clustering module (cluster tree/levels, partitioning, visualization utilities). |
pytential/linalg/skeletonization.py | Adds recursive skeletonization and augments skeletonization results/weighting/logging. |
pytential/linalg/proxy.py | Removes partition_by_nodes (moved to cluster module) and updates neighbor gathering API. |
pytential/linalg/utils.py | Documents/exports helper utilities used by skeletonization (make_flat_cluster_diag, interp_decomp). |
test/extra_matrix_data.py | Updates test fixtures to return (index, tree) and import partitioning from linalg.cluster. |
test/test_linalg_cluster.py | New tests for cluster tree construction and (un)clustering behavior. |
test/test_linalg_proxy.py | Adapts tests to updated cluster index return type and neighbor gathering signature. |
test/test_linalg_skeletonization.py | Updates tests to exercise multilevel skeletonization flow. |
test/test_matrix.py | Adapts callers to updated get_cluster_index / get_tgt_src_cluster_index return type. |
doc/linalg.rst | Includes pytential.linalg.cluster in the linalg documentation. |
doc/conf.py | Adds/adjusts intersphinx mappings for new referenced types. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Attempting to break up the direct solver MR into smaller, more reviewable pieces. As a rundown
linalg.proxy).The code for this is mostly in the deprecated https://gitlab.tiker.net/inducer/pytential/-/merge_requests/137.