Skip to content

Commit

Permalink
have an error message when GPU is on but raja is off.
Browse files Browse the repository at this point in the history
  • Loading branch information
nychiang committed Feb 2, 2024
1 parent dc3b11b commit b533dc5
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,17 +222,15 @@ else()
endif()

if(HIOP_USE_GPU)
if(NOT HIOP_USE_RAJA)
message(FATAL_ERROR "Error: HIOP_USE_GPU is ON, but HIOP_USE_RAJA is OFF. HiOp requires using RAJA with CUDA/HIP.")
endif()

include(CheckLanguage)
if(HIOP_USE_MAGMA)
set(HIOP_MAGMA_DIR CACHE PATH "Path to Magma directory")
endif()

if(NOT HIOP_USE_RAJA)
set(HIOP_USE_RAJA "ON") #CUDA/HIP requires using RAJA.
message(STATUS "Enable RAJA since HIOP_USE_GPU is ON. HiOp requires using RAJA with CUDA/HIP.")
endif(NOT HIOP_USE_RAJA)


if(HIOP_USE_CUDA)
enable_language(CUDA)
check_language(CUDA)
Expand Down

0 comments on commit b533dc5

Please sign in to comment.