Skip to content

Commit

Permalink
Tighten tolerance for binary elementwise fp16 ops
Browse files Browse the repository at this point in the history
This tolerance was way too lose

PiperOrigin-RevId: 716672453
  • Loading branch information
dsharletg authored and xnnpack-bot committed Jan 17, 2025
1 parent d0371d2 commit 20f5957
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/binary-elementwise-nd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ enum class RunMode {
double ComputeTolerance(xnn_datatype datatype, double output_ref) {
switch (datatype) {
case xnn_datatype_fp16:
return std::abs(output_ref);
return 1.0e-3 * std::abs(output_ref) + 1.0e-3;
case xnn_datatype_fp32:
return 1.0e-6 * std::abs(output_ref);
default:
Expand Down

0 comments on commit 20f5957

Please sign in to comment.