Skip to content
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

Properly configure hipCUB dependency #239

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,20 @@ if (MGARD_ENABLE_HIP)
target_compile_definitions(mgard-library PUBLIC MGARD_ENABLE_HIP)
set (CMAKE_HIP_FLAGS "${CMAKE_HIP_FLAGS} -w")
set_source_files_properties(${MGARD_X_HIP_SRC} PROPERTIES LANGUAGE HIP)

# Find the required hipCUB packages, which is usually, but not always,
# installed with hip.
find_package(rocprim REQUIRED CONFIG)
find_package(hipcub REQUIRED CONFIG)
# Normally, we would use target_link_libraries to include the hip::hipcub
# include directories and other parameters. However, for some reason this
# library has been changing the compiler away from HIP. So, instead just
# grab the include directories.
target_include_directories(mgard-library
PUBLIC $<TARGET_PROPERTY:hip::hipcub,INCLUDE_DIRECTORIES>
PUBLIC $<TARGET_PROPERTY:roc::rocprim_hip,INCLUDE_DIRECTORIES>
PUBLIC $<TARGET_PROPERTY:roc::rocprim,INCLUDE_DIRECTORIES>
)
endif()

if (MGARD_ENABLE_SYCL)
Expand Down
Loading