server : remove LLAMA_MAX_DEVICES

ggml-ci
This commit is contained in:
Georgi Gerganov 2024-01-31 16:15:08 +02:00
parent ffa4293245
commit 3180a6468f
No known key found for this signature in database
GPG key ID: BF970631944C16B7

View file

@ -2115,9 +2115,9 @@ static void server_params_parse(int argc, char **argv, server_params &sparams,
const std::regex regex{R"([,/]+)"}; const std::regex regex{R"([,/]+)"};
std::sregex_token_iterator it{arg_next.begin(), arg_next.end(), regex, -1}; std::sregex_token_iterator it{arg_next.begin(), arg_next.end(), regex, -1};
std::vector<std::string> split_arg{it, {}}; std::vector<std::string> split_arg{it, {}};
GGML_ASSERT(split_arg.size() <= LLAMA_MAX_DEVICES); GGML_ASSERT(split_arg.size() <= llama_max_devices());
for (size_t i_device = 0; i_device < LLAMA_MAX_DEVICES; ++i_device) for (size_t i_device = 0; i_device < llama_max_devices(); ++i_device)
{ {
if (i_device < split_arg.size()) if (i_device < split_arg.size())
{ {