MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / ggml_build_forward_select

Function ggml_build_forward_select

subprojects/llama.cpp/ggml/src/ggml.c:6816–6828  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6814}
6815
6816struct ggml_tensor * ggml_build_forward_select(
6817 struct ggml_cgraph * cgraph,
6818 struct ggml_tensor ** tensors,
6819 int n_tensors,
6820 int idx) {
6821 GGML_ASSERT(idx >= 0 && idx < n_tensors);
6822
6823 for (int i = 0; i < n_tensors; i++) {
6824 ggml_build_forward_impl(cgraph, tensors[i], true, i == idx ? true : false);
6825 }
6826
6827 return tensors[idx];
6828}
6829
6830void ggml_build_forward_expand(struct ggml_cgraph * cgraph, struct ggml_tensor * tensor) {
6831 ggml_build_forward_impl(cgraph, tensor, true, true);

Callers 2

build_inp_embdMethod · 0.85
build_samplingMethod · 0.85

Calls 1

ggml_build_forward_implFunction · 0.85

Tested by

no test coverage detected