@@ -713,6 +713,7 @@ cpp::result<void, std::string> EngineService::LoadEngine(
713713 try {
714714 auto cuda_path = file_manager_utils::GetCudaToolkitPath (ne);
715715
716+ #if defined(_WIN32) || defined(_WIN64)
716717 // register deps
717718 std::vector<std::filesystem::path> paths{};
718719 paths.push_back (std::move (cuda_path));
@@ -730,24 +731,22 @@ cpp::result<void, std::string> EngineService::LoadEngine(
730731 } else {
731732 CTL_DBG (" Registered lib paths for: " << ne);
732733 }
734+ #endif
733735
734736 auto dylib =
735737 std::make_unique<cortex_cpp::dylib>(engine_dir_path.string (), " engine" );
736738
737739 auto config = file_manager_utils::GetCortexConfig ();
738-
739- auto log_path =
740- std::filesystem::path (config.logFolderPath ) /
741- std::filesystem::path (
742- config.logLlamaCppPath ); // for now seems like we use same log path
740+ auto log_path = std::filesystem::path (config.logFolderPath ) /
741+ std::filesystem::path (config.logLlamaCppPath );
743742
744743 // init
745744 auto func = dylib->get_function <EngineI*()>(" get_engine" );
746745 auto engine_obj = func ();
747746 auto load_opts = EngineI::EngineLoadOption{
748747 .engine_path = engine_dir_path,
749- .cuda_path = file_manager_utils::GetCudaToolkitPath (ne) ,
750- .custom_engine_path = custom_engine_path,
748+ .deps_path = cuda_path ,
749+ .is_custom_engine_path = custom_engine_path,
751750 .log_path = log_path,
752751 .max_log_lines = config.maxLogLines ,
753752 .log_level = logging_utils_helper::global_log_level,
@@ -773,7 +772,7 @@ void EngineService::RegisterEngineLibPath() {
773772 try {
774773 auto engine_dir_path_res = GetEngineDirPath (engine);
775774 if (engine_dir_path_res.has_error ()) {
776- CTL_ERR (
775+ CTL_WRN (
777776 " Could not get engine dir path: " << engine_dir_path_res.error ());
778777 continue ;
779778 }
@@ -794,8 +793,9 @@ void EngineService::RegisterEngineLibPath() {
794793
795794 auto reg_result = dylib_path_manager_->RegisterPath (ne, paths);
796795 if (reg_result.has_error ()) {
796+ CTL_WRN (" Failed register lib path for " << engine);
797797 } else {
798- CTL_DBG (" Register lib path for: " << engine);
798+ CTL_DBG (" Registered lib path for " << engine);
799799 }
800800
801801 } catch (const std::exception& e) {
@@ -863,9 +863,7 @@ cpp::result<void, std::string> EngineService::UnloadEngine(
863863 CTL_DBG (" Unregistered lib paths for: " << ne);
864864 }
865865 auto * e = std::get<EngineI*>(engines_[ne].engine );
866- auto unload_opts = EngineI::EngineUnloadOption{
867- .unload_dll = true ,
868- };
866+ auto unload_opts = EngineI::EngineUnloadOption{};
869867 e->Unload (unload_opts);
870868 delete e;
871869 engines_.erase (ne);
0 commit comments