MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / ggml_log_impl

Function ggml_log_impl

ggml.c:3564–3581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3562// ggml_log
3563
3564static struct ggml_tensor * ggml_log_impl(
3565 struct ggml_context * ctx,
3566 struct ggml_tensor * a,
3567 bool inplace) {
3568 bool is_node = false;
3569
3570 if (!inplace && (a->grad)) {
3571 is_node = true;
3572 }
3573
3574 struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
3575
3576 result->op = GGML_OP_LOG;
3577 result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
3578 result->src[0] = a;
3579
3580 return result;
3581}
3582
3583struct ggml_tensor * ggml_log(
3584 struct ggml_context * ctx,

Callers 2

ggml_logFunction · 0.70
ggml_log_inplaceFunction · 0.70

Calls 2

ggml_view_tensorFunction · 0.70
ggml_dup_tensorFunction · 0.70

Tested by

no test coverage detected