-
Notifications
You must be signed in to change notification settings - Fork 94
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
Add a batched block Jacobi preconditioner #1542
Conversation
7de7adf
to
6d06c91
Compare
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.
first part of my reviews
* where the first value is 0, and the last value is the number of | ||
* rows / columns of the matrix. | ||
* | ||
* @note Even if not set explicitly, this parameter will be set to |
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.
do we make the parameters in non-batch method non-mutable usage although it is still marked as mutable variable
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.
I dont think it should be marked mutable ?
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.
My first comments just on the interface.
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.
Second part. Mostly minor stuff.
The largest issue for me is still the storage_scheme
type. I would like a better solution to it, either storing the data it needs in the class, or freestanding functions.
@@ -119,6 +130,11 @@ struct batch_item { | |||
index_type num_rows; | |||
index_type num_cols; | |||
index_type num_stored_elems_per_row; | |||
|
|||
inline size_type get_single_item_num_nnz() const |
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.
I find it a bit odd, that both uniform_batch
and batch_item
have both the function get_single_item_num_nnz
, but TBH I'm not sure what to do about that. Maybe only keep the batch_item
one and use extract_batch_item
?
612b423
to
a1431e2
Compare
233c13c
to
fe0507d
Compare
d8b398d
to
43c4797
Compare
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.
mostly smaller nits left. One larger thing is where should the block pointers should be stored. I would suggest the Jacobi class directly, instead of the parameters.
|
||
for (int k = 0; k < num_blocks; k++) { | ||
const auto bsize = block_ptrs[k + 1] - block_ptrs[k]; | ||
for (int r = 0; r < bsize; r++) { |
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.
also here, maybe use dense matrix views.
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.
Is there a reason it's not possible to use the views here?
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.
We compare the unbatched version with the batched one, the storage of the blocks is different. Additionally, for debugging purposes, it is easier if there is a element based comparison in case there are issues.
43c4797
to
9da3d7e
Compare
32de29b
to
fcff54f
Compare
Co-authored-by: Isha Aggarwal<isha.aggarwal2@kit.edu> Co-authored-by: Aditya Kashi<kashia@ornl.gov>
Co-authored-by: Isha Aggarwal<isha.aggarwal2@kit.edu> Co-authored-by: Aditya Kashi<kashia@ornl.gov>
Co-authored-by: Isha Aggarwal<isha.aggarwal2@kit.edu> Co-authored-by: Aditya Kashi<kashia@ornl.gov>
Co-authored-by: Isha Aggarwal<isha.aggarwal2@kit.edu> Co-authored-by: Aditya Kashi<kashia@ornl.gov>
Co-authored-by: Isha Aggarwal<isha.aggarwal2@kit.edu> Co-authored-by: Aditya Kashi<kashia@ornl.gov>
Co-authored-by: Isha Aggarwal<isha.aggarwal2@kit.edu> Co-authored-by: Aditya Kashi<kashia@ornl.gov>
Co-authored-by: Marcel Koch <marcel.koch@kit.edu> Co-authored-by: Yu-Hsiang Tsai <yhmtsai@gmail.com>
Co-authored-by: Marcel Koch <marcel.koch@kit.edu> Co-authored-by: Yu-Hsiang Tsai <yhmtsai@gmail.com>
due to circ dep issues, libginkgo -> libginkgo_kernels
5504e62
to
83a9280
Compare
This PR adds a batched block Jacobi preconditioner. This PR only adds reference and omp kernels to reduce the amount of code that needs to be reviewed. Again, as usual, a lot of it is harness code,
TODO