[Fix][LTS]Change CMAKE_CXX_STANDARD to 17 for CUDA 13#6772
Merged
Conversation
mohanchen
approved these changes
Dec 11, 2025
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.
Linked Issue
Fix #6752
See also conda-forge/abacus-feedstock#78 and #6777
Unit Tests and/or Case Tests for my changes
This PR is a refactoring to improve maintainability and forward-compatibility. No new unit tests are added, as all existing functionality is intended to remain unchanged. The project's existing regression test suite is used to verify that this refactoring does not introduce any regressions across supported CUDA versions.
What's changed?
This PR introduces a CUDA compatibility layer to prepare the codebase for CUDA 13 support and centralize version-specific logic. The key changes are:
cufftGetErrorString, which has removed error codes in CUDA 13.clockRate,memoryClockRate, etc) which were removed in CUDA 13 have been moved fromdevice.cppinto the new compatibility layer. This cleans up the main application logic and isolates version-specific code.CMakeLists.txtwas updated to support user-specified CXX version.The primary impact is that ABACUS can now be built with CUDA 13 without modifying the main application code. This also improves long-term maintainability by creating a dedicated place for future CUDA compatibility fixes.
Any changes of core modules? (ignore if not applicable)
There are no changes to the core solver modules (
ESolver,HSolver,ElecState,Hamilt,Operator, orPsi). The changes are contained within themodule_deviceinfrastructure layer. The purpose of this refactoring is to abstract away hardware/driver-specific details from the core scientific modules, ensuring they remain unaffected by changes in the underlying CUDA toolkit.