Skip to content

Commit

Permalink
test: sdpa: Update threshold for bf16
Browse files Browse the repository at this point in the history
  • Loading branch information
umar456 committed Jan 31, 2025
1 parent 2c337d8 commit 9c6f2d5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/gtests/internals/test_sdpa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<T, float16_t>::value) {
fthreshold = 0.000978f;
} else {
fthreshold = 0.0079f;
}

float max_diff = std::numeric_limits<float>::min();
std::map<int, std::map<int, int>> hist;
for_(int l = 0; l < dims[0]; l++)
Expand Down

0 comments on commit 9c6f2d5

Please sign in to comment.