@@ -617,8 +617,20 @@ static void ggml_cpy_i32_i32_sycl(const char * cx, char * cdst, const int ne, co
617617
618618void ggml_sycl_cpy (ggml_backend_sycl_context & ctx, const ggml_tensor * src0, const ggml_tensor * src1) try {
619619 // Unlike other operators ggml_sycl_cpy takes 2 distinct tensors instead of a dst ggml_tensor and rely on its src field
620- scope_op_debug_print scope_dbg_print (__func__, src1, /* num_src=*/ 0 ,
621- std::string (" src0 type=" ) + ggml_type_name (src0->type ));
620+ std::stringstream dbg_suffix;
621+ if (UNLIKELY (g_ggml_sycl_debug)) {
622+ dbg_suffix << " \t src0='" << src0->name <<" '"
623+ << " ;type=" << ggml_type_name (src0->type )
624+ << " ;ne=[" << src0->ne [0 ] << " , " << src0->ne [1 ] << " , " << src0->ne [2 ] << " , " << src0->ne [3 ] << " ]"
625+ << " ;nb=[" << src0->nb [0 ] << " , " << src0->nb [1 ] << " , " << src0->nb [2 ] << " , " << src0->nb [3 ] << " ]" ;
626+ if (!ggml_is_contiguous (src0)) {
627+ dbg_suffix << " ;strided" ;
628+ }
629+ if (ggml_is_permuted (src0)) {
630+ dbg_suffix << " ;permuted" ;
631+ }
632+ }
633+ scope_op_debug_print scope_dbg_print (__func__, src1, /* num_src=*/ 0 , dbg_suffix.str ());
622634 const int64_t ne = ggml_nelements (src0);
623635 GGML_ASSERT (ne == ggml_nelements (src1));
624636
0 commit comments