| 6814 | } |
| 6815 | |
| 6816 | struct 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 | |
| 6830 | void ggml_build_forward_expand(struct ggml_cgraph * cgraph, struct ggml_tensor * tensor) { |
| 6831 | ggml_build_forward_impl(cgraph, tensor, true, true); |
no test coverage detected