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

Function ggml_add1_or_set

ggml.c:15387–15393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15385}
15386
15387static struct ggml_tensor * ggml_add1_or_set(struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, struct ggml_hash_set zero_table) {
15388 if (ggml_hash_contains(zero_table, a)) {
15389 return ggml_repeat(ctx, b, a);
15390 } else {
15391 return ggml_add1_impl(ctx, a, b, false);
15392 }
15393}
15394
15395static struct ggml_tensor * ggml_sub_or_set(struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, struct ggml_hash_set zero_table) {
15396 if (ggml_hash_contains(zero_table, a)) {

Callers 1

ggml_compute_backwardFunction · 0.70

Calls 3

ggml_hash_containsFunction · 0.70
ggml_repeatFunction · 0.70
ggml_add1_implFunction · 0.70

Tested by

no test coverage detected