-
Notifications
You must be signed in to change notification settings - Fork 98
Merge dot products in PIPECG #1908
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
base: develop
Are you sure you want to change the base?
Conversation
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.
part 1/2. Still need to look at the algorithm itself.
core/solver/pipe_cg.cpp
Outdated
auto* w = w_unique.get(); | ||
|
||
|
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.
auto* w = w_unique.get(); | |
auto* w = w_unique.get(); | |
core/solver/pipe_cg.cpp
Outdated
// GKO_SOLVER_VECTOR(r, dense_b); | ||
// GKO_SOLVER_VECTOR(w, dense_b); | ||
// into rw that we later slice for efficient dot product computation | ||
auto stride = dense_b->get_stride(); |
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.
nit: make it clear that this is b_stride
core/solver/pipe_cg.cpp
Outdated
// m = preconditioner * w | ||
this->get_preconditioner()->apply(w, m); | ||
// n = A * m | ||
this->get_system_matrix()->apply(m, n); | ||
// TODO: merge these two dot products: | ||
// merged dot products | ||
// rho = dot(r, z) |
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.
// rho = dot(r, z) | |
// rho = dot(r, z1) |
core/solver/pipe_cg.cpp
Outdated
// rho = dot(r, z) | ||
r->compute_conj_dot(z, rho, reduction_tmp); | ||
// delta = dot(w, z) |
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.
// delta = dot(w, z) | |
// delta = dot(w, z2) |
f24265c
to
23a35a3
Compare
Addressed the suggestions yesterday, rebased now. |
23a35a3
to
4c7a3d5
Compare
This PR continues on the work done in PIPECG by making it fulfill its initial purpose of reducing the number of dot products in the algorithm by merging them into a singe dot operation.