Repository: ggerganov/llama.cpp
File: ggml/src/ggml-cuda/ggml-cuda.cu (CUDA)

Code before:
                        i += 4;
                        continue;
                    }

                    if (ggml_cuda_can_fuse(cgraph, i,
                                           ggml_cuda_topk_moe_ops(/*with norm*/ false, /*delayed softmax*/ true), {})) {
                        ggml_tensor * weights = cgraph->nodes[i + 5];
                        ggml_tensor * ids     = cgraph->nodes[i + 1];

                        ggml_cuda_op_topk_moe(*cuda_ctx, node->src[0], weights, ids, /*with norm*/ false,
                                              /*delayed_softmax*/ true);
                        i += 5;
                        continue;
                    }

                    if (node->op == GGML_OP_MUL) {
                        int current_node = i + 1;
                        int num_views    = 0;
                        int num_adds     = 0;
                        while (current_node < cgraph->n_nodes && cgraph->nodes[current_node]->op == GGML_OP_VIEW) {
                            num_views++;
                            current_node++;
                        }

                        while (current_node < cgraph->n_nodes && cgraph->nodes[current_node]->op == GGML_OP_ADD &&
                            num_adds < num_views - 1) {
                            num_adds++;
                            current_node++;
                        }

                        if (num_adds == num_views - 1 && num_views > 0) {
                            ggml_tensor * dst_node = cgraph->nodes[current_node - 1];
                            if (ggml_cuda_should_use_moe_expert_reduce(cgraph, i, current_node)) {
                                ggml_cuda_op_moe_expert_reduce(*cuda_ctx, node->src[0], node->src[1], dst_node);
                                i += num_views + num_adds;
                                continue;
                            }
                        }
                    }

                    if (node->op == GGML_OP_ADD) {
                        int n_fuse = 0;
                        ggml_op ops[8];
                        std::fill(ops, ops + 8, GGML_OP_ADD);

                        for (; n_fuse <= 6; ++n_fuse){
                            if (!ggml_can_fuse(cgraph, i + n_fuse, ops + n_fuse, 2)) {
                                break;
                            }
                            if (cgraph->nodes[i + n_fuse] != cgraph->nodes[i + n_fuse + 1]->src[0]) {
                                break;

Review comment (suggestion):
```suggestion
                                num_adds < num_views - 1) {
```

To make the indentation more visually distinct

Code after:
                        i += 4;
                        continue;
                    }

                    if (ggml_cuda_can_fuse(cgraph, i,
                                           ggml_cuda_topk_moe_ops(/*with norm*/ false, /*delayed softmax*/ true), {})) {
                        ggml_tensor * weights = cgraph->nodes[i + 5];
                        ggml_tensor * ids     = cgraph->nodes[i + 1];

                        ggml_cuda_op_topk_moe(*cuda_ctx, node->src[0], weights, ids, /*with norm*/ false,
                                              /*delayed_softmax*/ true);
                        i += 5;
                        continue;
                    }

                    if (node->op == GGML_OP_MUL) {
                        int current_node = i + 1;
                        int num_views    = 0;
                        int num_adds     = 0;
                        while (current_node < cgraph->n_nodes && cgraph->nodes[current_node]->op == GGML_OP_VIEW) {
                            num_views++;
                            current_node++;
                        }

                        while (current_node < cgraph->n_nodes && cgraph->nodes[current_node]->op == GGML_OP_ADD &&
                                num_adds < num_views - 1) {
                            num_adds++;
                            current_node++;
                        }

                        if (num_adds == num_views - 1 && num_views > 0) {
                            ggml_tensor * dst_node = cgraph->nodes[current_node - 1];
                            if (ggml_cuda_should_use_moe_expert_reduce(cgraph, i, current_node)) {
                                ggml_cuda_op_moe_expert_reduce(*cuda_ctx, node->src[0], node->src[1], dst_node);
                                i += num_views + num_adds;
                                continue;
                            }
                        }
                    }

                    if (node->op == GGML_OP_ADD) {
                        int n_fuse = 0;
                        ggml_op ops[8];
                        std::fill(ops, ops + 8, GGML_OP_ADD);

                        for (; n_fuse <= 6; ++n_fuse){
                            if (!ggml_can_fuse(cgraph, i + n_fuse, ops + n_fuse, 2)) {
                                break;
                            }
                            if (cgraph->nodes[i + n_fuse] != cgraph->nodes[i + n_fuse + 1]->src[0]) {
                                break;