Skip to content

Commit cfbaccd

Browse files
committed
doc
1 parent 18f2582 commit cfbaccd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ggml/src/ggml-tp/ggml-tp.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,10 @@ static ggml_status reduce_gathered_tensors(ggml_cgraph * backend_graph, int devi
850850
auto be = ggml_parallel_backends[device_index];
851851
ggml_tensor * wrapped = extra->tensors[device_index];
852852

853+
// when reducing a tensor, the actual op (sub or add) is contained in reduce_op_tensors
854+
// which needs a split view of the reduce state sources.
855+
// and the final reduce (add) is contained in tensors.
856+
// todo: make this part of the graph.
853857
for (size_t i = 0; i < ggml_parallel_devices.size(); i++) {
854858
if (i == 0) {
855859
wrapped->src[0] = extra->rejoined_tensor_views[device_index][i++];

0 commit comments

Comments
 (0)