SWDEV-274915 - Prevent repeatedly linking dependence
Some upstream will load hip multiple times thus Rocclr static lib will
be linked to hip::amdhip64 many times. This will bring some unexpected
issues such as in hipBLAS. The patch prevents his happening.
Change-Id: I6bb27659f74371dae6e59c59fd6bb2022cc062ff
[ROCm/clr commit: f65348cfbe]
This commit is contained in:
@@ -176,7 +176,11 @@ if(HIP_RUNTIME MATCHES "rocclr")
|
||||
message(STATUS "hip::amdhip64 is ${amdhip64_type}")
|
||||
if(${amdhip64_type} STREQUAL "STATIC_LIBRARY")
|
||||
# For cyclic dependence
|
||||
target_link_libraries(amdrocclr_static INTERFACE hip::amdhip64)
|
||||
get_target_property(link_interf_libs amdrocclr_static LINK_INTERFACE_LIBRARIES)
|
||||
if(NOT "${link_interf_libs}" MATCHES "hip\:\:amdhip64")
|
||||
# Prevent repeatedly linking dependence
|
||||
target_link_libraries(amdrocclr_static INTERFACE hip::amdhip64)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user