Skip to content

Commit

Permalink
fix: cuda dll search path for child process
Browse files Browse the repository at this point in the history
  • Loading branch information
sangjanai committed Jan 15, 2025
1 parent 31e308d commit e83daea
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/llama_engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1429,6 +1429,7 @@ bool LlamaEngine::SpawnLlamaServer(const Json::Value& json_params) {
std::string wcmds =
load_opt_.engine_path.string() + "/" + exe_w + " " + params;
LOG_INFO << "wcmds: " << wcmds;
LOG_INFO << "deps_path: " << load_opt_.deps_path.string();
std::vector<wchar_t> mutable_cmds(wcmds.begin(), wcmds.end());
mutable_cmds.push_back(L'\0');
// Create child process
Expand All @@ -1442,9 +1443,10 @@ bool LlamaEngine::SpawnLlamaServer(const Json::Value& json_params) {
FALSE, // Set handle inheritance
0, // No creation flags
NULL, // Use parent's environment block
NULL, // Use parent's starting directory
&si, // Pointer to STARTUPINFO structure
&s.pi)) // Pointer to PROCESS_INFORMATION structure
const_cast<char*>(load_opt_.deps_path.string()
.c_str()), // Use parent's starting directory
&si, // Pointer to STARTUPINFO structure
&s.pi)) // Pointer to PROCESS_INFORMATION structure
{
std::cout << "Could not start server: " << GetLastError() << std::endl;
return false;
Expand Down

0 comments on commit e83daea

Please sign in to comment.