Skip to content

Commit a979201

Browse files
committed
fix for windows building
1 parent 0ed117a commit a979201

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

ggml/include/ggml-sycl.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ GGML_BACKEND_API void ggml_backend_sycl_get_device_description(int device,
3838
GGML_BACKEND_API int ggml_backend_sycl_get_device_count();
3939
GGML_BACKEND_API void ggml_backend_sycl_get_device_memory(int device, size_t *free, size_t *total);
4040

41-
GGML_API int ggml_backend_sycl_get_device_index(int device_id);
42-
GGML_API int ggml_backend_sycl_get_device_id(int index);
43-
GGML_API void ggml_sycl_set_single_device(int main_gpu_id);
41+
GGML_BACKEND_API int ggml_backend_sycl_get_device_index(int device_id);
42+
GGML_BACKEND_API int ggml_backend_sycl_get_device_id(int index);
43+
GGML_BACKEND_API void ggml_sycl_set_single_device(int main_gpu_id);
4444

45-
GGML_API void ggml_backend_sycl_set_single_device_mode(int main_gpu_id);
45+
GGML_BACKEND_API void ggml_backend_sycl_set_single_device_mode(int main_gpu_id);
4646

4747
// SYCL doesn't support registering host memory, keep here for reference
4848
// GGML_BACKEND_API bool ggml_backend_sycl_register_host_buffer(void * buffer, size_t size);

ggml/src/ggml-sycl/ggml-sycl.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ int ggml_backend_sycl_get_device(ggml_backend_t backend);
5151
static bool ggml_backend_buffer_is_sycl_split(ggml_backend_buffer_t buffer);
5252
static bool ggml_backend_buffer_is_sycl(ggml_backend_buffer_t buffer);
5353

54-
GGML_API void ggml_backend_sycl_get_gpu_list(int *id_list, int max_len) try {
54+
GGML_BACKEND_API void ggml_backend_sycl_get_gpu_list(int *id_list, int max_len) try {
5555
GGML_SYCL_DEBUG("[SYCL] call ggml_backend_sycl_get_gpu_list\n");
5656
for(int i=0;i<max_len;i++) id_list[i] = -1;
5757

@@ -3892,12 +3892,12 @@ bool ggml_sycl_compute_forward(ggml_backend_sycl_context & ctx, struct ggml_tens
38923892
return true;
38933893
}
38943894

3895-
GGML_API int ggml_backend_sycl_get_device_id(int index) {
3895+
GGML_BACKEND_API int ggml_backend_sycl_get_device_id(int index) {
38963896
GGML_SYCL_DEBUG("[SYCL] call ggml_backend_sycl_get_device_id\n");
38973897
return ggml_sycl_info().get_device_id(index);
38983898
}
38993899

3900-
GGML_API void ggml_sycl_get_gpu_list(int *id_list, int max_len) try {
3900+
GGML_BACKEND_API void ggml_sycl_get_gpu_list(int *id_list, int max_len) try {
39013901
GGML_SYCL_DEBUG("[SYCL] call ggml_sycl_get_gpu_list\n");
39023902
for(int i=0;i<max_len;i++) id_list[i] = -1;
39033903

@@ -3928,7 +3928,7 @@ catch (sycl::exception const &exc) {
39283928
std::exit(1);
39293929
}
39303930

3931-
GGML_API void ggml_backend_sycl_get_device_description(int device_id, char *description,
3931+
GGML_BACKEND_API void ggml_backend_sycl_get_device_description(int device_id, char *description,
39323932
size_t description_size) try {
39333933
GGML_SYCL_DEBUG("[SYCL] call ggml_backend_sycl_get_device_description\n");
39343934
dpct::device_info prop;
@@ -4593,7 +4593,7 @@ ggml_backend_t ggml_backend_sycl_init(int device_id) {
45934593
return sycl_backend;
45944594
}
45954595

4596-
GGML_API void ggml_backend_sycl_set_single_device_mode(int main_gpu_id) {
4596+
GGML_BACKEND_API void ggml_backend_sycl_set_single_device_mode(int main_gpu_id) {
45974597

45984598
GGML_SYCL_DEBUG("[SYCL] call ggml_backend_sycl_set_single_device_mode\n");
45994599
fprintf(stderr, "ggml_backend_sycl_set_single_device: use single device: [%d]\n", main_gpu_id);

0 commit comments

Comments
 (0)