Skip to content

Commit 2407507

Browse files
committed
load libmlir_cuda_runtime
1 parent f3fb0ee commit 2407507

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
@@ -855,11 +855,14 @@ JIT::JIT(const std::string &libidtr)
855855
if (!gpuxlibstr.empty()) {
856856
_gpulib = std::string(gpuxlibstr);
857857
} else {
858-
auto imexRoot = get_text_env("IMEXROOT");
859-
imexRoot = !imexRoot.empty() ? imexRoot : std::string(CMAKE_IMEX_ROOT);
860-
_gpulib = imexRoot + "/lib/liblevel-zero-runtime.so";
858+
// auto imexRoot = get_text_env("IMEXROOT");
859+
// imexRoot = !imexRoot.empty() ? imexRoot : std::string(CMAKE_IMEX_ROOT);
860+
// _gpulib = imexRoot + "/lib/liblevel-zero-runtime.so";
861+
// _gpulib = imexRoot + "/lib/liblevel-zero-runtime.so";
862+
// for nv gpu
863+
_gpulib = mlirRoot + "/lib/libmlir_cuda_runtime.so";
861864
if (!std::ifstream(_gpulib)) {
862-
throw std::runtime_error("Cannot find liblevel-zero-runtime.so");
865+
throw std::runtime_error("Cannot find lib: " + _gpulib);
863866
}
864867
}
865868
_sharedLibPaths = {_crunnerlib.c_str(), _runnerlib.c_str(),

0 commit comments

Comments
 (0)