From 9c6f2d5b442ce34cd2f6376d52db8e0bb0111f67 Mon Sep 17 00:00:00 2001 From: Umar Arshad Date: Wed, 29 Jan 2025 10:12:47 -0800 Subject: [PATCH] test: sdpa: Update threshold for bf16 --- tests/gtests/internals/test_sdpa.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/gtests/internals/test_sdpa.cpp b/tests/gtests/internals/test_sdpa.cpp index 8a0b3ed1f68..409bbdb498a 100644 --- a/tests/gtests/internals/test_sdpa.cpp +++ b/tests/gtests/internals/test_sdpa.cpp @@ -1669,7 +1669,13 @@ void check_memory(memory &gold, memory &test) { int mismatches = 0; int total = 0; - float fthreshold = 0.000978; + float fthreshold = 0.f; + if (std::is_same::value) { + fthreshold = 0.000978f; + } else { + fthreshold = 0.0079f; + } + float max_diff = std::numeric_limits::min(); std::map> hist; for_(int l = 0; l < dims[0]; l++)