clang/AMDGPU: Stop looking for hip.bc in device libs (#134801)
This has been an empty library since January 2023
This commit is contained in:
@@ -59,8 +59,6 @@ void RocmInstallationDetector::scanLibDevicePath(llvm::StringRef Path) {
|
||||
OCKL = FilePath;
|
||||
} else if (BaseName == "opencl") {
|
||||
OpenCL = FilePath;
|
||||
} else if (BaseName == "hip") {
|
||||
HIP = FilePath;
|
||||
} else if (BaseName == "asanrtl") {
|
||||
AsanRTL = FilePath;
|
||||
} else if (BaseName == "oclc_finite_only_off") {
|
||||
|
||||
@@ -392,9 +392,6 @@ HIPAMDToolChain::getDeviceLibs(const llvm::opt::ArgList &DriverArgs) const {
|
||||
StringRef GpuArch = getGPUArch(DriverArgs);
|
||||
assert(!GpuArch.empty() && "Must have an explicit GPU arch.");
|
||||
|
||||
// Add the HIP specific bitcode library.
|
||||
BCLibs.emplace_back(RocmInstallation->getHIPPath());
|
||||
|
||||
// Add common device libraries like ocml etc.
|
||||
for (auto N : getCommonDeviceLibNames(DriverArgs, GpuArch.str()))
|
||||
BCLibs.emplace_back(N);
|
||||
|
||||
@@ -129,7 +129,6 @@ private:
|
||||
|
||||
// Libraries that are always linked depending on the language
|
||||
SmallString<0> OpenCL;
|
||||
SmallString<0> HIP;
|
||||
|
||||
// Asan runtime library
|
||||
SmallString<0> AsanRTL;
|
||||
@@ -151,7 +150,7 @@ private:
|
||||
bool Verbose;
|
||||
|
||||
bool allGenericLibsValid() const {
|
||||
return !OCML.empty() && !OCKL.empty() && !OpenCL.empty() && !HIP.empty() &&
|
||||
return !OCML.empty() && !OCKL.empty() && !OpenCL.empty() &&
|
||||
WavefrontSize64.isValid() && FiniteOnly.isValid() &&
|
||||
UnsafeMath.isValid() && DenormalsAreZero.isValid() &&
|
||||
CorrectlyRoundedSqrt.isValid();
|
||||
@@ -231,11 +230,6 @@ public:
|
||||
return OpenCL;
|
||||
}
|
||||
|
||||
StringRef getHIPPath() const {
|
||||
assert(!HIP.empty());
|
||||
return HIP;
|
||||
}
|
||||
|
||||
/// Returns empty string of Asan runtime library is not available.
|
||||
StringRef getAsanRTLPath() const { return AsanRTL; }
|
||||
|
||||
|
||||
@@ -208,10 +208,9 @@
|
||||
// ALL-NOT: error:
|
||||
// ALL: {{"[^"]*clang[^"]*"}}
|
||||
|
||||
// RESDIR-SAME: "-mlink-builtin-bitcode" "[[DEVICELIB_DIR:[^"]+(/|\\\\)rocm_resource_dir(/|\\\\)lib(64)?(/|\\\\)amdgcn(/|\\\\).*]]hip.bc"
|
||||
// ROCMDIR-SAME: "-mlink-builtin-bitcode" "[[DEVICELIB_DIR:[^"]+(/|\\\\)rocm(/|\\\\)amdgcn(/|\\\\).*]]hip.bc"
|
||||
// RESDIR-SAME: "-mlink-builtin-bitcode" "[[DEVICELIB_DIR:[^"]+(/|\\\\)rocm_resource_dir(/|\\\\)lib(64)?(/|\\\\)amdgcn(/|\\\\).*]]ocml.bc"
|
||||
// ROCMDIR-SAME: "-mlink-builtin-bitcode" "[[DEVICELIB_DIR:[^"]+(/|\\\\)rocm(/|\\\\)amdgcn(/|\\\\).*]]ocml.bc"
|
||||
|
||||
// ALL-SAME: "-mlink-builtin-bitcode" "[[DEVICELIB_DIR]]ocml.bc"
|
||||
// ALL-SAME: "-mlink-builtin-bitcode" "[[DEVICELIB_DIR]]ockl.bc"
|
||||
|
||||
// FLUSHD-SAME: "-mlink-builtin-bitcode" "[[DEVICELIB_DIR]]oclc_daz_opt_on.bc"
|
||||
|
||||
@@ -52,12 +52,12 @@
|
||||
// CHECK-NOT: {{"[^"]*lld(\.exe){0,1}".* ".*hip.bc"}}
|
||||
// CHECK: {{"[^"]*clang[^"]*".* "-triple" "x86_64-unknown-linux-gnu".* "-fsanitize=address"}}
|
||||
|
||||
// NORDC: {{"[^"]*clang[^"]*".* "-emit-obj".* "-fcuda-is-device".* "-mlink-builtin-bitcode" ".*hip.bc".* "-mlink-bitcode-file" ".*asanrtl.bc".* "-fsanitize=address".*}} "-o" "[[OUT:[^"]*.o]]"
|
||||
// NORDC: {{"[^"]*clang[^"]*".* "-emit-obj".* "-fcuda-is-device".* .* "-mlink-bitcode-file" ".*asanrtl.bc".* "-fsanitize=address".*}} "-o" "[[OUT:[^"]*.o]]"
|
||||
// NORDC-NOT: {{"[^"]*lld(\.exe){0,1}".*}} "[[OUT]]" {{".*asanrtl.bc" ".*hip.bc"}}
|
||||
// NORDC: {{"[^"]*clang[^"]*".* "-triple" "x86_64-unknown-linux-gnu".* "-fsanitize=address"}}
|
||||
|
||||
// RDC: {{"[^"]*clang[^"]*".* "-triple" "x86_64-unknown-linux-gnu".* "-fsanitize=address"}}
|
||||
// RDC: {{"[^"]*clang[^"]*".* "-emit-llvm-bc".* "-fcuda-is-device".* "-mlink-builtin-bitcode" ".*hip.bc".* "-mlink-bitcode-file" ".*asanrtl.bc".* "-fsanitize=address".*}} "-o" "[[OUT:[^"]*.bc]]"
|
||||
// RDC: {{"[^"]*clang[^"]*".* "-emit-llvm-bc".* "-fcuda-is-device".* "-mlink-bitcode-file" ".*asanrtl.bc".* "-fsanitize=address".*}} "-o" "[[OUT:[^"]*.bc]]"
|
||||
// RDC-NOT: {{"[^"]*lld(\.exe){0,1}".*}} "[[OUT]]" {{".*asanrtl.bc" ".*hip.bc"}}
|
||||
|
||||
// FAIL: error: cannot find ROCm device library for ABI version 5; provide its path via '--rocm-path' or '--rocm-device-lib-path', or pass '-nogpulib' to build without ROCm device library
|
||||
|
||||
Reference in New Issue
Block a user