format name of cloned tensors with " (clone)" suffix

This commit is contained in:
xaedes 2023-08-14 18:15:09 +02:00
parent 865c4cd3c1
commit 3e99a8d653
No known key found for this signature in database
GPG key ID: 30030EDD817EA2B1

View file

@ -1493,7 +1493,7 @@ struct ggml_tensor * ggml_recompute_graph_node(
GGML_ASSERT(sizeof(node->op_params) == sizeof(int32_t) * (GGML_MAX_OP_PARAMS / sizeof(int32_t))); GGML_ASSERT(sizeof(node->op_params) == sizeof(int32_t) * (GGML_MAX_OP_PARAMS / sizeof(int32_t)));
GGML_ASSERT(sizeof(node->name) == GGML_MAX_NAME); GGML_ASSERT(sizeof(node->name) == GGML_MAX_NAME);
memcpy(clone->op_params, node->op_params, sizeof(node->op_params)); memcpy(clone->op_params, node->op_params, sizeof(node->op_params));
memcpy(clone->name, node->name, sizeof(node->name)); ggml_format_name(clone, "%s (clone)", ggml_get_name(node));
return clone; return clone;
}; };