Skip to content

Commit e6b93af

Browse files
nivas-x86tprimak
authored andcommitted
cpu: conv: fix 3d binary post-ops
1 parent 928065b commit e6b93af

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/cpu/gemm_convolution.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2016-2021 Intel Corporation
2+
* Copyright 2016-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.
@@ -203,7 +203,10 @@ status_t gemm_convolution_fwd_t::execute_forward_thr_nspc(const exec_ctx_t &ctx,
203203
args.dst_md = pd()->dst_md();
204204

205205
for (size_t oc = start_oc; oc <= end_oc; oc++) {
206-
args.l_offset = (g * jcp.oc + oc) * jcp.os;
206+
// jcp.od is not part of jcp.os, so multiply
207+
// jcp.od to get spatial offset.
208+
args.l_offset = (g * jcp.oc + oc)
209+
* (jcp.os * jcp.od);
207210
post_ops_->execute(dst_arr[oc], args);
208211
}
209212
}

tests/benchdnn/inputs/matmul/harness_matmul_regression_f32

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@
66

77
--stag=ba --wtag=ab --dtag=ab
88
13x262144:262144x1:13x1_n"long_acc_chain"
9+
10+
--stag=axb --dtag=axb
11+
--skip-imp=brg,jit:avx,ref # test gemm convolutions
12+
--attr-post-ops=add:f32:per_oc,prelu:per_oc g4ic16id5oc16od5kd3pd1n"3d_conv:grouped_gemm_conv"

0 commit comments

Comments
 (0)