Skip to content

Commit 70224e6

Browse files
committed
ggml-zdnn: bring load ztensor back to init routine
Signed-off-by: Aaron Teo <[email protected]>
1 parent 1eb7c35 commit 70224e6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

ggml/src/ggml-zdnn/ggml-zdnn-rewrite.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ 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-
}
140+
// if (weights_extra->ztensor.is_transformed == false) {
141+
// ggml_zdnn_load_tensor(weights_extra->ztensor, weights->data);
142+
// }
143143

144-
if (inputs_extra->ztensor.is_transformed == false) {
145-
ggml_zdnn_load_tensor(inputs_extra->ztensor, inputs->data);
146-
}
144+
// if (inputs_extra->ztensor.is_transformed == false) {
145+
// ggml_zdnn_load_tensor(inputs_extra->ztensor, inputs->data);
146+
// }
147147
ggml_zdnn_load_tensor(zt_bias, bias_data);
148148

149149
// GGML_LOG_INFO("%s: tensor '%s' tensor dimensions: [%ld, %ld, %ld, %ld] pre_tfm_desc dimensions: [%ld, %ld, %ld, %ld]\n",
@@ -432,8 +432,8 @@ static void ggml_backend_zdnn_buffer_memset_tensor(ggml_backend_buffer_t buffer,
432432
static void ggml_backend_zdnn_buffer_set_tensor(ggml_backend_buffer_t buffer, ggml_tensor * tensor, const void * data, size_t offset, size_t size) {
433433
memcpy((char *)tensor->data + offset, data, size);
434434

435-
// ggml_backend_zdnn_buffer * zdnn_buffer = (ggml_backend_zdnn_buffer *)tensor->extra;
436-
// ggml_zdnn_load_tensor(zdnn_buffer->ztensor, (void *)data);
435+
ggml_backend_zdnn_buffer * zdnn_buffer = (ggml_backend_zdnn_buffer *)tensor->extra;
436+
ggml_zdnn_load_tensor(zdnn_buffer->ztensor, (void *)data);
437437

438438
GGML_UNUSED(buffer);
439439
}

0 commit comments

Comments
 (0)