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:
cometido por
Siuchi Chan
ascendente
216873e9c8
cometimento
85d781ba65
@@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador