[clang] [clang-repl] Load the HIP runtime from the detected ROCm installation (PR #246462)
Vassil Vassilev via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 3 02:55:30 PST 2026
================
@@ -360,12 +360,12 @@ int main(int argc, const char **argv) {
std::move(CI), std::move(DeviceCI), OffloadKind));
const char *RuntimeLib = UseHip ? "libamdhip64.so" : "libcudart.so";
- if (DevicePath.empty()) {
- ExitOnErr(Interp->LoadDynamicLibrary(RuntimeLib));
- } else {
- std::string RuntimeLibPath = DevicePath + "/lib/" + RuntimeLib;
- ExitOnErr(Interp->LoadDynamicLibrary(RuntimeLibPath.c_str()));
- }
+ std::string RuntimeLibPath = RuntimeLib;
+ if (UseHip && !CB.getHIPRuntimePath().empty())
+ RuntimeLibPath = CB.getHIPRuntimePath().str();
----------------
vgvassilev wrote:
Can't we get that through the `DriverCompilationCallback` infrastructure instead of adding members to Interpreter.h?
https://github.com/llvm/llvm-project/pull/246462
More information about the cfe-commits
mailing list