Repository navigation
1. fix filter_atom in cal_loop3_GPU() - #24
Conversation
Stardust0831
left a comment
There was a problem hiding this comment.
Tested d8fc6eca97f6ccf0b4448644f2f891ad7f2eb2e9 on one V100 (one MPI rank, OMP/BLAS=1). This fixes four of the eight previously failing GPU symmetry labels; the remaining intermediate-filter issue is identified inline.
Please also update unittests/gpu_symmetry/test_lri_gpu_symmetry.cpp to include Filter_Atom_Symmetry_Wrapper.h after LRI.h, and construct:
lri.filter_atom = std::make_shared<RI::Filter_Atom_Symmetry_Wrapper<int, Cell, T>>(
period, sector, lri.cal_mode);The current fixture directly constructs the CPU filter, so its GPU path does not exercise the intended filter implementation. The Wrapper keeps a reference to lri.cal_mode, matching the existing backend-switching loop. Fixture patch.
Report and exact failures · Reproduction sources/scripts · Raw build/run logs. The 456-check result is standalone LibRI validation; application-level symmetry acceptance remains outstanding.
| {{ | ||
| const TAC &Ab01 = list_Ab01[ib01]; | ||
| if(this->filter_atom->filter_for32(label, Aa01, Ab01, Aa2)) continue; | ||
| if(this->filter_atom->filter_for32(label, Aa01, Aa2, Ab01)) continue; |
There was a problem hiding this comment.
The corrected argument order is needed, but the preceding filter_for2(label,Aa01,Aa2) at line 838 still discards required terms. Here Aa2 is a summation index; for this label family the GPU filter interprets (Aa01,Aa2) as an output pair. Please remove that intermediate-stage call and retain this filter_for32, which screens the actual output pair (Aa01,Ab01):
- if(this->filter_atom->filter_for2(label,Aa01,Aa2)) continue;Regenerating LRI-cal_loop3_GPU.hpp then removes the corresponding four calls. Keep filter_for2 at the final output stage. The tested patch changes only this generator line and the four generated lines; regeneration reproduces the tested header exactly.
On one V100, with the Wrapper fixture, this PR still fails a1b2_a2b1, a1b2_a2b0, a0b2_a2b1, and a0b2_a2b0 for both real and complex tensors, plus the combined sum. Applying that small deletion on top passes all 456 CHECK / 38 PASS, with the original reference and tolerance unchanged.
Stardust0831
left a comment
There was a problem hiding this comment.
Thanks for the update! I retested 39c953b on one V100 with one MPI rank. The original LibRI regression suite (456 CHECK / 38 PASS) and the 20-run ABACUS HSE validation both passed, including cases with nonzero forces. The CPU/GPU RI and real-space symmetry on/off comparisons all passed as well. I could no longer reproduce the issues I reported earlier in these tests.
a689c83 to
1a2ee2b
Compare
No description provided.