Commit 34ea55b9 authored by wenjh's avatar wenjh
Browse files

[GemmTests] Fix gemm tests acc failed


Signed-off-by: wenjh's avatarwenjh <wenjh@sugon.com>
parent 5749aec6
...@@ -206,7 +206,7 @@ void performTest(bool use_bias, bool use_gelu, const size_t m, const size_t k, c ...@@ -206,7 +206,7 @@ void performTest(bool use_bias, bool use_gelu, const size_t m, const size_t k, c
if (dtype == DType::kFloat32) { if (dtype == DType::kFloat32) {
atol = 1e-5; atol = 1e-5;
} }
compareResults("D", D, ref_D.get(), atol, rtol); compareResults("D", D, ref_D.get(), true, atol, rtol);
if(use_gelu){ if(use_gelu){
auto [atol, rtol] = getTolerances(gelu_type); auto [atol, rtol] = getTolerances(gelu_type);
...@@ -214,7 +214,7 @@ void performTest(bool use_bias, bool use_gelu, const size_t m, const size_t k, c ...@@ -214,7 +214,7 @@ void performTest(bool use_bias, bool use_gelu, const size_t m, const size_t k, c
if (dtype == DType::kFloat32) { if (dtype == DType::kFloat32) {
atol = 5e-6; atol = 5e-6;
} }
compareResults("gelu", pre_gelu_out, ref_pre_gelu_out.get(), atol, rtol); compareResults("gelu", pre_gelu_out, ref_pre_gelu_out.get(), true, atol, rtol);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment