Skip to content

Commit

Permalink
gpu: nvidia: ip: adjust benchdnn error threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
sgeor255 committed Jan 22, 2025
1 parent ea6c0b7 commit 383b1a2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/benchdnn/ip/ip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,16 @@ void skip_invalid_prb(const prb_t *prb, res_t *res) {}

void setup_cmp(compare::compare_t &cmp, const prb_t *prb, data_kind_t kind,
const args_t &ref_args) {
cmp.set_threshold(0.f);
// The nvidia implementation has precision issues in some cases
// for large problems with post-op sum
if (is_nvidia_gpu()
&& prb->attr.post_ops.find(attr_t::post_ops_t::kind_t::SUM) != -1
&& prb->dst_dt() == dnnl_f16) {
const float trh = epsilon_dt(prb->dt[2]);
cmp.set_threshold(trh);
} else {
cmp.set_threshold(0.f);
}
}

std::vector<int> supported_exec_args(dir_t dir) {
Expand Down

0 comments on commit 383b1a2

Please sign in to comment.