mirror of
https://github.com/ikawrakow/ik_llama.cpp.git
synced 2026-05-01 03:41:53 +00:00
Fix build with RPC not enabled (#1025)
Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
This commit is contained in:
@@ -272,6 +272,7 @@ static std::string parse_device_list(const std::string& value) {
|
|||||||
|
|
||||||
static std::string add_rpc_devices(std::string& servers) {
|
static std::string add_rpc_devices(std::string& servers) {
|
||||||
std::string rpc_devices;
|
std::string rpc_devices;
|
||||||
|
#ifdef GGML_USE_RPC
|
||||||
std::vector<std::string> rpc_servers = string_split(servers, ",");
|
std::vector<std::string> rpc_servers = string_split(servers, ",");
|
||||||
if (rpc_servers.empty()) {
|
if (rpc_servers.empty()) {
|
||||||
throw std::invalid_argument("no RPC servers specified");
|
throw std::invalid_argument("no RPC servers specified");
|
||||||
@@ -290,6 +291,7 @@ static std::string add_rpc_devices(std::string& servers) {
|
|||||||
if (!rpc_devices.empty()) {
|
if (!rpc_devices.empty()) {
|
||||||
rpc_devices = rpc_devices.substr(0, rpc_devices.size() - 1); // remove trailing comma
|
rpc_devices = rpc_devices.substr(0, rpc_devices.size() - 1); // remove trailing comma
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return rpc_devices;
|
return rpc_devices;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user