Skip to content

Commit 5acc47a

Browse files
committed
load libmlir_cuda_runtime
1 parent d904c9f commit 5acc47a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/jit/mlir.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -858,11 +858,14 @@ JIT::JIT(const std::string &libidtr)
858858
if (!gpuxlibstr.empty()) {
859859
_gpulib = std::string(gpuxlibstr);
860860
} else {
861-
auto imexRoot = get_text_env("IMEXROOT");
862-
imexRoot = !imexRoot.empty() ? imexRoot : std::string(CMAKE_IMEX_ROOT);
863-
_gpulib = imexRoot + "/lib/liblevel-zero-runtime.so";
861+
// auto imexRoot = get_text_env("IMEXROOT");
862+
// imexRoot = !imexRoot.empty() ? imexRoot : std::string(CMAKE_IMEX_ROOT);
863+
// _gpulib = imexRoot + "/lib/liblevel-zero-runtime.so";
864+
// _gpulib = imexRoot + "/lib/liblevel-zero-runtime.so";
865+
// for nv gpu
866+
_gpulib = mlirRoot + "/lib/libmlir_cuda_runtime.so";
864867
if (!std::ifstream(_gpulib)) {
865-
throw std::runtime_error("Cannot find liblevel-zero-runtime.so");
868+
throw std::runtime_error("Cannot find lib: " + _gpulib);
866869
}
867870
}
868871
_sharedLibPaths = {_crunnerlib.c_str(), _runnerlib.c_str(),

0 commit comments

Comments
 (0)