We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 803dde3 commit e67feafCopy full SHA for e67feaf
ggml/src/ggml-zdnn/ggml-zdnn-rewrite.cpp
@@ -379,7 +379,9 @@ static void ggml_backend_zdnn_buffer_free_buffer(ggml_backend_buffer_t buffer) {
379
ggml_backend_zdnn_buffer_context * ctx = (ggml_backend_zdnn_buffer_context *)buffer->context;
380
381
for (int i = 0; i < ctx->n_buffers; i++) {
382
- ZDNN_CHECK(zdnn_free_ztensor_buffer(&ctx->buffers[i]->ztensor));
+ if (ctx->buffers[i]->ztensor.buffer != NULL && ctx->buffers[i]->ztensor.is_transformed) {
383
+ ZDNN_CHECK(zdnn_free_ztensor_buffer(&ctx->buffers[i]->ztensor));
384
+ }
385
}
386
387
delete ctx;
0 commit comments