Skip to content

Commit

Permalink
cpu: conv: fix 3d binary post-ops
Browse files Browse the repository at this point in the history
  • Loading branch information
nivas-x86 authored and tprimak committed Apr 3, 2023
1 parent 928065b commit e6b93af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/cpu/gemm_convolution.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright 2016-2021 Intel Corporation
* Copyright 2016-2023 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -203,7 +203,10 @@ status_t gemm_convolution_fwd_t::execute_forward_thr_nspc(const exec_ctx_t &ctx,
args.dst_md = pd()->dst_md();

for (size_t oc = start_oc; oc <= end_oc; oc++) {
args.l_offset = (g * jcp.oc + oc) * jcp.os;
// jcp.od is not part of jcp.os, so multiply
// jcp.od to get spatial offset.
args.l_offset = (g * jcp.oc + oc)
* (jcp.os * jcp.od);
post_ops_->execute(dst_arr[oc], args);
}
}
Expand Down
4 changes: 4 additions & 0 deletions tests/benchdnn/inputs/matmul/harness_matmul_regression_f32
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@

--stag=ba --wtag=ab --dtag=ab
13x262144:262144x1:13x1_n"long_acc_chain"

--stag=axb --dtag=axb
--skip-imp=brg,jit:avx,ref # test gemm convolutions
--attr-post-ops=add:f32:per_oc,prelu:per_oc g4ic16id5oc16od5kd3pd1n"3d_conv:grouped_gemm_conv"

0 comments on commit e6b93af

Please sign in to comment.