LLM inference in C/C++
C++ ggml
sycl : fix compile warnings
Georgi Gerganove97545d91698
diff --git a/ggml/include/ggml-sycl.h b/ggml/include/ggml-sycl.hindex 1c18f706a1..1e353ffa31 100644--- a/ggml/include/ggml-sycl.h+++ b/ggml/include/ggml-sycl.h@@ -25,7 +25,7 @@ GGML_BACKEND_API bool ggml_backend_is_sycl(ggml_backend_t backend);GGML_BACKEND_API ggml_backend_buffer_type_t ggml_backend_sycl_buffer_type(int device);// split tensor buffer that splits matrices by rows across multiple devices-GGML_BACKEND_API ggml_backend_buffer_type_t ggml_backend_sycl_split_buffer_type([[maybe_unused]] int main_device, const float * tensor_split);+GGML_BACKEND_API ggml_backend_buffer_type_t ggml_backend_sycl_split_buffer_type(int main_device, const float * tensor_split);// Tensor parallelism (--split-mode tensor): comm_init/free/allreduce_tensor// trio queried by the meta-backend via ggml_backend_reg_get_proc_address.@@ -45,7 +45,7 @@ GGML_BACKEND_API void ggml_backend_sycl_get_gpu_list(int *id_list, int max_len);GGML_BACKEND_API void ggml_backend_sycl_get_device_description(int device,char *description,size_t description_size);-GGML_BACKEND_API int ggml_backend_sycl_get_device_count();+GGML_BACKEND_API int ggml_backend_sycl_get_device_count(void);GGML_BACKEND_API void ggml_backend_sycl_get_device_memory(int device, size_t *free, size_t *total);// SYCL doesn't support registering host memory, keep here for referencediff --git a/ggml/src/ggml-sycl/ggml-sycl.cpp b/ggml/src/ggml-sycl/ggml-sycl.cppindex d99c41e687..e13ec85251 100644--- a/ggml/src/ggml-sycl/ggml-sycl.cpp+++ b/ggml/src/ggml-sycl/ggml-sycl.cpp@@ -1497,9 +1497,11 @@ static ggml_backend_buffer_type_i ggml_backend_sycl_split_buffer_type_interface/* .is_host = */ ggml_backend_sycl_split_buffer_type_is_host,};-ggml_backend_buffer_type_t ggml_backend_sycl_split_buffer_type([[maybe_unused]] int main_device, const float * tensor_split) {+ggml_backend_buffer_type_t ggml_backend_sycl_split_buffer_type(int main_device, const float * tensor_split) {GGML_SYCL_DEBUG("[SYCL] call ggml_backend_sycl_split_buffer_type\n");+ GGML_UNUSED(main_device);+static std::mutex mutex;std::lock_guard<std::mutex> lock(mutex);@@ -6309,7 +6311,7 @@ bool ggml_backend_is_sycl(ggml_backend_t backend) {return backend != NULL && ggml_guid_matches(backend->guid, ggml_backend_sycl_guid());}-int ggml_backend_sycl_get_device_count() {+int ggml_backend_sycl_get_device_count(void) {return ggml_sycl_info().device_count;}