Skip to content

Commit

Permalink
update attention test threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
tianleiwu committed Mar 18, 2024
1 parent c6f66af commit 8d3b231
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion onnxruntime/test/contrib_ops/attention_op_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ static void RunAttentionTest(
}

if (use_float16) {
tester.SetOutputTolerance(0.005f, 0.005f);
tester.SetOutputTolerance(0.005f);
} else {
tester.SetOutputTolerance(0.001f, 0.001f);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static void RunPackedMultiHeadAttentionTest(
}

tester.AddOutput<MLFloat16>("output", output_dims, ToFloat16(output_data));
tester.SetOutputTolerance(0.005f, 0.005f);
tester.SetOutputTolerance(0.005f);
} else {
if (is_packed_qkv) {
tester.AddInput<float>("query", packed_qkv_dims, query_data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ static void TestBatchNormInternal(bool test_double = false, bool T_is_half = fal
test.AddOutput<double>("running_var", channel_dims, running_var_double);
test.AddOutput<double>("saved_mean", channel_dims, saved_mean_double);
test.AddOutput<double>("saved_inv_std", channel_dims, saved_inv_std_double);
test.SetOutputTolerance(0.0001f);
} else {
if (T_is_half) {
std::vector<MLFloat16> X_half(X.size());
Expand Down

0 comments on commit 8d3b231

Please sign in to comment.