[PATCH] D120557: [HIP] File device library ABI version file name

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 25 05:29:33 PST 2022


yaxunl created this revision.
yaxunl added a reviewer: tra.
Herald added subscribers: kerbowa, jvesely.
yaxunl requested review of this revision.

It should be oclc_abi_version* instead of abi_version*.


https://reviews.llvm.org/D120557

Files:
  clang/lib/Driver/ToolChains/AMDGPU.cpp
  clang/test/Driver/Inputs/rocm/amdgcn/bitcode/abi_version_400.bc
  clang/test/Driver/Inputs/rocm/amdgcn/bitcode/abi_version_500.bc
  clang/test/Driver/hip-device-libs.hip


Index: clang/test/Driver/hip-device-libs.hip
===================================================================
--- clang/test/Driver/hip-device-libs.hip
+++ 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
Index: clang/lib/Driver/ToolChains/AMDGPU.cpp
===================================================================
--- clang/lib/Driver/ToolChains/AMDGPU.cpp
+++ clang/lib/Driver/ToolChains/AMDGPU.cpp
@@ -91,7 +91,7 @@
     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") {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120557.411387.patch
Type: text/x-patch
Size: 1626 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220225/1d602629/attachment.bin>


More information about the cfe-commits mailing list