-
Notifications
You must be signed in to change notification settings - Fork 137
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 LCAO mw_evaluateValue and mw_evaluateDetRatios #4611
Conversation
GEMM impl for LCAOrbitalSet::mw_evaluateValue loop over walkers impl for SPOSet::mw_evaluateValue and SoaLocalizedBasisSet::mw_evaluateV modified existing unit test to check output of LCAOrbitalSet::mw_evaluateValue (also calls SoaLocalizedBasisSet::mw_evaluateV)
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.
Please retitle this PR to reflect the current implementation. Prefer more frequent PRs.
int iat, | ||
const RefVector<ValueVector>& psi_v_list) const | ||
{ | ||
OffloadMWVArray phi_v; |
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.
Please move this to shared resource.
OffloadMWVArray& psi_v) const | ||
{ | ||
const size_t nw = spo_list.size(); | ||
OffloadMWVArray phi_v; |
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.
Please move this to shared resource.
const std::vector<const ValueType*>& invRow_ptr_list, | ||
std::vector<std::vector<ValueType>>& ratios_list) const | ||
{ | ||
size_t nw = spo_list.size(); |
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.
Add const
spo_list[iw].evaluateValue(vp_list[iw], iat, psi_list[iw]); | ||
ratios_list[iw][iat] = simd::dot(psi_list[iw].get().data(), invRow_ptr_list[iw], psi_list[iw].get().size()); | ||
} | ||
} |
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.
The double loop works for now but eventually it needs to be modified to be offload friendly.
OffloadMWVArray& v) | ||
{ | ||
for (size_t iw = 0; iw < P_list.size(); iw++) | ||
evaluateV(P_list[iw], iat, v.data_at(iw,0)); |
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.
clang-format?
size_t nw = psi_list.size(); | ||
SPOSet::ValueVector psi_v_1(n_mo); | ||
SPOSet::ValueVector psi_v_2(n_mo); | ||
RefVector<SPOSet::ValueVector> psi_v_list = {psi_v_1, psi_v_2}; |
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.
RefVector<SPOSet::ValueVector> psi_v_list{psi_v_1, psi_v_2};
Echoing Ye's comment, we have learned that greater numbers of smaller PRs work best. Once the code presently here is satisfactory, I suggest we merge it and subsequent functionality can come in one or two functions at a time. An additional advantage of this is that the code will be running in the nightlies. |
@ye-luo I finally had a chance to get back to this, thanks for the feedback. |
Test this please |
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 still need non-ANL approval
Test this please |
Side question: Is the Identity specialization worth it? Is there a common case where it would be used? |
Thanks Kevin |
Proposed changes
Implement LCAO::mw_evaluateValue using gemm.
Implement LCAO::mw_evaluateDetRatios
Address partly #4615
What type(s) of changes does this code introduce?
Does this introduce a breaking change?
What systems has this change been tested on?
Checklist
Update the following with a yes where the items apply. If you're unsure about any of them, don't hesitate to ask. This is
simply a reminder of what we are going to look for before merging your code.