File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,13 @@ if("${HIP_COMPILER}" MATCHES "clang")
152
152
endif ()
153
153
154
154
if ("${HIP_COMPILER} " MATCHES "hcc" )
155
- target_link_libraries (rccl PRIVATE -hc-function-calls)
155
+ find_program ( hcc_executable hcc )
156
+ execute_process (COMMAND bash "-c" "${hcc_executable} --version | sed -e '1!d' -e 's/.*based on HCC\\ s*//'" OUTPUT_VARIABLE hcc_version_string)
157
+ execute_process (COMMAND bash "-c" "echo \" ${hcc_version_string} \" | awk -F\" .\" '{ printf $1}'" OUTPUT_VARIABLE hcc_major_version)
158
+ execute_process (COMMAND bash "-c" "echo \" ${hcc_version_string} \" | awk -F\" .\" '{ printf $2}'" OUTPUT_VARIABLE hcc_minor_version)
159
+ if ("${hcc_major_version} .${hcc_minor_version} " VERSION_LESS "2.10" )
160
+ target_link_libraries (rccl PRIVATE -hc-function-calls)
161
+ endif ()
156
162
endif ()
157
163
158
164
if (TARGET hip::device)
You can’t perform that action at this time.
0 commit comments