build : use std::make_tuple() for compatibility with older GCC versions (#3488)

This commit is contained in:
Kenvix ⭐ 2023-10-06 01:16:39 +08:00 committed by GitHub
parent acec9eaaa9
commit 45eba9369f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -361,7 +361,7 @@ bool gpt_params_parse(int argc, char ** argv, gpt_params & params) {
invalid_param = true; invalid_param = true;
break; break;
} }
params.lora_adapter.push_back({argv[i], 1.0f}); params.lora_adapter.push_back(std::make_tuple(argv[i], 1.0f));
params.use_mmap = false; params.use_mmap = false;
} else if (arg == "--lora-scaled") { } else if (arg == "--lora-scaled") {
if (++i >= argc) { if (++i >= argc) {
@ -373,7 +373,7 @@ bool gpt_params_parse(int argc, char ** argv, gpt_params & params) {
invalid_param = true; invalid_param = true;
break; break;
} }
params.lora_adapter.push_back({lora_adapter, std::stof(argv[i])}); params.lora_adapter.push_back(std::make_tuple(lora_adapter, std::stof(argv[i])));
params.use_mmap = false; params.use_mmap = false;
} else if (arg == "--lora-base") { } else if (arg == "--lora-base") {
if (++i >= argc) { if (++i >= argc) {

View File

@ -1015,7 +1015,7 @@ static void server_params_parse(int argc, char **argv, server_params &sparams,
invalid_param = true; invalid_param = true;
break; break;
} }
params.lora_adapter.push_back({argv[i], 1.0f}); params.lora_adapter.push_back(std::make_tuple(argv[i], 1.0f));
params.use_mmap = false; params.use_mmap = false;
} }
else if (arg == "--lora-scaled") else if (arg == "--lora-scaled")
@ -1031,7 +1031,7 @@ static void server_params_parse(int argc, char **argv, server_params &sparams,
invalid_param = true; invalid_param = true;
break; break;
} }
params.lora_adapter.push_back({lora_adapter, std::stof(argv[i])}); params.lora_adapter.push_back(std::make_tuple(lora_adapter, std::stof(argv[i])));
params.use_mmap = false; params.use_mmap = false;
} }
else if (arg == "--lora-base") else if (arg == "--lora-base")