Skip to content

Commit f6ef9c0

Browse files
committed
[HIP] Update compile options
Use --rocm-path to specify ROCM path. Update AMDGPU archs. Remove some outdated options. Reviewed by: gkistanova Differential Revision: https://reviews.llvm.org/D156071
1 parent 6421a2d commit f6ef9c0

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

External/HIP/CMakeLists.txt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ macro(create_hip_tests)
5050
get_version(RocmVersion ${RocmDir})
5151
message(STATUS "Found ROCm ${RocmVersion}")
5252
list(APPEND ROCM_PATHS ${RocmDir})
53-
add_library(amdhip64-${RocmVersion} SHARED IMPORTED)
54-
set_property(TARGET amdhip64-${RocmVersion} PROPERTY IMPORTED_LOCATION
55-
${RocmDir}/lib/libamdhip64.so)
5653
endforeach(RocmDir)
5754

5855
if(NOT ROCM_PATHS)
@@ -67,17 +64,15 @@ macro(create_hip_tests)
6764
COMMENT "Run all simple HIP tests")
6865

6966
if(NOT AMDGPU_ARCHS)
70-
list(APPEND AMDGPU_ARCHS "gfx906;gfx908")
67+
list(APPEND AMDGPU_ARCHS "gfx906;gfx90a;gfx1030;gfx1100")
7168
endif()
7269

7370
foreach(_RocmPath ${ROCM_PATHS})
7471
get_version(_RocmVersion ${_RocmPath})
7572
set(_HIP_Suffix "hip-${_RocmVersion}")
7673
# Set up HIP test flags
77-
set(_HIP_CPPFLAGS -D__HIP_ROCclr__ -xhip --hip-device-lib-path=${_RocmPath}/amdgcn/bitcode
78-
-I${_RocmPath}/include)
79-
set(_HIP_LDFLAGS -L${_RocmPath}/lib -lamdhip64)
80-
set(_HIP_Libs amdhip64-${RocmVersion})
74+
set(_HIP_CPPFLAGS --rocm-path=${_RocmPath})
75+
set(_HIP_LDFLAGS --rocm-path=${_RocmPath} --hip-link -rtlib=compiler-rt -frtlib-add-rpath)
8176

8277
# Unset these for each iteration of rocm path.
8378
set(_ArchFlags)

0 commit comments

Comments
 (0)