@@ -137,13 +137,8 @@ static void ggml_zdnn_mul_mat_op(ggml_backend_zdnn_context * ctx, const ggml_ten
137137 ggml_zdnn_create_tensor (ptd_bias, td_bias, zt_bias, output, bias_dim, ZDNN_1D);
138138
139139 void * bias_data = (void *)calloc (ne0, ggml_element_size (output));
140- // if (weights_extra->ztensor.is_transformed == false) {
141- // ggml_zdnn_load_tensor(weights_extra->ztensor, weights->data);
142- // }
143-
144- // if (inputs_extra->ztensor.is_transformed == false) {
145- // ggml_zdnn_load_tensor(inputs_extra->ztensor, inputs->data);
146- // }
140+ if (weights_extra->ztensor .is_transformed == false ) ggml_zdnn_load_tensor (weights_extra->ztensor , weights->data );
141+ if (inputs_extra->ztensor .is_transformed == false ) ggml_zdnn_load_tensor (inputs_extra->ztensor , inputs->data );
147142 ggml_zdnn_load_tensor (zt_bias, bias_data);
148143
149144 // GGML_LOG_INFO("%s: tensor '%s' tensor dimensions: [%ld, %ld, %ld, %ld] pre_tfm_desc dimensions: [%ld, %ld, %ld, %ld]\n",
@@ -432,9 +427,6 @@ static void ggml_backend_zdnn_buffer_memset_tensor(ggml_backend_buffer_t buffer,
432427static void ggml_backend_zdnn_buffer_set_tensor (ggml_backend_buffer_t buffer, ggml_tensor * tensor, const void * data, size_t offset, size_t size) {
433428 memcpy ((char *)tensor->data + offset, data, size);
434429
435- ggml_backend_zdnn_buffer * zdnn_buffer = (ggml_backend_zdnn_buffer *)tensor->extra ;
436- ggml_zdnn_load_tensor (zdnn_buffer->ztensor , (void *)data);
437-
438430 GGML_UNUSED (buffer);
439431}
440432
0 commit comments