Update rpc-server.cpp to include SYCL backend

Draft PR to address inclusion of SYCL backend for RPC server
This commit is contained in:
nickp27 2024-06-01 20:57:48 +10:00 committed by GitHub
parent 9b596417af
commit 715fb750df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,6 +6,10 @@
#include "ggml-metal.h"
#endif
#ifdef GGML_USE_SYCL
#include "ggml-sycl.h"
#endif
#include "ggml-rpc.h"
#ifdef _WIN32
# include <windows.h>
@ -81,6 +85,14 @@ static ggml_backend_t create_backend() {
}
#endif
#elif GGML_USE_SYCL
fprintf(stderr, "%s: using SYCL backend\n", __func__);
backend = ggml_backend_sycl_init(0); // init device 0
if (!backend) {
fprintf(stderr, "%s: ggml_backend_sycl_init() failed\n", __func__);
}
#endif
// if there aren't GPU Backends fallback to CPU backend
if (!backend) {
fprintf(stderr, "%s: using CPU backend\n", __func__);