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

Function ggml_sub_or_set

ggml.c:15395–15401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)) {
15397 return ggml_neg(ctx, b);
15398 } else {
15399 return ggml_sub_impl(ctx, a, b, false);
15400 }
15401}
15402
15403static void ggml_compute_backward(struct ggml_context * ctx, struct ggml_tensor * tensor, struct ggml_hash_set zero_table) {
15404 struct ggml_tensor * src0 = tensor->src[0];

Callers 1

ggml_compute_backwardFunction · 0.70

Calls 3

ggml_hash_containsFunction · 0.70
ggml_negFunction · 0.70
ggml_sub_implFunction · 0.70

Tested by

no test coverage detected