diff --git a/Tests/HIP/InferHipLang1/CMakeLists.txt b/Tests/HIP/InferHipLang1/CMakeLists.txt index 63d77fdaa4..f3c54216c1 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 0e69de38fe..a8a55b7b0a 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 81e3ddb26f..69d63dd0a1 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 4f6dd3b0fb..ce2ff89935 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 f3bb3bf99d..92a834c61b 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 3d4461b6b5..e2db1820a7 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_$ $<$:-DFLAG_LANG_IS_HIP=$> # Host-only defines are possible only on NVCC. )