Skip to content

Commit

Permalink
Include hipstdpar in rocThrust packages (#343)
Browse files Browse the repository at this point in the history
* Add hipstdpar header and target

* Add `hipstdpar` to package provides for rocThrust

* Move hipstdpar to match thrust convention

* Update hipstdpar_lib.hpp

Removed cppreference references and debug message.

* Update hipstdpar_lib.hpp

Update license.

---------

Co-authored-by: Alex Voicu <alexandru.voicu@amd.com>
  • Loading branch information
lawruble13 and AlexVlx authored Dec 1, 2023
1 parent d15ed2f commit d7d767c
Show file tree
Hide file tree
Showing 3 changed files with 4,311 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ rocm_package_add_deb_dependencies(DEPENDS "rocprim-dev >= 2.10.1")
rocm_package_add_rpm_dependencies(DEPENDS "rocprim-devel >= 2.10.1")
set(CPACK_DEBIAN_PACKAGE_CONFLICTS "hip-thrust, thrust")
set(CPACK_RPM_PACKAGE_CONFLICTS "hip-thrust, thrust")
set(CPACK_DEBIAN_PACKAGE_PROVIDES "hipstdpar")
set(CPACK_RPM_PACKAGE_PROVIDES "hipstdpar")

set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set(CPACK_RPM_PACKAGE_LICENSE "ASL 2.0")
Expand Down
11 changes: 7 additions & 4 deletions thrust/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@ target_link_libraries(rocthrust
roc::rocprim_hip
)

# hipstdpar header target
add_library(hipstdpar INTERFACE)
target_link_libraries(hipstdpar INTERFACE rocthrust)

# Installation

# We need to install headers manually as rocm_install_targets
# does not support header-only libraries (INTERFACE targets)
rocm_install_targets(
TARGETS rocthrust
TARGETS rocthrust hipstdpar
)
if(CMAKE_VERSION VERSION_LESS 3.7)
# Workaround: old versions of CMake do not support set(CPACK_DEBIAN_ARCHIVE_TYPE "gnutar")
Expand All @@ -63,13 +67,13 @@ rocm_install(
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
)

#Install the wrapper to rocthrust folder.
#Install the wrapper to rocthrust folder.
#So wrapper would be in /opt/rocm-xxx/rocthrust/include/thrust
if (BUILD_FILE_REORG_BACKWARD_COMPATIBILITY AND NOT WIN32)
rocm_install(
DIRECTORY
"${PROJECT_BINARY_DIR}/rocthrust/wrapper/"
DESTINATION rocthrust/
DESTINATION rocthrust/
)
endif()

Expand All @@ -80,4 +84,3 @@ rocm_export_targets_header_only(
DEPENDS PACKAGE rocprim
NAMESPACE roc::
)

Loading

0 comments on commit d7d767c

Please sign in to comment.