[clang] 5966c2e - [OpenMP] Fix mismatched device runtime name
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 4 13:54:42 PST 2022
Author: Joseph Huber
Date: 2022-02-04T16:54:31-05:00
New Revision: 5966c2ec026c7953a86dd849b13a98589ed10e9c
URL: https://github.com/llvm/llvm-project/commit/5966c2ec026c7953a86dd849b13a98589ed10e9c
DIFF: https://github.com/llvm/llvm-project/commit/5966c2ec026c7953a86dd849b13a98589ed10e9c.diff
LOG: [OpenMP] Fix mismatched device runtime name
Summary:
The new runtime was deleted. AMD's old runtime used the triple name
`amdgcn` while the new runtime used `amdgpu`. This was not updated when
the old runtime was removed causing the library to not be found on
AMDGPU.
Added:
Modified:
clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
clang/lib/Driver/ToolChains/Cuda.cpp
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp b/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
index b68b026cd988..3088ba593c24 100644
--- a/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
+++ b/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
@@ -289,8 +289,7 @@ void AMDGPUOpenMPToolChain::addClangTargetOptions(
if (getDriver().isUsingLTO(/* IsOffload */ true))
return;
- std::string BitcodeSuffix;
- BitcodeSuffix = "amdgcn-" + GPUArch;
+ std::string BitcodeSuffix = "amdgpu-" + GPUArch;
addOpenMPDeviceRTL(getDriver(), DriverArgs, CC1Args, BitcodeSuffix,
getTriple());
diff --git a/clang/lib/Driver/ToolChains/Cuda.cpp b/clang/lib/Driver/ToolChains/Cuda.cpp
index 14e7d26ba1c0..7dd54f87b5f4 100644
--- a/clang/lib/Driver/ToolChains/Cuda.cpp
+++ b/clang/lib/Driver/ToolChains/Cuda.cpp
@@ -748,8 +748,7 @@ void CudaToolChain::addClangTargetOptions(
if (getDriver().isUsingLTO(/* IsOffload */ true))
return;
- std::string BitcodeSuffix;
- BitcodeSuffix = "nvptx-" + GpuArch.str();
+ std::string BitcodeSuffix = "nvptx-" + GpuArch.str();
addOpenMPDeviceRTL(getDriver(), DriverArgs, CC1Args, BitcodeSuffix,
getTriple());
More information about the cfe-commits
mailing list