Skip to content

Commit ca15922

Browse files
committed
benchdnn: fix scales and bias order in brgemm reference
test coverage extended
1 parent 27845b8 commit ca15922

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

tests/benchdnn/brgemm/ref_brgemm.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2022 Intel Corporation
2+
* Copyright 2022-2023 Intel Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -92,12 +92,12 @@ void compute_ref_brgemm(const prb_t *prb, const args_t &args) {
9292
float &dst = ((float *)dst_m)[dst_off];
9393

9494
float tmp = ((float *)dst_tmp)[dst_off];
95+
maybe_scale(prb->attr, tmp, prb->scales, n, attr_scale_arg);
9596
if (prb->bia_dt != dnnl_data_type_undef) {
9697
int64_t bia_off = dst_m.get_scale_idx(dst_off, bias_broadcast_mask);
9798
float *bia_ptr = (float *)bia_m;
9899
tmp += bia_ptr[bia_off];
99100
}
100-
maybe_scale(prb->attr, tmp, prb->scales, n, attr_scale_arg);
101101

102102
const auto v_po_vals
103103
= prepare_po_vals(dst_m, args, v_po_masks, dst_off);

tests/benchdnn/inputs/brgemm/test_brgemm_int8

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,13 @@
4747
--attr-scales=,src:common:0.5*,wei:per_oc:2*,src:common:0.5*+wei:per_oc:4*
4848
--attr-zero-points=,src:common:-2*,src:common:128*+dst:common:-1*
4949
--batch=option_set_int8
50+
51+
## Limited full stack check
52+
--reset
53+
--brgemm-attr=,use_uker:1
54+
--dt=s8:s8:s8
55+
--attr-post-ops=sum:2+relu
56+
--attr-scales=src:common:0.5*+wei:per_oc:4*
57+
--attr-zero-points=,src:common:128*+dst:common:-1*
58+
--bia_dt=f32,s8
59+
--batch=option_set_int8

0 commit comments

Comments
 (0)