Skip to content

Commit c4e5eb8

Browse files
committed
load libmlir_cuda_runtime
1 parent b11029b commit c4e5eb8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Diff for: src/jit/mlir.cpp

+7-4
Original file line numberDiff line numberDiff line change
@@ -866,11 +866,14 @@ JIT::JIT(const std::string &libidtr)
866866
if (!gpuxlibstr.empty()) {
867867
_gpulib = std::string(gpuxlibstr);
868868
} else {
869-
auto imexRoot = get_text_env("IMEXROOT");
870-
imexRoot = !imexRoot.empty() ? imexRoot : std::string(CMAKE_IMEX_ROOT);
871-
_gpulib = imexRoot + "/lib/liblevel-zero-runtime.so";
869+
// auto imexRoot = get_text_env("IMEXROOT");
870+
// imexRoot = !imexRoot.empty() ? imexRoot : std::string(CMAKE_IMEX_ROOT);
871+
// _gpulib = imexRoot + "/lib/liblevel-zero-runtime.so";
872+
// _gpulib = imexRoot + "/lib/liblevel-zero-runtime.so";
873+
// for nv gpu
874+
_gpulib = mlirRoot + "/lib/libmlir_cuda_runtime.so";
872875
if (!std::ifstream(_gpulib)) {
873-
throw std::runtime_error("Cannot find liblevel-zero-runtime.so");
876+
throw std::runtime_error("Cannot find lib: " + _gpulib);
874877
}
875878
}
876879
_sharedLibPaths = {_crunnerlib.c_str(), _runnerlib.c_str(),

0 commit comments

Comments
 (0)