From e18cbe64c173f6f9abf1b56f78cdd9bc7d4716d2 Mon Sep 17 00:00:00 2001 From: ROCm CI Service Account <66695075+rocm-ci@users.noreply.github.com> Date: Wed, 1 Feb 2023 13:15:01 +0530 Subject: [PATCH] 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 --- bin/hipcc.pl | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/bin/hipcc.pl b/bin/hipcc.pl index 6898cd0bba..f8fef933f9 100644 --- a/bin/hipcc.pl +++ b/bin/hipcc.pl @@ -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\""; } }