From 8dd1b60ac6162120cd668690988123b0fbb5c2a6 Mon Sep 17 00:00:00 2001 From: jianyuzh Date: Wed, 24 Jan 2024 20:34:44 +0800 Subject: [PATCH] add prefix in func name --- examples/sycl/ls-sycl-device.cpp | 2 +- ggml-sycl.cpp | 5 +++-- ggml-sycl.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/sycl/ls-sycl-device.cpp b/examples/sycl/ls-sycl-device.cpp index 862331431..b1c65a845 100644 --- a/examples/sycl/ls-sycl-device.cpp +++ b/examples/sycl/ls-sycl-device.cpp @@ -1,6 +1,6 @@ #include "ggml-sycl.h" int main(int argc, char ** argv) { - print_sycl_devices(); + ggml_backend_sycl_print_sycl_devices(); return 0; } \ No newline at end of file diff --git a/ggml-sycl.cpp b/ggml-sycl.cpp index f24065117..51ceeade7 100644 --- a/ggml-sycl.cpp +++ b/ggml-sycl.cpp @@ -11238,7 +11238,8 @@ static bool g_sycl_loaded = false; bool ggml_sycl_loaded(void) { return g_sycl_loaded; } -void print_sycl_devices(){ + +void ggml_backend_sycl_print_sycl_devices(){ int device_count = dpct::dev_mgr::instance().device_count(); fprintf(stderr, "found %d SYCL devices:\n", device_count); for (int id = 0; id < device_count; ++id) { @@ -11311,7 +11312,7 @@ void ggml_init_sycl() try { #else fprintf(stderr, "%s: SYCL_USE_XMX: no\n", __func__); #endif - print_sycl_devices(); + ggml_backend_sycl_print_sycl_devices(); for (int id = 0; id < GGML_SYCL_MAX_DEVICES; ++id) { g_sycl_device_id2index[id].index = -1; g_device_caps[id].vmm = 0; diff --git a/ggml-sycl.h b/ggml-sycl.h index 02bfa7207..b049718ad 100644 --- a/ggml-sycl.h +++ b/ggml-sycl.h @@ -15,7 +15,7 @@ GGML_API bool ggml_sycl_compute_forward(struct ggml_compute_params * params, s GGML_API ggml_backend_t ggml_backend_sycl_init(int device); GGML_API ggml_backend_buffer_type_t ggml_backend_sycl_buffer_type(int device); GGML_API ggml_backend_buffer_type_t ggml_backend_sycl_host_buffer_type(void); -GGML_API void print_sycl_devices(); +GGML_API void ggml_backend_sycl_print_sycl_devices(); #ifdef __cplusplus }