SWDEV-380238 - hipcc passes incorrect device lib path to clang on windows (#3150)

hipcc should not pass --hip-device-lib-path to clang by default so that clang
decicde device lib path by itself.

hipcc only passes --hip-device-lib-path to clang if env var DEVICE_LIB_PATH
is specified.

DEVICE_LIB_PATH should be depricated in the future and users should use
--hip-device-lib-path instead.

Change-Id: I1ada35fb438643cbe68da777e3881aaa935162fa
Este commit está contenido en:
ROCm CI Service Account
2023-02-01 13:15:01 +05:30
cometido por GitHub
padre 436ba9757b
commit e18cbe64c1
+1 -16
Ver fichero
@@ -123,25 +123,10 @@ $HIP_VERSION = $hipvars::HIP_VERSION;
$HIP_ROCCLR_HOME = $hipvars::HIP_ROCCLR_HOME;
if ($HIP_PLATFORM eq "amd") {
# If using ROCclr runtime, need to find HIP_ROCCLR_HOME
if (!defined $DEVICE_LIB_PATH and -e "$HIP_ROCCLR_HOME/lib/bitcode") {
$DEVICE_LIB_PATH = "$HIP_ROCCLR_HOME/lib/bitcode";
}
$HIP_INCLUDE_PATH = "$HIP_ROCCLR_HOME/include";
if (!defined $HIP_LIB_PATH) {
$HIP_LIB_PATH = "$HIP_ROCCLR_HOME/lib";
}
if (!defined $DEVICE_LIB_PATH) {
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";
}
}
}
if ($verbose & 0x2) {
@@ -567,7 +552,7 @@ if ($HIP_PLATFORM eq "amd") {
}
if ($hasHIP) {
if ($DEVICE_LIB_PATH ne "$ROCM_PATH/amdgcn/bitcode") {
if (defined $DEVICE_LIB_PATH) {
$HIPCXXFLAGS .= " --hip-device-lib-path=\"$DEVICE_LIB_PATH\"";
}
}