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

Interaction between Permutation and Reordering classes #1023

Closed
pratikvn opened this issue Apr 18, 2022 · 4 comments
Closed

Interaction between Permutation and Reordering classes #1023

pratikvn opened this issue Apr 18, 2022 · 4 comments
Labels
is:help-wanted Need ideas on how to solve this. is:question This is a question to the developers. mod:core This is related to the core module. type:reordering This is related to the matrix(LinOp) reordering

Comments

@pratikvn
Copy link
Member

When trying to run some experiments on the effects on reordering on SpMV performance and trying to add a new reordering class with metis (fill reduce ordering), I found a few things which were a bit unexpected:

  1. Reordering outputs/stores a Permutation object. As it does not have an apply method (this was intentional), you need to call get_permutation()->apply(...). But by default, the permutation only permutes the rows. For the use cases I can think of (reducing fill-in, or improving cache hit rates or improving preconditioner quality), you need to additionally permute by columns as well. So, I think we should make the default mask for the permutation (row_permute | column_permute ).

  2. Our RCM class and even the Metis API has options that compute an inverse permutation explicitly. Our permutation also has an option of doing an inverse_permute with a provided permutation array. We could technically remove the computation of the inverse permutation and just store one immutable array and create two permutation objects with different masks.

  3. Another issue is reordering different objects. For CSR and our usual matrix objects, it makes sense to re-order columns, but for vectors, there is no real meaning in reordering columns ? Right now, we don't differentiate between MultiVector and Dense, so this might be something we will want to tackle when addressing Clarify the behavioral differences between a dense matrix and a multivector #796. For MultiVector, it might make sense to just do nothing when permuting through the reordering interface (there from the inputs, they are non-commutable, anyway).

@pratikvn pratikvn added is:help-wanted Need ideas on how to solve this. mod:core This is related to the core module. type:reordering This is related to the matrix(LinOp) reordering is:question This is a question to the developers. labels Apr 18, 2022
@upsj
Copy link
Member

upsj commented Apr 18, 2022

Are you familiar with the reordering interface design for sparse direct solvers we are currently using? That would take care of 3. directly, and potentially also 2. I already discussed 1. in #940, and would suggest revamping the entire reordering/permutation setup in 2.0

@pratikvn
Copy link
Member Author

@upsj, thanks. Looks like these issues have already been noted are are being worked on.

@upsj
Copy link
Member

upsj commented Apr 18, 2022

Yes, the new interface is under development right now.

@upsj
Copy link
Member

upsj commented Jul 13, 2022

Let's have a single place where we talk about this interface: #940

@upsj upsj closed this as completed Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:help-wanted Need ideas on how to solve this. is:question This is a question to the developers. mod:core This is related to the core module. type:reordering This is related to the matrix(LinOp) reordering
Projects
None yet
Development

No branches or pull requests

2 participants