-
Notifications
You must be signed in to change notification settings - Fork 9
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 CUDA matrix-free smoother #217
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #217 +/- ##
=======================================
Coverage 89.78% 89.78%
=======================================
Files 57 57
Lines 3299 3299
=======================================
Hits 2962 2962
Misses 337 337 Continue to review full report at Codecov.
|
std::transform(prec_type.begin(), prec_type.end(), prec_type.begin(), | ||
tolower); | ||
|
||
ASSERT_THROW(prec_type == "jacobi", "Only Jacobi smoother is implemented."); |
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 should soon be able to use PreconditionChebyshev
as well.
} | ||
|
||
template <typename ScalarType> | ||
__global__ void extract_inv_diag(ScalarType const *const matrix_value, |
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.
Looks like this is never used, is it?
SparseMatrixDevice<typename VectorType::value_type> const &smoother, | ||
VectorType const &b, VectorType &x) | ||
{ | ||
ASSERT_THROW_NOT_IMPLEMENTED(); |
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 actually need to instantiate the operator for any type different from dealii::LinearAlgebra::distributed::Vector< double, dealii::MemorySpace::CUDA>>
? If not, we could just use a static_assert
instead.
dealii::LinearAlgebra::distributed::Vector<double, dealii::MemorySpace::CUDA> | ||
tmp(x); | ||
smoother.vmult(tmp, r); | ||
x.add(-1., tmp); |
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.
There is nothing special about dealii::LinearAlgebra::distributed::Vector<double, dealii::MemorySpace::CUDA>
here, is it? If we can indeed use static_assert
, this would look much nicer with VectorType
instead.
namespace | ||
{ | ||
template <typename VectorType> | ||
struct SmootherOperator |
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.
So all this is just for being able to specialize for VectorType
. Do we actually need that if only allow for one type?
No description provided.