Skip to content

Commit e65bbf6

Browse files
authored
llama-bench : fix RPC indication (#7936)
Show "<backend_name>+RPC" when RPC offloading is used
1 parent 6fcd133 commit e65bbf6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/llama-bench/llama-bench.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,6 @@ struct test {
714714
static const bool kompute;
715715
static const bool metal;
716716
static const bool sycl;
717-
static const bool rpc;
718717
static const bool gpu_blas;
719718
static const bool blas;
720719
static const std::string cpu_info;
@@ -726,6 +725,7 @@ struct test {
726725
int n_batch;
727726
int n_ubatch;
728727
int n_threads;
728+
bool has_rpc;
729729
ggml_type type_k;
730730
ggml_type type_v;
731731
int n_gpu_layers;
@@ -751,6 +751,7 @@ struct test {
751751
n_batch = inst.n_batch;
752752
n_ubatch = inst.n_ubatch;
753753
n_threads = inst.n_threads;
754+
has_rpc = !inst.rpc_servers.empty();
754755
type_k = inst.type_k;
755756
type_v = inst.type_v;
756757
n_gpu_layers = inst.n_gpu_layers;
@@ -810,9 +811,6 @@ struct test {
810811
if (sycl) {
811812
return GGML_SYCL_NAME;
812813
}
813-
if (rpc) {
814-
return "RPC";
815-
}
816814
if (gpu_blas) {
817815
return "GPU BLAS";
818816
}
@@ -882,7 +880,7 @@ struct test {
882880
std::vector<std::string> values = {
883881
build_commit, std::to_string(build_number),
884882
std::to_string(cuda), std::to_string(vulkan), std::to_string(vulkan),
885-
std::to_string(metal), std::to_string(sycl), std::to_string(rpc), std::to_string(gpu_blas), std::to_string(blas),
883+
std::to_string(metal), std::to_string(sycl), std::to_string(has_rpc), std::to_string(gpu_blas), std::to_string(blas),
886884
cpu_info, gpu_info,
887885
model_filename, model_type, std::to_string(model_size), std::to_string(model_n_params),
888886
std::to_string(n_batch), std::to_string(n_ubatch),
@@ -916,7 +914,6 @@ const bool test::metal = !!ggml_cpu_has_metal();
916914
const bool test::gpu_blas = !!ggml_cpu_has_gpublas();
917915
const bool test::blas = !!ggml_cpu_has_blas();
918916
const bool test::sycl = !!ggml_cpu_has_sycl();
919-
const bool test::rpc = !!ggml_cpu_has_rpc();
920917
const std::string test::cpu_info = get_cpu_info();
921918
const std::string test::gpu_info = get_gpu_info();
922919

@@ -1182,6 +1179,9 @@ struct markdown_printer : public printer {
11821179
value = buf;
11831180
} else if (field == "backend") {
11841181
value = test::get_backend();
1182+
if (t.has_rpc) {
1183+
value += "+RPC";
1184+
}
11851185
} else if (field == "test") {
11861186
if (t.n_prompt > 0 && t.n_gen == 0) {
11871187
snprintf(buf, sizeof(buf), "pp%d", t.n_prompt);

0 commit comments

Comments
 (0)