add prefix in func name

This commit is contained in:
jianyuzh 2024-01-24 20:34:44 +08:00
parent d07a88d448
commit 8dd1b60ac6
3 changed files with 5 additions and 4 deletions

View file

@ -1,6 +1,6 @@
#include "ggml-sycl.h" #include "ggml-sycl.h"
int main(int argc, char ** argv) { int main(int argc, char ** argv) {
print_sycl_devices(); ggml_backend_sycl_print_sycl_devices();
return 0; return 0;
} }

View file

@ -11238,7 +11238,8 @@ static bool g_sycl_loaded = false;
bool ggml_sycl_loaded(void) { bool ggml_sycl_loaded(void) {
return g_sycl_loaded; return g_sycl_loaded;
} }
void print_sycl_devices(){
void ggml_backend_sycl_print_sycl_devices(){
int device_count = dpct::dev_mgr::instance().device_count(); int device_count = dpct::dev_mgr::instance().device_count();
fprintf(stderr, "found %d SYCL devices:\n", device_count); fprintf(stderr, "found %d SYCL devices:\n", device_count);
for (int id = 0; id < device_count; ++id) { for (int id = 0; id < device_count; ++id) {
@ -11311,7 +11312,7 @@ void ggml_init_sycl() try {
#else #else
fprintf(stderr, "%s: SYCL_USE_XMX: no\n", __func__); fprintf(stderr, "%s: SYCL_USE_XMX: no\n", __func__);
#endif #endif
print_sycl_devices(); ggml_backend_sycl_print_sycl_devices();
for (int id = 0; id < GGML_SYCL_MAX_DEVICES; ++id) { for (int id = 0; id < GGML_SYCL_MAX_DEVICES; ++id) {
g_sycl_device_id2index[id].index = -1; g_sycl_device_id2index[id].index = -1;
g_device_caps[id].vmm = 0; g_device_caps[id].vmm = 0;

View file

@ -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_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_buffer_type(int device);
GGML_API ggml_backend_buffer_type_t ggml_backend_sycl_host_buffer_type(void); 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 #ifdef __cplusplus
} }