2
0

update device library path

fix device lib directory

add missing --hip-link switch for link phase

Change-Id: I4b2eeb32648ca3cec72ec1f4e3381ce1fc0a90a5


[ROCm/clr commit: c414c70e8f]
Este cometimento está contido em:
Siu Chi Chan
2020-05-21 15:11:41 -04:00
cometido por Siuchi Chan
ascendente 216873e9c8
cometimento 85d781ba65
2 ficheiros modificados com 21 adições e 6 eliminações
+8 -1
Ver ficheiro
@@ -168,7 +168,14 @@ if (defined $HIP_COMPILER and $HIP_PLATFORM eq "hcc" and $HIP_COMPILER eq "clang
$HIP_CLANG_PATH = "$ROCM_PATH/llvm/bin";
}
if (!defined $DEVICE_LIB_PATH) {
$DEVICE_LIB_PATH = "$ROCM_PATH/lib";
if (-e "$ROCM_PATH/amdgcn/bitcode") {
$DEVICE_LIB_PATH = "$ROCM_PATH/amdgcn/bitcode";
}
else {
# This path is to support an older build of the device library
# TODO: To be removed in the future.
$DEVICE_LIB_PATH = "$ROCM_PATH/lib";
}
}
}
+13 -5
Ver ficheiro
@@ -142,18 +142,26 @@ else()
endif()
if(HIP_COMPILER STREQUAL "clang")
set_property(TARGET hip::device APPEND PROPERTY
INTERFACE_COMPILE_OPTIONS -x hip --hip-device-lib-path=${AMD_DEVICE_LIBS_PREFIX}/lib
)
if (HIP_CXX_COMPILER MATCHES ".*clang\\+\\+")
set_property(TARGET hip::device APPEND PROPERTY
INTERFACE_COMPILE_OPTIONS -mllvm -amdgpu-early-inline-all=true -mllvm -amdgpu-function-calls=false
)
endif()
if (EXISTS ${AMD_DEVICE_LIBS_PREFIX}/amdgcn/bitcode)
set_property(TARGET hip::device APPEND PROPERTY
INTERFACE_COMPILE_OPTIONS -x hip --hip-device-lib-path=${AMD_DEVICE_LIBS_PREFIX}/amdgcn/bitcode
)
else()
# This path is to support an older build of the device library
# TODO: To be removed in the future.
set_property(TARGET hip::device APPEND PROPERTY
INTERFACE_COMPILE_OPTIONS -x hip --hip-device-lib-path=${AMD_DEVICE_LIBS_PREFIX}/lib
)
endif()
set_property(TARGET hip::device APPEND PROPERTY
INTERFACE_LINK_LIBRARIES --hip-device-lib-path=${AMD_DEVICE_LIBS_PREFIX}/lib --hip-link
INTERFACE_LINK_LIBRARIES --hip-link
)
set_property(TARGET hip::device APPEND PROPERTY