Skip to content

Commit

Permalink
[SYCL] Update rpc-server.cpp to include SYCL backend (ggerganov#7682)
Browse files Browse the repository at this point in the history
* Update rpc-server.cpp to include SYCL backend

Draft PR to address inclusion of SYCL backend for RPC server

* Update rpc-server.cpp
  • Loading branch information
nickp27 authored Jun 2, 2024
1 parent e141ce6 commit 9422c5e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examples/rpc/rpc-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -79,6 +83,12 @@ static ggml_backend_t create_backend() {
if (!backend) {
fprintf(stderr, "%s: ggml_backend_metal_init() failed\n", __func__);
}
#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
Expand Down

0 comments on commit 9422c5e

Please sign in to comment.