@@ -29,7 +29,7 @@ bool EngineInitCmd::Exec() const {
2929 << system_info.arch ;
3030 return false ;
3131 }
32- LOG_INFO << " OS: " << system_info.os << " , Arch: " << system_info.arch ;
32+ CTLOG_INFO ( " OS: " << system_info.os << " , Arch: " << system_info.arch ) ;
3333
3434 // check if engine is supported
3535 if (std::find (supportedEngines_.begin (), supportedEngines_.end (),
@@ -43,7 +43,7 @@ bool EngineInitCmd::Exec() const {
4343 std::ostringstream engineReleasePath;
4444 engineReleasePath << " /repos/janhq/" << engineName_ << " /releases/"
4545 << version;
46- LOG_INFO << " Engine release path: " << gitHubHost << engineReleasePath.str ();
46+ CTLOG_INFO ( " Engine release path: " << gitHubHost << engineReleasePath.str () );
4747 using namespace nlohmann ;
4848
4949 httplib::Client cli (gitHubHost);
@@ -61,8 +61,8 @@ bool EngineInitCmd::Exec() const {
6161 }
6262
6363 auto cuda_version = system_info_utils::GetCudaVersion ();
64- LOG_INFO << " engineName_: " << engineName_;
65- LOG_INFO << " CUDA version: " << cuda_version;
64+ CTLOG_INFO ( " engineName_: " << engineName_) ;
65+ CTLOG_INFO ( " CUDA version: " << cuda_version) ;
6666 std::string matched_variant = " " ;
6767 if (engineName_ == " cortex.tensorrt-llm" ) {
6868 matched_variant = engine_matcher_utils::ValidateTensorrtLlm (
@@ -76,7 +76,7 @@ bool EngineInitCmd::Exec() const {
7676 variants, system_info.os , system_info.arch , suitable_avx,
7777 cuda_version);
7878 }
79- LOG_INFO << " Matched variant: " << matched_variant;
79+ CTLOG_INFO ( " Matched variant: " << matched_variant) ;
8080 if (matched_variant.empty ()) {
8181 LOG_ERROR << " No variant found for " << os_arch;
8282 return false ;
@@ -91,7 +91,7 @@ bool EngineInitCmd::Exec() const {
9191 std::string path = full_url.substr (host.length ());
9292
9393 auto fileName = asset[" name" ].get <std::string>();
94- LOG_INFO << " URL: " << full_url;
94+ CTLOG_INFO ( " URL: " << full_url) ;
9595
9696 auto downloadTask = DownloadTask{.id = engineName_,
9797 .type = DownloadType::Engine,
@@ -110,8 +110,8 @@ bool EngineInitCmd::Exec() const {
110110 bool unused) {
111111 // try to unzip the downloaded file
112112 std::filesystem::path downloadedEnginePath{absolute_path};
113- LOG_INFO << " Downloaded engine path: "
114- << downloadedEnginePath.string ();
113+ CTLOG_INFO ( " Downloaded engine path: "
114+ << downloadedEnginePath.string ()) ;
115115
116116 archive_utils::ExtractArchive (
117117 downloadedEnginePath.string (),
@@ -123,9 +123,9 @@ bool EngineInitCmd::Exec() const {
123123 try {
124124 std::filesystem::remove (absolute_path);
125125 } catch (const std::exception& e) {
126- LOG_ERROR << " Could not delete file: " << e.what ();
126+ CTLOG_WARN ( " Could not delete file: " << e.what () );
127127 }
128- LOG_INFO << " Finished!" ;
128+ CTLOG_INFO ( " Finished!" ) ;
129129 });
130130 if (system_info.os == " mac" || engineName_ == " cortex.onnx" ) {
131131 return false ;
@@ -135,12 +135,13 @@ bool EngineInitCmd::Exec() const {
135135 const std::string cuda_toolkit_file_name = " cuda.tar.gz" ;
136136 const std::string download_id = " cuda" ;
137137
138- auto gpu_driver_version = system_info_utils::GetDriverVersion ();
138+ auto gpu_driver_version = system_info_utils::GetDriverVersion ();
139+ if (gpu_driver_version.empty ()) return true ;
139140
140141 auto cuda_runtime_version =
141142 cuda_toolkit_utils::GetCompatibleCudaToolkitVersion (
142143 gpu_driver_version, system_info.os , engineName_);
143-
144+ LOG_INFO << " abc " ;
144145 std::ostringstream cuda_toolkit_path;
145146 cuda_toolkit_path << " dist/cuda-dependencies/" << 11.7 << " /"
146147 << system_info.os << " /"
0 commit comments