summaryrefslogtreecommitdiff
path: root/examples/llama-bench/llama-bench.cpp
diff options
context:
space:
mode:
authorNeo Zhang Jianyu <jianyu.zhang@intel.com>2024-03-02 19:49:30 +0800
committerGitHub <noreply@github.com>2024-03-02 19:49:30 +0800
commit715641391dda1ff9762dc5d99d9a30acce99f2c6 (patch)
treee57b359034b61f8d3ea4de372c2c3c0ec885c943 /examples/llama-bench/llama-bench.cpp
parent9bf297a02bfbd474e51912409a470dd797e2fe13 (diff)
Support multiple GPUs (split mode) on SYCL backend (#5806)
* suport multiple cards: split-mode - layer|row * rm warning * rebase with master, support tow new OPs, close feature for -sm=row, fix for unit test * update news * fix merge error * update according to review comments
Diffstat (limited to 'examples/llama-bench/llama-bench.cpp')
-rw-r--r--examples/llama-bench/llama-bench.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/examples/llama-bench/llama-bench.cpp b/examples/llama-bench/llama-bench.cpp
index c2155b2a..aa79d002 100644
--- a/examples/llama-bench/llama-bench.cpp
+++ b/examples/llama-bench/llama-bench.cpp
@@ -123,20 +123,15 @@ static std::string get_gpu_info() {
}
#endif
#ifdef GGML_USE_SYCL
- int device_list[GGML_SYCL_MAX_DEVICES];
- ggml_sycl_get_gpu_list(device_list, GGML_SYCL_MAX_DEVICES);
-
- for (int i = 0; i < GGML_SYCL_MAX_DEVICES; i++) {
- if (device_list[i] >0 ){
- char buf[128];
- ggml_sycl_get_device_description(i, buf, sizeof(buf));
- id += buf;
+ int count = ggml_backend_sycl_get_device_count();
+ for (int i = 0; i < count; i++) {
+ char buf[128];
+ ggml_sycl_get_device_description(i, buf, sizeof(buf));
+ id += buf;
+ if (i < count - 1) {
id += "/";
}
}
- if (id.length() >2 ) {
- id.pop_back();
- }
#endif
// TODO: other backends
return id;