Skip to content

Commit 9a9cd33

Browse files
committed
ggml-cuda: recompute graph if GGML_OP_GLU op_params change
1 parent 3741634 commit 9a9cd33

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

ggml/src/ggml-cuda/ggml-cuda.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2834,7 +2834,7 @@ static bool ggml_graph_node_has_matching_properties(ggml_tensor * node, ggml_gra
28342834
}
28352835
}
28362836

2837-
if (node->op == GGML_OP_SCALE &&
2837+
if ((node->op == GGML_OP_SCALE || node->op == GGML_OP_GLU) &&
28382838
memcmp(graph_node_properties->op_params, node->op_params, GGML_MAX_OP_PARAMS) != 0) {
28392839
return false;
28402840
}

tests/test-backend-ops.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4690,10 +4690,7 @@ struct test_fused_ffn_gate : public test_case {
46904690
}
46914691

46924692
double max_nmse_err() override {
4693-
if (glu_op == GGML_GLU_OP_GEGLU) {
4694-
return 1e-2;
4695-
}
4696-
return 1e-3;
4693+
return 5e-4;
46974694
}
46984695
};
46994696

0 commit comments

Comments
 (0)