Interaction between Permutation and Reordering classes #1023
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
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:
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
).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.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
andDense
, so this might be something we will want to tackle when addressing Clarify the behavioral differences between a dense matrix and a multivector #796. ForMultiVector
, it might make sense to just do nothing when permuting through the reordering interface (there from the inputs, they are non-commutable, anyway).The text was updated successfully, but these errors were encountered: