Skip to content

Commit e981511

Browse files
authored
Refactor device selection logic and deprecate USE_ROCM
Updated CMakeLists.txt to clarify device selection and mark USE_ROCM as deprecated.
1 parent 04235ac commit e981511

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,12 @@ endif()
187187
# Determine the ABACUS executable name.
188188
if(NOT ENABLE_LCAO)
189189
set(_abacus_bin_level "pw")
190+
# TODO: Not well-defined now.
190191
elseif(ENABLE_LIBRI AND ENABLE_MLALGO)
191192
set(_abacus_bin_level "max")
192193
elseif(ENABLE_LIBRI)
193194
set(_abacus_bin_level "std")
195+
# TODO: Not well-defined now.
194196
elseif(ENABLE_MLALGO)
195197
set(_abacus_bin_level "ml")
196198
else()
@@ -205,7 +207,9 @@ else()
205207
set(_abacus_bin_para "ser")
206208
endif()
207209

208-
if(USE_CUDA OR USE_ROCM)
210+
if(USE_CUDA)
211+
set(_abacus_bin_device "gpu")
212+
elseif(USE_ROCM)
209213
set(_abacus_bin_device "gpu")
210214
elseif(USE_CUDA_ON_DCU)
211215
set(_abacus_bin_device "dcu")
@@ -215,6 +219,10 @@ elseif(USE_SW)
215219
set(_abacus_bin_device "sw")
216220
endif()
217221

222+
# if(USE_KML)
223+
# set(_abacus_bin_device "kp")
224+
# endif()
225+
218226
set(ABACUS_BIN_NAME "abacus_${_abacus_bin_level}_${_abacus_bin_para}")
219227

220228
if(_abacus_bin_device)
@@ -474,6 +482,9 @@ endif()
474482
# version. Use cmake with AMD-ROCm:
475483
# https://rocmdocs.amd.com/en/latest/Installation_Guide/Using-CMake-with-AMD-ROCm.html
476484
if(USE_ROCM)
485+
message(
486+
DEPRECATION
487+
"Option USE_ROCM is deprecated and will be ignored in a future release. ")
477488
cmake_minimum_required(VERSION 3.18)
478489
if(NOT DEFINED ROCM_PATH)
479490
set(ROCM_PATH

0 commit comments

Comments
 (0)