From a97920143e2dc05e9919dabdb3de091dddec0d02 Mon Sep 17 00:00:00 2001 From: arthw <14088817+arthw@users.noreply.github.com> Date: Tue, 19 Nov 2024 08:20:52 +0800 Subject: [PATCH] fix for windows building --- ggml/include/ggml-sycl.h | 8 ++++---- ggml/src/ggml-sycl/ggml-sycl.cpp | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ggml/include/ggml-sycl.h b/ggml/include/ggml-sycl.h index f6322243a8396..499b874dd8e11 100644 --- a/ggml/include/ggml-sycl.h +++ b/ggml/include/ggml-sycl.h @@ -38,11 +38,11 @@ GGML_BACKEND_API void ggml_backend_sycl_get_device_description(int device, GGML_BACKEND_API int ggml_backend_sycl_get_device_count(); GGML_BACKEND_API void ggml_backend_sycl_get_device_memory(int device, size_t *free, size_t *total); -GGML_API int ggml_backend_sycl_get_device_index(int device_id); -GGML_API int ggml_backend_sycl_get_device_id(int index); -GGML_API void ggml_sycl_set_single_device(int main_gpu_id); +GGML_BACKEND_API int ggml_backend_sycl_get_device_index(int device_id); +GGML_BACKEND_API int ggml_backend_sycl_get_device_id(int index); +GGML_BACKEND_API void ggml_sycl_set_single_device(int main_gpu_id); -GGML_API void ggml_backend_sycl_set_single_device_mode(int main_gpu_id); +GGML_BACKEND_API void ggml_backend_sycl_set_single_device_mode(int main_gpu_id); // SYCL doesn't support registering host memory, keep here for reference // GGML_BACKEND_API bool ggml_backend_sycl_register_host_buffer(void * buffer, size_t size); diff --git a/ggml/src/ggml-sycl/ggml-sycl.cpp b/ggml/src/ggml-sycl/ggml-sycl.cpp index c58f04cbdc73e..6169dac32bcca 100644 --- a/ggml/src/ggml-sycl/ggml-sycl.cpp +++ b/ggml/src/ggml-sycl/ggml-sycl.cpp @@ -51,7 +51,7 @@ int ggml_backend_sycl_get_device(ggml_backend_t backend); static bool ggml_backend_buffer_is_sycl_split(ggml_backend_buffer_t buffer); static bool ggml_backend_buffer_is_sycl(ggml_backend_buffer_t buffer); -GGML_API void ggml_backend_sycl_get_gpu_list(int *id_list, int max_len) try { +GGML_BACKEND_API void ggml_backend_sycl_get_gpu_list(int *id_list, int max_len) try { GGML_SYCL_DEBUG("[SYCL] call ggml_backend_sycl_get_gpu_list\n"); for(int i=0;i