From c32d1dabe819002ca8aa3a885aca4057f5968e3d Mon Sep 17 00:00:00 2001 From: Gaurav Garg Date: Thu, 10 Sep 2026 17:42:40 +0530 Subject: [PATCH] tests : increase tolerance for Add fusion tests (#28691) --- tests/test-backend-ops.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test-backend-ops.cpp b/tests/test-backend-ops.cpp index 503998883..0a6516e61 100644 --- a/tests/test-backend-ops.cpp +++ b/tests/test-backend-ops.cpp @@ -3328,6 +3328,14 @@ struct test_bin_bcast : public test_case { return op == ggml_div; } + double max_nmse_err() override { + if (op == ggml_add && type == GGML_TYPE_F16 && nf > 1) { + // Fused ADDs can keep FP32 intermediates while the CPU rounds each ADD to FP16. + return 1e-6; + } + return test_case::max_nmse_err(); + } + double max_maa_err() override { return op == ggml_add ? 1e-4 : 1e-3; }