Skip to content

Commit e9eac9a

Browse files
committed
load libmlir_cuda_runtime
1 parent edd0c49 commit e9eac9a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/jit/mlir.cpp

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

0 commit comments

Comments
 (0)