[clang] 092f15a - [HIP] File device library ABI version file name
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 28 13:25:08 PST 2022
Author: Yaxun (Sam) Liu
Date: 2022-02-28T16:24:50-05:00
New Revision: 092f15ac40ce35d077e0225a4462bc4dfa379391
URL: https://github.com/llvm/llvm-project/commit/092f15ac40ce35d077e0225a4462bc4dfa379391
DIFF: https://github.com/llvm/llvm-project/commit/092f15ac40ce35d077e0225a4462bc4dfa379391.diff
LOG: [HIP] File device library ABI version file name
It should be oclc_abi_version* instead of abi_version*.
Reviewed by: Artem Belevich
Differential Revision: https://reviews.llvm.org/D120557
Added:
clang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_abi_version_400.bc
clang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_abi_version_500.bc
Modified:
clang/lib/Driver/ToolChains/AMDGPU.cpp
clang/test/Driver/hip-device-libs.hip
Removed:
clang/test/Driver/Inputs/rocm/amdgcn/bitcode/abi_version_400.bc
clang/test/Driver/Inputs/rocm/amdgcn/bitcode/abi_version_500.bc
################################################################################
diff --git a/clang/lib/Driver/ToolChains/AMDGPU.cpp b/clang/lib/Driver/ToolChains/AMDGPU.cpp
index 7d2b9e3b46c2f..596fe5b2a2029 100644
--- a/clang/lib/Driver/ToolChains/AMDGPU.cpp
+++ b/clang/lib/Driver/ToolChains/AMDGPU.cpp
@@ -91,7 +91,7 @@ void RocmInstallationDetector::scanLibDevicePath(llvm::StringRef Path) {
else if (FileName.endswith(Suffix))
BaseName = FileName.drop_back(Suffix.size());
- const StringRef ABIVersionPrefix = "abi_version_";
+ const StringRef ABIVersionPrefix = "oclc_abi_version_";
if (BaseName == "ocml") {
OCML = FilePath;
} else if (BaseName == "ockl") {
diff --git a/clang/test/Driver/Inputs/rocm/amdgcn/bitcode/abi_version_400.bc b/clang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_abi_version_400.bc
similarity index 100%
rename from clang/test/Driver/Inputs/rocm/amdgcn/bitcode/abi_version_400.bc
rename to clang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_abi_version_400.bc
diff --git a/clang/test/Driver/Inputs/rocm/amdgcn/bitcode/abi_version_500.bc b/clang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_abi_version_500.bc
similarity index 100%
rename from clang/test/Driver/Inputs/rocm/amdgcn/bitcode/abi_version_500.bc
rename to clang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_abi_version_500.bc
diff --git a/clang/test/Driver/hip-device-libs.hip b/clang/test/Driver/hip-device-libs.hip
index 59e4226ad84aa..29077ee1ecf25 100644
--- a/clang/test/Driver/hip-device-libs.hip
+++ b/clang/test/Driver/hip-device-libs.hip
@@ -217,10 +217,10 @@
// DIVSQRT-SAME: "-mlink-builtin-bitcode" "{{.*}}oclc_correctly_rounded_sqrt_off.bc"
// ABI4-NOT: error:
-// ABI4: "-mlink-builtin-bitcode" "{{.*}}abi_version_400.bc"
+// ABI4: "-mlink-builtin-bitcode" "{{.*}}oclc_abi_version_400.bc"
// ABI5-NOT: error:
-// ABI5: "-mlink-builtin-bitcode" "{{.*}}abi_version_500.bc"
+// ABI5: "-mlink-builtin-bitcode" "{{.*}}oclc_abi_version_500.bc"
// NOABI4-NOT: error:
-// NOABI4-NOT: "-mlink-builtin-bitcode" "{{.*}}abi_version_400.bc"
-// NOABI4-NOT: "-mlink-builtin-bitcode" "{{.*}}abi_version_500.bc"
+// NOABI4-NOT: "-mlink-builtin-bitcode" "{{.*}}oclc_abi_version_400.bc"
+// NOABI4-NOT: "-mlink-builtin-bitcode" "{{.*}}oclc_abi_version_500.bc"
// NOABI5: error: cannot find ROCm device libraryfor ABI version 5; provide its path via '--rocm-path' or '--rocm-device-lib-path', or pass '-nogpulib' to build without ROCm device library
More information about the cfe-commits
mailing list