Repository navigation
perf(estate): reduce GPU density and NCGGA data movement (by OutisLi and dyzheng) - #8463
Open
Flying-dragon-boxing wants to merge 10 commits into
Open
Flying-dragon-boxing wants to merge 10 commits into
Flying-dragon-boxing wants to merge 10 commits into
Conversation
Split from deepmodeling#8306. Add sparse FFT plans, device density transforms, Hartree and NCGGA-SF kernels. Derive XC device selection from PW_Basis and preserve existing ElecState interfaces so this branch is independent.
…sity-xc-gpu # Conflicts: # source/source_estate/elecstate_pw.cpp # source/source_pw/module_pwdft/op_pw_meta.cpp # source/source_pw/module_pwdft/op_pw_meta.h
Flying-dragon-boxing
marked this pull request as ready for review
December 2, 2026 05:54
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
ABACUS-PR-BOT
left a comment
Collaborator
There was a problem hiding this comment.
The built-in NCGGA allocation check reads an indeterminate status, and ROCm initializes an unused full-grid density FFT. Please correct these paths; the inline notes also cover focused GPU tests and documentation/interface cleanup.
Static review only; no builds or runtime tests were run.
… ROCm FFT, and docs
mohanchen
reviewed
Dec 4, 2026
| } | ||
| Complex* scratch = nullptr; | ||
| base_device::memory::resize_memory_op<Complex, base_device::DEVICE_GPU>()(scratch, scratch_size); | ||
| auto* grid = basis.fft3d_bundle.template get_auxr_3d_data<Real>(); |
| base_device::memory::set_memory_op<Complex, base_device::DEVICE_GPU>()(grid, 0, basis.nxyz); | ||
| set_3d_fft_box_op<Real, base_device::DEVICE_GPU>()(basis.npw, basis.ig2ixyz_gpu, scratch, grid); | ||
| basis.fft3d_bundle.fft3D_backward(grid, grid); | ||
| auto* result = reinterpret_cast<Output*>(scratch); |
| out); | ||
| if (add) | ||
| { | ||
| auto* grid = this->fft_bundle.get_auxr_3d_data<float>(); |
| out); | ||
| if (add) | ||
| { | ||
| auto* grid = this->fft_bundle.get_auxr_3d_data<double>(); |
| out); | ||
| if (add) | ||
| { | ||
| auto* grid = this->fft_bundle.get_auxr_3d_data<FPTYPE>(); |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Split from #8306 as an independent density/FFT/XC GPU optimization.
No INPUT parameter or input-file behavior is changed.
Performance
Measured against the same pre-synchronization baseline on dual RTX 4090 GPUs:
The branch was subsequently merged with upstream/develop at 5064965; performance was not re-measured after that synchronization.
Verification
cmake --build build -j 16passed at f3b089c.git diff --check upstream/develop...HEAD: passed.python3 tools/03_code_analysis/agent_governance_check.py --base upstream/develop --head HEAD --format text: no blocking findings.MODULE_HAMILT_XCTest_NCGGA_RADIALcould not be generated in this build becauseENABLE_LIBXC=OFF; the complete CUDA executable build passed. ROCm was not built or tested.Review notes