From 8d06da3d56c8ae05ad5c918adaddc9153862cf17 Mon Sep 17 00:00:00 2001 From: Ron Lieberman Date: Sat, 4 Jul 2026 10:31:46 -0500 Subject: [PATCH 1/2] set submodule pointer for Compiler weekly amd-compiler-2026-ww23 llvm fc599244ede1 hipify c917282d spirv ddeda646 Remove patches/amd-mainline/llvm-project/0002-hipcc-fix-default-include-path-on-Windows-and-adapt-.patch patches/amd-mainline/llvm-project/0006-Rework-constructHipPath-so-HIP_PATH-env-var-is-lower.patch" JIRA ID : https://amd-hub.atlassian.net/browse/LCOMPILER-2150 CP's: LCOMPILER-2326 fc599244ede1 Revert "Reapply [AA] No synchronization effects for never-escaping identified local (#196923)" ROCM-3522 c3195d0d8454 [compiler-rt] restores ASAN to GPU.cmake and AMDGPU.cmake ROCM-3522 14d2f09049c2 [codeCov] temporary GPU PGO code cov ccache LCOMPILER-2339 be7669ee8a9b Revert "[SLP] Disable -slp-inst-count-check by default" LCOMPILER-2313 b642fe0de7a8 Revert "[AMDGPU] Widen MUBUF/MTBUF source-vgpr WAR hazard on gfx940-family to SGPR soffset (#197267) LCOMPILER-2150 ad3db54b194c Revert "device-libs: Move trig edge case to input (#1700)" LCOMPILER-2241 2d6437acffb0 Revert "[AMDGPU] Enable runtime loop unrolling (#194924)" old-driver be51a5bcd43c [HIP] use old hip driver by default --- compiler/amd-llvm | 2 +- compiler/hipify | 2 +- compiler/spirv-llvm-translator | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/amd-llvm b/compiler/amd-llvm index aa451e1fe6a..fc599244ede 160000 --- a/compiler/amd-llvm +++ b/compiler/amd-llvm @@ -1 +1 @@ -Subproject commit aa451e1fe6a793394d6733051b1778633063ae96 +Subproject commit fc599244ede1da78b4ccd5b54f13dde01f6f4b20 diff --git a/compiler/hipify b/compiler/hipify index 6acec7751d2..c917282dbc1 160000 --- a/compiler/hipify +++ b/compiler/hipify @@ -1 +1 @@ -Subproject commit 6acec7751d2b2bfe162dba9efdcf7c16efb27bd8 +Subproject commit c917282dbc1fe85d3814807a2c77d4288cff112d diff --git a/compiler/spirv-llvm-translator b/compiler/spirv-llvm-translator index fb08e83ae87..ddeda6468d4 160000 --- a/compiler/spirv-llvm-translator +++ b/compiler/spirv-llvm-translator @@ -1 +1 @@ -Subproject commit fb08e83ae872775acfeaee53fda3ccf99a04ba53 +Subproject commit ddeda6468d45cf1e888a0e81e50bc170756a335b From 70ea254e21eef42bb6366851196dbe6f56b574b5 Mon Sep 17 00:00:00 2001 From: Ron Lieberman Date: Sat, 4 Jul 2026 10:31:47 -0500 Subject: [PATCH 2/2] Remove patches/amd-mainline/llvm-project/0002-hipcc-fix-default-include-path-on-Windows-and-adapt-.patch patches/amd-mainline/llvm-project/0006-Rework-constructHipPath-so-HIP_PATH-env-var-is-lower.patch --- ...t-include-path-on-Windows-and-adapt-.patch | 124 ------------------ ...HipPath-so-HIP_PATH-env-var-is-lower.patch | 57 -------- 2 files changed, 181 deletions(-) delete mode 100644 patches/amd-mainline/llvm-project/0002-hipcc-fix-default-include-path-on-Windows-and-adapt-.patch delete mode 100644 patches/amd-mainline/llvm-project/0006-Rework-constructHipPath-so-HIP_PATH-env-var-is-lower.patch diff --git a/patches/amd-mainline/llvm-project/0002-hipcc-fix-default-include-path-on-Windows-and-adapt-.patch b/patches/amd-mainline/llvm-project/0002-hipcc-fix-default-include-path-on-Windows-and-adapt-.patch deleted file mode 100644 index c1571528740..00000000000 --- a/patches/amd-mainline/llvm-project/0002-hipcc-fix-default-include-path-on-Windows-and-adapt-.patch +++ /dev/null @@ -1,124 +0,0 @@ -From f2b6842a134c57526bb2a304d2f85c473be3c957 Mon Sep 17 00:00:00 2001 -From: Scott Tsai -Date: Tue, 15 Apr 2025 09:30:13 +0800 -Subject: [PATCH 2/8] hipcc: fix default include path on Windows and adapt to - TheRock rocm layout - -getCppConfig in the orignial code did not add the content of -`getHipPath()` to the default C Preprocessor definitions in the -`if (isWindows())` path. - -Change default `hipClangPath` to look for clang under `lib/llvm/bin` -like Linux instead of expecting `clang.exe` to be next to `hipcc.exe`. - -Change output of `hipcc.exe --ldflags` to use Windows "\" path -separators to make the output obviously correct. ---- - amd/hipcc/src/hipBin_amd.h | 60 ++++++++++++++------------------------ - 1 file changed, 22 insertions(+), 38 deletions(-) - -diff --git a/amd/hipcc/src/hipBin_amd.h b/amd/hipcc/src/hipBin_amd.h -index ecea39e071b4..c74b43ff598f 100644 ---- a/amd/hipcc/src/hipBin_amd.h -+++ b/amd/hipcc/src/hipBin_amd.h -@@ -201,16 +201,11 @@ void HipBinAmd::constructCompilerPath() { - const EnvVariables& envVariables = getEnvVariables(); - if (envVariables.hipClangPathEnv_.empty()) { - fs::path hipClangPath; -- if (isWindows()) { -- compilerPath = getHipPath(); -- hipClangPath = compilerPath; -- hipClangPath /= "bin"; -- } else { -- compilerPath = getRoccmPath(); -- hipClangPath = compilerPath; -- hipClangPath /= "lib/llvm/bin"; -- } -- -+ compilerPath = getRoccmPath(); -+ hipClangPath = compilerPath; -+ hipClangPath /= "lib"; -+ hipClangPath /= "llvm"; -+ hipClangPath /= "bin"; - compilerPath = hipClangPath.string(); - } else { - compilerPath = envVariables.hipClangPathEnv_; -@@ -226,32 +221,17 @@ const string& HipBinAmd::getCompilerPath() const { - void HipBinAmd::printCompilerInfo() const { - const string& hipClangPath = getCompilerPath(); - const string& hipPath = getHipPath(); -- if (isWindows()) { -- string cmd = hipClangPath + "/clang++ --version"; -- system(cmd.c_str()); // hipclang version -- cout << "llc-version :" << endl; -- cmd = hipClangPath + "/llc --version"; -- system(cmd.c_str()); // llc version -- cout << "hip-clang-cxxflags :" << endl; -- cmd = hipPath + "/bin/hipcc --cxxflags"; -- system(cmd.c_str()); // cxx flags -- cout << endl << "hip-clang-ldflags :" << endl; -- cmd = hipPath + "/bin/hipcc --ldflags"; -- system(cmd.c_str()); // ld flags -- cout << endl; -- } else { -- string cmd = hipClangPath + "/clang++ --version"; -- system(cmd.c_str()); // hipclang version -- cmd = hipClangPath + "/llc --version"; -- system(cmd.c_str()); // llc version -- cout << "hip-clang-cxxflags :" << endl; -- cmd = hipPath + "/bin/hipcc --cxxflags"; -- system(cmd.c_str()); // cxx flags -- cout << endl << "hip-clang-ldflags :" << endl; -- cmd = hipPath + "/bin/hipcc --ldflags"; -- system(cmd.c_str()); // ldflags version -- cout << endl; -- } -+ string cmd = hipClangPath + "/clang++ --version"; -+ system(cmd.c_str()); // hipclang version -+ cmd = hipClangPath + "/llc --version"; -+ system(cmd.c_str()); // llc version -+ cout << "hip-clang-cxxflags :" << endl; -+ cmd = hipPath + "/bin/hipcc --cxxflags"; -+ system(cmd.c_str()); // cxx flags -+ cout << endl << "hip-clang-ldflags :" << endl; -+ cmd = hipPath + "/bin/hipcc --ldflags"; -+ system(cmd.c_str()); // ldflags version -+ cout << endl; - } - - string HipBinAmd::getCompilerVersion() { -@@ -293,17 +273,19 @@ string HipBinAmd::getCppConfig() { - hipPathInclude = hipPath; - hipPathInclude /= "include"; - if (isWindows()) { -+ // -I{hipPathInclude}/ - cppConfig += " -I" + hipPathInclude.string(); - cppConfigFs = cppConfig; - cppConfigFs /= "/"; - } else { -+ // -I{hipPathInclude} -I{hsaPath}/include - const string& hsaPath = getHsaPath(); - cppConfig += " -I" + hipPathInclude.string() + - " -I" + hsaPath; - cppConfigFs = cppConfig; - cppConfigFs /= "include"; -- cppConfig = cppConfigFs.string(); - } -+ cppConfig = cppConfigFs.string(); - return cppConfig; - } - -@@ -874,7 +856,9 @@ void HipBinAmd::executeHipCCCmd(vector argv) { - - // to avoid using dk linker or MSVC linker - if (isWindows()) { -- HIPLDFLAGS += " -fuse-ld=lld --ld-path=\"" + hipClangPath + "/lld-link.exe\""; -+ fs::path ldPath = hipClangPath; -+ ldPath /= "lld-link.exe"; -+ HIPLDFLAGS += " -fuse-ld=lld --ld-path=\"" + ldPath.string() + "\""; - } - - if (!compileOnly) { --- -2.48.1 - diff --git a/patches/amd-mainline/llvm-project/0006-Rework-constructHipPath-so-HIP_PATH-env-var-is-lower.patch b/patches/amd-mainline/llvm-project/0006-Rework-constructHipPath-so-HIP_PATH-env-var-is-lower.patch deleted file mode 100644 index 541106eea5d..00000000000 --- a/patches/amd-mainline/llvm-project/0006-Rework-constructHipPath-so-HIP_PATH-env-var-is-lower.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 767cd4083eaacf7a6da1f8ca62966766767cfd41 Mon Sep 17 00:00:00 2001 -From: Scott Todd -Date: Tue, 5 Aug 2025 12:40:12 -0700 -Subject: [PATCH 6/8] Rework constructHipPath so HIP_PATH env var is lower - priority. - ---- - amd/hipcc/src/hipBin_base.h | 28 +++++++++++++++++++++++----- - 1 file changed, 23 insertions(+), 5 deletions(-) - -diff --git a/amd/hipcc/src/hipBin_base.h b/amd/hipcc/src/hipBin_base.h -index ea37e6fd12fc..4aa7431fdba6 100644 ---- a/amd/hipcc/src/hipBin_base.h -+++ b/amd/hipcc/src/hipBin_base.h -@@ -320,16 +320,34 @@ void HipBinBase::readEnvVariables() { - - // constructs the HIP path - void HipBinBase::constructHipPath() { -- // we need to use --hip-path option -+ // The --hip-path argument option takes precedence over all other settings. - string hip_path_name = gethip_pathOption(); - if (!hip_path_name.empty()) { - variables_.hipPathEnv_ = hip_path_name; -- } else if (envVariables_.hipPathEnv_.empty()) { -- fs::path full_path(hipcc::utils::getSelfPath()); -- variables_.hipPathEnv_ = (full_path.parent_path()).string(); -- } else { -+ return; -+ } -+ -+ fs::path full_path(hipcc::utils::getSelfPath()); -+ fs::path parent_path = full_path.parent_path(); -+ -+ // Next, check for `../lib/llvm/bin/`, the standard ROCm install structure. -+ fs::path llvm_path = parent_path / "lib" / "llvm" / "bin"; -+ if (fs::exists(llvm_path)) { -+ variables_.hipPathEnv_ = parent_path.string(); -+ return; -+ } -+ -+ // Otherwise, check the HIP_PATH environment variable from the HIP SDK. -+ // Normally an environment variable setting could take precedence over an -+ // implicit path, but this environment variable is set by system-wide installs -+ // and self-contained builds/installs should not be reading that global state. -+ if (!envVariables_.hipPathEnv_.empty()) { - variables_.hipPathEnv_ = envVariables_.hipPathEnv_; -+ return; - } -+ -+ // Finally, fallback to the parent path (the standard ROCm install structure). -+ variables_.hipPathEnv_ = parent_path.string(); - } - - --- -2.48.1 -