Skip to content

Commit 2163607

Browse files
cpu: x64: binary: Supporting per_w broadcast strategy (#2778)
1 parent a204c4b commit 2163607

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/cpu/x64/jit_uni_binary.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ namespace x64 {
2929
static bcast_set_t get_supported_postops_bcast_strategies() {
3030
return {broadcasting_strategy_t::scalar, broadcasting_strategy_t::per_oc,
3131
broadcasting_strategy_t::per_oc_spatial,
32+
broadcasting_strategy_t::per_w,
3233
broadcasting_strategy_t::no_broadcast};
3334
}
3435

src/cpu/x64/jit_uni_binary_kernel.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ namespace x64 {
2929
static bcast_set_t get_supported_postops_bcast_strategies() {
3030
return {broadcasting_strategy_t::scalar, broadcasting_strategy_t::per_oc,
3131
broadcasting_strategy_t::per_oc_spatial,
32+
broadcasting_strategy_t::per_w,
3233
broadcasting_strategy_t::no_broadcast};
3334
}
3435

tests/benchdnn/inputs/binary/harness_binary_regression

+3
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@
66

77
# Mixed src1/post-op src broadcast
88
--reset --attr-post-ops=add:f32:2 1x17:1x1
9+
10+
# per_w broadcasting strategy
11+
--reset --attr-post-ops=mul:f32:4+add:f32:4 --alg=add 1x20x768:1x20x1

0 commit comments

Comments
 (0)