-
Notifications
You must be signed in to change notification settings - Fork 146
Fix bug in dsp compute #6433
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
Fix bug in dsp compute #6433
Conversation
|
I have changed how FFT is used in the EXX implementation. Please remember to update the GPU code for EXX accordingly. |
After discussion with @A-006 , I cannot accept this modifcation, which causes too many new defects. We decide to close this PR. |
Linked Issue
Fix #6429
What's changed?
recip2real
andreal2recip
functions. To resolve this, we have modified these functions to use the DSP device instead of the CPU device.Refactor
Attention
The recip_to_real template function is designed to be compatible with floating-point types and device types, enabling a heterogeneous framework. Moving forward, if device-specific or parameter-type requirements arise, we can directly utilize this templated function for seamless execution.
For pw_basis and pw_basis_k, template parameters are used to determine whether functions operate in real or reciprocal space. This approach clearly indicates whether calculations are performed in real or reciprocal space, improving code readability.
The main drawback is increased complexity in invocation, which demands higher programming expertise. When writing templated code, if the FFT function’s template parameter is T but operates on complex at runtime, programmers must fully understand the context. Type mismatches will be caught at compile time, preventing runtime errors.
This seems to mean that the DSP does not support grids that are powers of two (2^n grid points). We should express this in standard technical terms.
The DSP FFT could only use the kpar parallel way, but we can't use mpi solve the gamma only