@@ -135,8 +135,8 @@ static bool ggml_are_same_layout(const struct ggml_tensor * a, const struct ggml
135135}
136136
137137void ggml_backend_tensor_copy (struct ggml_tensor * src , struct ggml_tensor * dst ) {
138- // printf("src: %s ne: [%d %d %d %d] nb: [%d %d %d %d]\n", src->name, (int)src->ne[0], (int)src->ne[1], (int)src->ne[2], (int)src->ne[3], (int)src->nb[0], (int)src->nb[1], (int)src->nb[2], (int)src->nb[3]);
139- // printf("dst: %s ne: [%d %d %d %d] nb: [%d %d %d %d]\n", dst->name, (int)dst->ne[0], (int)dst->ne[1], (int)dst->ne[2], (int)dst->ne[3], (int)dst->nb[0], (int)dst->nb[1], (int)dst->nb[2], (int)dst->nb[3]);
138+ printf ("src: %s ne: [%d %d %d %d] nb: [%d %d %d %d]\n" , src -> name , (int )src -> ne [0 ], (int )src -> ne [1 ], (int )src -> ne [2 ], (int )src -> ne [3 ], (int )src -> nb [0 ], (int )src -> nb [1 ], (int )src -> nb [2 ], (int )src -> nb [3 ]);
139+ printf ("dst: %s ne: [%d %d %d %d] nb: [%d %d %d %d]\n" , dst -> name , (int )dst -> ne [0 ], (int )dst -> ne [1 ], (int )dst -> ne [2 ], (int )dst -> ne [3 ], (int )dst -> nb [0 ], (int )dst -> nb [1 ], (int )dst -> nb [2 ], (int )dst -> nb [3 ]);
140140 GGML_ASSERT (ggml_are_same_layout (src , dst ) && "cannot copy tensors with different layouts" );
141141
142142 // printf("cpy tensor %s from %s to %s (%lu bytes)\n", src->name, ggml_backend_name(src->backend), ggml_backend_name(dst->backend), ggml_nbytes(src));
@@ -145,6 +145,9 @@ void ggml_backend_tensor_copy(struct ggml_tensor * src, struct ggml_tensor * dst
145145 return ;
146146 }
147147
148+ printf ("src->data = %p, src->extra = %p\n" , src -> data , src -> extra );
149+ printf ("dst->data = %p, dst->extra = %p\n" , dst -> data , dst -> extra );
150+
148151 if (dst -> backend -> interface .cpy_tensor_from != NULL ) {
149152 dst -> backend -> interface .cpy_tensor_from (dst -> backend -> context , src , dst );
150153 } else if (src -> backend -> interface .cpy_tensor_to != NULL ) {
@@ -464,7 +467,7 @@ void ggml_graph_splits_compute(struct ggml_graph_splits * splits) {
464467 // copy the input tensor to the backend
465468 uint64_t copy_start_us = ggml_time_us ();
466469 for (int j = 0 ; split -> src_inputs [j ] != NULL ; j ++ ) {
467- // printf("\tcopying tensor %d (%s) (%lu bytes)\n", j, split->src_inputs[j]->name, ggml_nbytes(split->src_inputs[j]));
470+ printf ("\tcopying tensor %d (%s) (%lu bytes)\n" , j , split -> src_inputs [j ]-> name , ggml_nbytes (split -> src_inputs [j ]));
468471 ggml_backend_tensor_copy (split -> src_inputs [j ], split -> dst_inputs [j ]);
469472 }
470473 // ggml_backend_synchronize(split->dst_inputs[0]->backend);
0 commit comments