Skip to content

Align CUDA sources with C++17 - #223

Open
JensWehner wants to merge 1 commit into
wavefunction91:masterfrom
JensWehner:cuda_std17
Open

Align CUDA sources with C++17#223
JensWehner wants to merge 1 commit into
wavefunction91:masterfrom
JensWehner:cuda_std17

Conversation

@JensWehner

Copy link
Copy Markdown

GauXC’s CUDA sources are not strictly C++14-compatible because they already use C++17 features such as if constexpr. However, the build configuration declares cuda_std_14, while several kernels still use the register keyword, which was removed in C++17.

This PR aligns the declared CUDA standard with the code by:

Changing cuda_std_14 to cuda_std_17.
Removing obsolete register qualifiers that Clang diagnoses in C++17 mode.

Co-authored-by: GitHub Copilot <175728472+Copilot@users.noreply.github.com>
@awvwgk
awvwgk requested a review from wavefunction91 August 31, 2026 16:49

@awvwgk awvwgk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this consistent across the codebase.

@awvwgk
awvwgk requested a balanced review from Copilot August 31, 2026 16:49
@awvwgk awvwgk added the cuda CUDA related Issue label Aug 31, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The standard declarations now match existing language usage, and all obsolete CUDA register occurrences were removed without changing kernel behavior.

Pull request overview

Aligns CUDA compilation with existing C++17 usage while removing obsolete register qualifiers.

Changes:

  • Sets active and archived CUDA targets to cuda_std_17.
  • Removes register from affected CUDA kernel locals.
File summaries
File Description
src/xc_integrator/local_work_driver/device/cuda/kernels/uvvars_mgga.hpp Removes obsolete qualifiers from MGGA locals.
src/xc_integrator/local_work_driver/device/cuda/kernels/uvvars_lda.hpp Removes the LDA qualifier.
src/xc_integrator/local_work_driver/device/cuda/kernels/uvvars_gga.hpp Removes GGA local qualifiers.
src/xc_integrator/local_work_driver/device/cuda/kernels/grid_to_center.cu Updates the coordinate local declaration.
src/runtime_environment/device/cuda/CMakeLists.txt Requires CUDA C++17.
attic/src/new_integrator/device/cuda/gauxc-cuda.cmake Updates archived CUDA standard.
attic/src/new_integrator/device/cuda/cuda_weights.cu Removes an archived coordinate qualifier.
attic/src/new_integrator/device/cuda/cuda_eval_denvars.cu Removes archived density-variable qualifiers.
attic/src/integrator/cuda/gauxc-cuda_integrator.cmake Updates legacy CUDA standard.
attic/src/integrator/cuda/cuda_weights.cu Removes a legacy coordinate qualifier.
attic/src/integrator/cuda/cuda_eval_denvars.cu Removes legacy density-variable qualifiers.
Review details
  • Files reviewed: 11/11 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda CUDA related Issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants