@@ -347,7 +347,7 @@ static enum ggml_status
347
347
ggml_backend_sycl_buffer_init_tensor (ggml_backend_buffer_t buffer,
348
348
ggml_tensor *tensor) try {
349
349
GGML_SYCL_DEBUG (" [SYCL] call %s" , __func__);
350
- debug_print_tensor ( " : tensor= " , tensor, " \n " );
350
+ GGML_SYCL_DEBUG ( " %s " , debug_get_tensor_str ( " : tensor" , tensor, " \n " ). c_str () );
351
351
ggml_backend_sycl_buffer_context * ctx = (ggml_backend_sycl_buffer_context *)buffer->context ;
352
352
353
353
if (tensor->view_src != NULL ) {
@@ -385,7 +385,7 @@ static void ggml_backend_sycl_buffer_set_tensor(ggml_backend_buffer_t buffer,
385
385
const void *data, size_t offset,
386
386
size_t size) try {
387
387
GGML_SYCL_DEBUG (" [SYCL] call %s" , __func__);
388
- debug_print_tensor ( " : tensor= " , tensor);
388
+ GGML_SYCL_DEBUG ( " %s " , debug_get_tensor_str ( " : tensor" , tensor). c_str () );
389
389
GGML_SYCL_DEBUG (" size=%zu offset=%zu\n " , size, offset);
390
390
ggml_backend_sycl_buffer_context * ctx = ( ggml_backend_sycl_buffer_context *)buffer->context ;
391
391
ggml_sycl_set_device (ctx->device );
@@ -413,7 +413,7 @@ static void ggml_backend_sycl_buffer_get_tensor(ggml_backend_buffer_t buffer,
413
413
void *data, size_t offset,
414
414
size_t size) try {
415
415
GGML_SYCL_DEBUG (" [SYCL] call %s" , __func__);
416
- debug_print_tensor ( " : tensor= " , tensor);
416
+ GGML_SYCL_DEBUG ( " %s " , debug_get_tensor_str ( " : tensor" , tensor). c_str () );
417
417
GGML_SYCL_DEBUG (" size=%zu offset=%zu\n " , size, offset);
418
418
ggml_backend_sycl_buffer_context * ctx = ( ggml_backend_sycl_buffer_context *)buffer->context ;
419
419
@@ -444,8 +444,8 @@ ggml_backend_sycl_buffer_cpy_tensor(ggml_backend_buffer_t buffer,
444
444
ggml_tensor *dst) try {
445
445
bool is_cpy_supported = ggml_backend_buffer_is_sycl (src->buffer );
446
446
GGML_SYCL_DEBUG (" [SYCL] call %s" , __func__);
447
- debug_print_tensor ( " : dst= " , dst);
448
- debug_print_tensor ( " src= " , src);
447
+ GGML_SYCL_DEBUG ( " %s " , debug_get_tensor_str ( " : dst" , dst). c_str () );
448
+ GGML_SYCL_DEBUG ( " %s " , debug_get_tensor_str ( " src" , src). c_str () );
449
449
GGML_SYCL_DEBUG (" is_cpy_supported=%d\n " , is_cpy_supported);
450
450
if (is_cpy_supported) {
451
451
ggml_backend_sycl_buffer_context * src_ctx = (ggml_backend_sycl_buffer_context *)src->buffer ->context ;
@@ -525,7 +525,7 @@ catch (sycl::exception const &exc) {
525
525
static void ggml_backend_sycl_buffer_memset_tensor (ggml_backend_buffer_t buffer, ggml_tensor * tensor, uint8_t value,
526
526
size_t offset, size_t size) {
527
527
GGML_SYCL_DEBUG (" [SYCL] call %s" , __func__);
528
- debug_print_tensor ( " : tensor= " , tensor);
528
+ GGML_SYCL_DEBUG ( " %s " , debug_get_tensor_str ( " : tensor" , tensor). c_str () );
529
529
GGML_SYCL_DEBUG (" size=%zu offset=%zu value=%u\n " , size, offset, value);
530
530
ggml_backend_sycl_buffer_context * ctx = (ggml_backend_sycl_buffer_context *) buffer->context ;
531
531
SYCL_CHECK (ggml_sycl_set_device (ctx->device ));
@@ -805,7 +805,7 @@ static enum ggml_status
805
805
ggml_backend_sycl_split_buffer_init_tensor (ggml_backend_buffer_t buffer,
806
806
ggml_tensor *tensor) try {
807
807
GGML_SYCL_DEBUG (" [SYCL] call %s" , __func__);
808
- debug_print_tensor ( " : tensor= " , tensor, " \n " );
808
+ GGML_SYCL_DEBUG ( " %s " , debug_get_tensor_str ( " : tensor" , tensor, " \n " ). c_str () );
809
809
GGML_ASSERT (tensor->view_src == nullptr ); // views of split tensors are not supported
810
810
811
811
ggml_backend_sycl_split_buffer_context * ctx = (ggml_backend_sycl_split_buffer_context *)buffer->context ;
@@ -891,7 +891,7 @@ ggml_backend_sycl_split_buffer_set_tensor(ggml_backend_buffer_t buffer,
891
891
ggml_tensor *tensor, const void *data,
892
892
size_t offset, size_t size) try {
893
893
GGML_SYCL_DEBUG (" [SYCL] call %s" , __func__);
894
- debug_print_tensor ( " : tensor= " , tensor);
894
+ GGML_SYCL_DEBUG ( " %s " , debug_get_tensor_str ( " : tensor" , tensor). c_str () );
895
895
GGML_SYCL_DEBUG (" size=%zu offset=%zu\n " , size, offset);
896
896
// split tensors must always be set in their entirety at once
897
897
GGML_ASSERT (offset == 0 );
@@ -947,7 +947,7 @@ ggml_backend_sycl_split_buffer_get_tensor(ggml_backend_buffer_t buffer,
947
947
const ggml_tensor *tensor, void *data,
948
948
size_t offset, size_t size) try {
949
949
GGML_SYCL_DEBUG (" [SYCL] call %s" , __func__);
950
- debug_print_tensor ( " : tensor= " , tensor);
950
+ GGML_SYCL_DEBUG ( " %s " , debug_get_tensor_str ( " : tensor" , tensor). c_str () );
951
951
GGML_SYCL_DEBUG (" size=%zu offset=%zu\n " , size, offset);
952
952
// split tensors must always be set in their entirety at once
953
953
GGML_ASSERT (offset == 0 );
@@ -3863,7 +3863,7 @@ static void ggml_backend_sycl_set_tensor_async(ggml_backend_t backend,
3863
3863
const void *data, size_t offset,
3864
3864
size_t size) try {
3865
3865
GGML_SYCL_DEBUG (" [SYCL] call %s" , __func__);
3866
- debug_print_tensor ( " : tensor= " , tensor);
3866
+ GGML_SYCL_DEBUG ( " %s " , debug_get_tensor_str ( " : tensor" , tensor). c_str () );
3867
3867
GGML_SYCL_DEBUG (" size=%zu offset=%zu\n " , size, offset);
3868
3868
ggml_backend_sycl_context * sycl_ctx = (ggml_backend_sycl_context *)backend->context ;
3869
3869
ggml_backend_buffer_t buf = tensor->view_src ? tensor->view_src ->buffer : tensor->buffer ;
@@ -3884,7 +3884,7 @@ static void ggml_backend_sycl_get_tensor_async(ggml_backend_t backend,
3884
3884
void *data, size_t offset,
3885
3885
size_t size) try {
3886
3886
GGML_SYCL_DEBUG (" [SYCL] call %s" , __func__);
3887
- debug_print_tensor ( " : tensor= " , tensor);
3887
+ GGML_SYCL_DEBUG ( " %s " , debug_get_tensor_str ( " : tensor" , tensor). c_str () );
3888
3888
GGML_SYCL_DEBUG (" size=%zu offset=%zu\n " , size, offset);
3889
3889
ggml_backend_sycl_context * sycl_ctx = (ggml_backend_sycl_context *)backend->context ;
3890
3890
ggml_backend_buffer_t buf = tensor->view_src ? tensor->view_src ->buffer : tensor->buffer ;
@@ -3907,8 +3907,8 @@ static bool ggml_backend_sycl_cpy_tensor_async(ggml_backend_t backend,
3907
3907
bool is_cpy_supported = dst->buffer ->buft == ggml_backend_sycl_buffer_type (sycl_ctx->device ) &&
3908
3908
ggml_backend_buffer_is_sycl (src->buffer );
3909
3909
GGML_SYCL_DEBUG (" [SYCL] call %s" , __func__);
3910
- debug_print_tensor ( " : dst= " , dst);
3911
- debug_print_tensor ( " src= " , src);
3910
+ GGML_SYCL_DEBUG ( " %s " , debug_get_tensor_str ( " : dst" , dst). c_str () );
3911
+ GGML_SYCL_DEBUG ( " %s " , debug_get_tensor_str ( " src" , src). c_str () );
3912
3912
GGML_SYCL_DEBUG (" is_cpy_supported=%d\n " , is_cpy_supported);
3913
3913
if (is_cpy_supported) {
3914
3914
/*
0 commit comments