Merge pull request #133 from scchan/hcc_version_detect
detect the hcc version and conditionally add -hc-function-calls
Cette révision appartient à :
@@ -152,7 +152,13 @@ if("${HIP_COMPILER}" MATCHES "clang")
|
||||
endif()
|
||||
|
||||
if("${HIP_COMPILER}" MATCHES "hcc")
|
||||
target_link_libraries(rccl PRIVATE -hc-function-calls)
|
||||
find_program( hcc_executable hcc )
|
||||
execute_process(COMMAND bash "-c" "${hcc_executable} --version | sed -e '1!d' -e 's/.*based on HCC\\s*//'" OUTPUT_VARIABLE hcc_version_string)
|
||||
execute_process(COMMAND bash "-c" "echo \"${hcc_version_string}\" | awk -F\".\" '{ printf $1}'" OUTPUT_VARIABLE hcc_major_version)
|
||||
execute_process(COMMAND bash "-c" "echo \"${hcc_version_string}\" | awk -F\".\" '{ printf $2}'" OUTPUT_VARIABLE hcc_minor_version)
|
||||
if ("${hcc_major_version}.${hcc_minor_version}" VERSION_LESS "2.10")
|
||||
target_link_libraries(rccl PRIVATE -hc-function-calls)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(TARGET hip::device)
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur