Skip to content

Commit 554ccf5

Browse files
use malloc to support both iGPU and dGPU in same time
1 parent 37c35f0 commit 554ccf5

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,12 +1158,11 @@ static const char * ggml_backend_sycl_host_buffer_type_name(ggml_backend_buffer_
11581158
}
11591159

11601160
static void ggml_backend_sycl_host_buffer_free_buffer(ggml_backend_buffer_t buffer) {
1161-
ggml_sycl_host_free(buffer->context);
1161+
free(buffer->context);
11621162
}
11631163

11641164
static ggml_backend_buffer_t ggml_backend_sycl_host_buffer_type_alloc_buffer(ggml_backend_buffer_type_t buft, size_t size) {
1165-
void * ptr = ggml_sycl_host_malloc(size);
1166-
1165+
void * ptr = aligned_alloc(TENSOR_ALIGNMENT, size);
11671166
if (ptr == nullptr) {
11681167
// fallback to cpu buffer
11691168
return ggml_backend_buft_alloc_buffer(ggml_backend_cpu_buffer_type(), size);

0 commit comments

Comments
 (0)