-
Notifications
You must be signed in to change notification settings - Fork 86
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
Improve CSR strategies #379
Conversation
b98ee21
to
b412b30
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.
LGTM. I believe only the hybrid read is missing.
Code changed since last review quite a bit.
@ginkgo-project/developers Or do we consider this macro to be faulty, in which case we might be allowed to change the macro? |
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.
LGTM, only small nits to pick :)
Question, I'm not yet familiar with the CSR kernels: Would we need to test the conversion to load_balance as well? Or does it use the same data structures as merge_path?
@thaosm about the Edit: the more I think about it, the more I realize it was simply misused in the case the @upsj AFAIK, the purpose of the testing two strategies in the conversions is to be future proof. If at some point we put classical CSR as the default of whatever, we ensure to not test a default. the |
Yes, I too think that changing the |
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.
LGTM
@upsj I agree with @tcojean: The strategy is just a |
To handle |
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.
LGTM
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.
LGTM. I think you could also move the throw
into GKO_NOT_SUPPORTED because I believe it really should be there. Also, this is technically internal although due to using this in public hpp
code we have to put this in the public space.
@@ -290,7 +291,8 @@ class Ilu : public EnableLinOp<Ilu<LSolverType, USolverType, ReverseApply>> { | |||
SolverType, | |||
xstd::void_t<decltype(std::declval<factory_type_t<SolverType>>() | |||
.with_criteria(with_criteria_param_type()))>> | |||
: std::true_type {}; | |||
: std::true_type { | |||
}; |
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.
simple comment, you don't have to do anything: interesting clang format bug?
Exacty that. Unfortunately, I was unable to undo that change.
By the way, if there is a chance we can get this to xSDK when we merge it now, feel free to do that.
Otherwise, I will merge it tonight when I am back at my PC.
|
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.
LGTM!
5667c30
to
c0fface
Compare
- All conversions to CSR (except CSR to CSR) now conserve the original strategy (test for that are included) - CSR strategies now try to copy the least amount of data - Add exception throwing in case the load_balance would not work properly (when srow is empty)
- Make strategy helper variables const to ensure they do not change - Fix Hybrid read function
- GKO_NOT_SUPPORTED is the only macro that does not include the `throw`. This was not only a problem in this code, but also in unrelated code, which is also fixed within this commit - An Empty Dense matrix can now be converted to a CSR matrix - Moved the `GKO_NOT_SUPPORTED` to the cuda kernel, so empty matrices do not throw when applying a strategy.
- Change a `static_cast` in the strategies to a constructor call - Move empty matrix test from CSR to Dense (and add a move test)
d4709d4
to
3663e0c
Compare
This version of Ginkgo provides a few fixes in Ginkgo's core routines. The supported systems and requirements are unchanged from version 1.1.0. ### Fixes + Improve Ginkgo's installation and fix the `test_install` step ([#406](#406)), + Fix some documentation issues ([#406](#406)), + Fix multiple code issues reported by sonarqube ([#406](#406)), + Update the git-cmake-format repository ([#399](#399)), + Improve the global update header script ([#390](#390)), + Fix broken bounds checks ([#388](#388)), + Fix CSR strategies and improve performance ([#379](#379)), + Fix a small typo in the stencil examples ([#381](#381)), + Fix ELL error on small matrices ([#375](#375)), + Fix SellP read function ([#374](#374)), + Add factorization support in `create_new_algorithm.sh` ([#371](#371)).
Minor release v1.1.1 This version of Ginkgo provides a few fixes in Ginkgo's core routines. The supported systems and requirements are unchanged from version 1.1.0. ### Fixes + Fix the `test_install` step with `HIP` ([#409](#409)), + Improve Ginkgo's installation and fix the `test_install` step ([#406](#406)), + Fix some documentation issues ([#406](#406)), + Fix multiple code issues reported by sonarqube ([#406](#406)), + Update the git-cmake-format repository ([#399](#399)), + Improve the global update header script ([#390](#390)), + Fix broken bounds checks ([#388](#388)), + Fix CSR strategies and improve performance ([#379](#379)), + Fix a small typo in the stencil examples ([#381](#381)), + Fix ELL error on small matrices ([#375](#375)), + Fix SellP read function ([#374](#374)), + Add factorization support in `create_new_algorithm.sh` ([#371](#371))
This PR contains the following fixes:
load_balance
strategy would not work properly (when srow was empty in the CUDA kernel)Slightly unrelated fix:
GKO_NOT_SUPPORTED
does not throw by itself (the only macro that behaves like this, the others include thethrow
). Now, the macro does include thethrow
, so it performs as expected.