mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-11-15 11:17:31 +00:00
ggml-zdnn: add logger to check if mat mul ops go through set_tensor
Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
This commit is contained in:
@@ -409,6 +409,14 @@ static void ggml_backend_zdnn_buffer_memset_tensor(ggml_backend_buffer_t buffer,
|
|||||||
static void ggml_backend_zdnn_buffer_set_tensor(ggml_backend_buffer_t buffer, struct ggml_tensor * tensor, const void * data, size_t offset, size_t size) {
|
static void ggml_backend_zdnn_buffer_set_tensor(ggml_backend_buffer_t buffer, struct ggml_tensor * tensor, const void * data, size_t offset, size_t size) {
|
||||||
ggml_backend_zdnn_buffer * extra = (ggml_backend_zdnn_buffer *)tensor->extra;
|
ggml_backend_zdnn_buffer * extra = (ggml_backend_zdnn_buffer *)tensor->extra;
|
||||||
|
|
||||||
|
// Log only for MUL_MAT operations
|
||||||
|
if (tensor->op == GGML_OP_MUL_MAT) {
|
||||||
|
GGML_LOG_INFO("%s: MUL_MAT operation - tensor '%s', size = %zu bytes\n",
|
||||||
|
__func__, tensor->name, size);
|
||||||
|
GGML_LOG_INFO("%s: tensor->extra->extra = %p\n",
|
||||||
|
__func__, extra->extra);
|
||||||
|
}
|
||||||
|
|
||||||
// if extra buffer exists, transform the ztensor with the buffer data. for e.g., bias
|
// if extra buffer exists, transform the ztensor with the buffer data. for e.g., bias
|
||||||
if (extra->extra != nullptr) {
|
if (extra->extra != nullptr) {
|
||||||
GGML_LOG_INFO("%s: transforming bias ztensor for tensor '%s', bias size = %zu bytes\n",
|
GGML_LOG_INFO("%s: transforming bias ztensor for tensor '%s', bias size = %zu bytes\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user