forked from kokkos/kokkos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for rocThrust in sort when using HIP (kokkos#6793)
* Use rocthrust in sort when using HIP * Fix reviewer's comments * Make sure that we don't compile Kokkos for every supported architecture when enabling rocthrust * Export ROCTHRUST as a Kokkos dependency
- Loading branch information
Showing
7 changed files
with
71 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# ROCm 5.6 and earlier set AMDGPU_TARGETS and GPU_TARGETS to all the supported | ||
# architectures. Therefore, we end up compiling Kokkos for all the supported | ||
# architecture. Starting with ROCm 5.7 AMDGPU_TARGETS and GPU_TARGETS are empty. | ||
# It is the user's job to set the variables. Since we are injecting the | ||
# architecture flag ourselves, we can let the variables empty. To replicate the | ||
# behavior of ROCm 5.7 and later for earlier version of ROCm we set | ||
# AMDGPU_TARGETS and GPU_TARGETS to empty and set the values in the cache. If | ||
# the values are not cached, FIND_PACKAGE(rocthrust) will overwrite them. | ||
SET(AMDGPU_TARGETS "" CACHE STRING "AMD GPU targets to compile for") | ||
SET(GPU_TARGETS "" CACHE STRING "GPU targets to compile for") | ||
FIND_PACKAGE(rocthrust REQUIRED) | ||
KOKKOS_CREATE_IMPORTED_TPL(ROCTHRUST INTERFACE LINK_LIBRARIES roc::rocthrust) | ||
|
||
# Export ROCTHRUST as a Kokkos dependency | ||
KOKKOS_EXPORT_CMAKE_TPL(ROCTHRUST) |
This file contains 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
This file contains 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