-
Notifications
You must be signed in to change notification settings - Fork 6
What a selection operator could look like #271
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
What a selection operator could look like #271
Conversation
37ef7a4 to
bcdf77a
Compare
|
The current state does not have bsp1d nor hybrid implementations of select, that's correct right? I think this is a super useful enhancement, but before merge it should have those distributed-memory implementations also |
Absolutely, I also wanted to switch the namespace from I'll ping you once it will be implemented |
maybe just |
But then it could be either the primitive or the operator's namespace, what about |
Oh right.. It could still work by having select as a class with the "primitive call" via |
|
Also doc/spec should be added to base/blas3.hpp |
6c2b2d6 to
cbf8519
Compare
anyzelman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this useful primitive!
I think this one can be simplified as in the comments. The suggested simplifications should benefit both usage as well asimplementation.
8c3e082 to
3fa8309
Compare
Implementation of: - CCS update of the output matrix - Handle transpose_matrix descriptor - Handle force_row_major descriptor - Extend the unit-test - Add unit-test to the testing pipeline - selection operator: is_strictly_lower - selection operator: is_strictly_upper - selection operator: is_lower_or_diagonal - selection operator: is_upper_or_diagonal
…::select, thus removing the need for selectLambda. Tests pass, except for BSP1D. Minimal failure (as far as known) occurs test size 65, P=4
|
This one is ready to merge (after conflict resolution) |
Correction: unit tests still detect a bug in BSP1D, fixing it is TODO |
|
Fixed |
|
Some final tests (with LPF) are running, as is the CI. Will merge if all OK. Concept release notes: This MR introduces the matrix selection feature -- given a operator that takes matrix nonzero coordinates and a value as arguments and produces a boolean, elements from an input matrix are selected to be copied in some output matrix. This primitive operates in an out-of-place fashion. In-place semantics may be achieved via a temporary (pattern) matrix and fold, and thus are currently not planned to be added. Standard matrix selection operators such as (strictly) lower triangular etc. are provided, including type traits for them. Non-standard selection operators provided by users are simple to add as the new This MR also fixes a bug for the BSP1D and hybrid eWiseApply on matrices with the resize mode, which could return |
Closes #270
Wrapping the selection operators in their own namespace to avoid confusion:
grb::operators::select::Implement selectLambda
Distributed backends implementation
In-place variants (should come in a separate PR)
Masked variants (should come in a separate PR)
Pattern matrices support (should come in a separate PR)