diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2020-10-26 21:10:18 (GMT) |
---|---|---|
committer | Zack Galbreath <zack.galbreath@kitware.com> | 2021-06-07 19:25:33 (GMT) |
commit | 20d086f1a2c320da59830682a19e006ec19dca94 (patch) | |
tree | d717c7a2fd5742fb07a01dd8d418effd1cabb7b8 /Tests/HIP | |
parent | 2e86e50c2fb2897dc1a0612676c5bd26eb7924a9 (diff) | |
download | CMake-20d086f1a2c320da59830682a19e006ec19dca94.zip CMake-20d086f1a2c320da59830682a19e006ec19dca94.tar.gz CMake-20d086f1a2c320da59830682a19e006ec19dca94.tar.bz2 |
HIP: All HIP tests now run on CMake's current AMD hardware
Diffstat (limited to 'Tests/HIP')
-rw-r--r-- | Tests/HIP/InferHipLang1/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/HIP/InferHipLang2/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/HIP/MathFunctions/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/HIP/MixedLanguage/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/HIP/TryCompile/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/HIP/WithDefs/CMakeLists.txt | 1 |
6 files changed, 6 insertions, 0 deletions
diff --git a/Tests/HIP/InferHipLang1/CMakeLists.txt b/Tests/HIP/InferHipLang1/CMakeLists.txt index 63d77fd..f3c5421 100644 --- a/Tests/HIP/InferHipLang1/CMakeLists.txt +++ b/Tests/HIP/InferHipLang1/CMakeLists.txt @@ -10,3 +10,4 @@ target_compile_features(InterfaceWithHIP INTERFACE cxx_std_11) add_executable(HIPInferHipLang1 ) target_link_libraries(HIPInferHipLang1 PRIVATE InterfaceWithHIP) +set_property(TARGET HIPInferHipLang1 PROPERTY HIP_ARCHITECTURES gfx900) diff --git a/Tests/HIP/InferHipLang2/CMakeLists.txt b/Tests/HIP/InferHipLang2/CMakeLists.txt index 0e69de3..a8a55b7 100644 --- a/Tests/HIP/InferHipLang2/CMakeLists.txt +++ b/Tests/HIP/InferHipLang2/CMakeLists.txt @@ -7,6 +7,7 @@ add_library(InterfaceWithHIP OBJECT) target_sources(InterfaceWithHIP PRIVATE interface.hip main.cxx) target_compile_features(InterfaceWithHIP INTERFACE hip_std_14) target_compile_features(InterfaceWithHIP INTERFACE cxx_std_11) +set_property(TARGET InterfaceWithHIP PROPERTY HIP_ARCHITECTURES gfx900) add_executable(HIPInferHipLang2 ) target_link_libraries(HIPInferHipLang2 PRIVATE InterfaceWithHIP) diff --git a/Tests/HIP/MathFunctions/CMakeLists.txt b/Tests/HIP/MathFunctions/CMakeLists.txt index 81e3ddb..69d63dd 100644 --- a/Tests/HIP/MathFunctions/CMakeLists.txt +++ b/Tests/HIP/MathFunctions/CMakeLists.txt @@ -13,6 +13,7 @@ project(MathFunctions HIP) # 3. This makes sure CMake properly links to all the built-in libraries # that hip needs that inject support for __half support # +set(CMAKE_HIP_ARCHITECTURES "gfx900") add_executable(HIPOnlyMathFunctions main.hip) target_compile_options(HIPOnlyMathFunctions PRIVATE -Werror) target_compile_features(HIPOnlyMathFunctions PRIVATE hip_std_14) diff --git a/Tests/HIP/MixedLanguage/CMakeLists.txt b/Tests/HIP/MixedLanguage/CMakeLists.txt index 4f6dd3b..ce2ff89 100644 --- a/Tests/HIP/MixedLanguage/CMakeLists.txt +++ b/Tests/HIP/MixedLanguage/CMakeLists.txt @@ -3,6 +3,7 @@ project (MixedLanguage C CXX HIP) set(CMAKE_HIP_STANDARD 14) set(CMAKE_CXX_STANDARD 14) +set(CMAKE_HIP_ARCHITECTURES "gfx900") #Goal for this example: #make sure that we can build multiple languages into targets diff --git a/Tests/HIP/TryCompile/CMakeLists.txt b/Tests/HIP/TryCompile/CMakeLists.txt index f3bb3bf..92a834c 100644 --- a/Tests/HIP/TryCompile/CMakeLists.txt +++ b/Tests/HIP/TryCompile/CMakeLists.txt @@ -4,6 +4,7 @@ project (TryCompile HIP) #Goal for this example: # Verify try_compile with HIP language works set(CMAKE_HIP_STANDARD 14) +set(CMAKE_HIP_ARCHITECTURES gfx803 gfx900) set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) try_compile(result "${CMAKE_CURRENT_BINARY_DIR}" diff --git a/Tests/HIP/WithDefs/CMakeLists.txt b/Tests/HIP/WithDefs/CMakeLists.txt index 3d4461b..e2db182 100644 --- a/Tests/HIP/WithDefs/CMakeLists.txt +++ b/Tests/HIP/WithDefs/CMakeLists.txt @@ -17,6 +17,7 @@ target_compile_features(HIPOnlyWithDefs PRIVATE hip_std_17) target_compile_options(HIPOnlyWithDefs PRIVATE + --offload-arch=gfx900 -DFLAG_COMPILE_LANG_$<COMPILE_LANGUAGE> $<$<HIP_COMPILER_ID:ROCMClang>:-DFLAG_LANG_IS_HIP=$<COMPILE_LANGUAGE:HIP>> # Host-only defines are possible only on NVCC. ) |