-
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 triangular solvers to benchmark #664
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,10 +65,10 @@ DEFINE_bool( | |
rel_residual, false, | ||
"Use relative residual instead of residual reduction stopping criterion"); | ||
|
||
DEFINE_string( | ||
solvers, "cg", | ||
"A comma-separated list of solvers to run. " | ||
"Supported values are: bicgstab, bicg, cg, cgs, fcg, gmres, overhead"); | ||
DEFINE_string(solvers, "cg", | ||
"A comma-separated list of solvers to run. " | ||
"Supported values are: bicgstab, bicg, cg, cgs, fcg, gmres, " | ||
"lower_trs, upper_trs, overhead"); | ||
|
||
DEFINE_uint32( | ||
nrhs, 1, | ||
|
@@ -167,6 +167,20 @@ const std::map<std::string, std::function<std::unique_ptr<gko::LinOpFactory>( | |
.with_preconditioner(give(precond)) | ||
.on(exec); | ||
}}, | ||
{"lower_trs", | ||
[](std::shared_ptr<const gko::Executor> exec, | ||
std::shared_ptr<const gko::LinOpFactory>) { | ||
return gko::solver::LowerTrs<>::build() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a question, we dont use a template type here ? Maybe it is better to add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a valid point! However, I believe we should address this in another PR |
||
.with_num_rhs(FLAGS_nrhs) | ||
.on(exec); | ||
}}, | ||
{"upper_trs", | ||
[](std::shared_ptr<const gko::Executor> exec, | ||
std::shared_ptr<const gko::LinOpFactory>) { | ||
return gko::solver::UpperTrs<>::build() | ||
.with_num_rhs(FLAGS_nrhs) | ||
.on(exec); | ||
}}, | ||
{"overhead", create_solver<gko::Overhead<>>}}; | ||
|
||
|
||
|
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.
Not sure whether this is necessary, but should we mention that lowe/upper_trs expect a triangular matrix?
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.
Too late sorry, the PR is already merged 🤷♂️
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.
Essentially, I guess we should define what are 'lower_trs' and 'upper_trs', in case people are not familiar. From an applications point of view, or indeed from most common points of view, these two are really not in the same category as bicgstab, gmres, etc. We should address this in some other PR.
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 don't think we have to explain everything about the TRS here necessarily, because this here is only the benchmarks description. If you want information from a user POV, the class description etc should give you all you need. On the other hand, someone who reads this should know what to benchmark, and only wants to know how.