Skip to content

Commit 5baba71

Browse files
committed
[ARM] New heuristic for winograd and gemm (ACL)
1 parent 0bbc7a7 commit 5baba71

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/cpu/acl/acl_convolution_utils.cpp

+11-7
Original file line numberDiff line numberDiff line change
@@ -355,14 +355,18 @@ status_t init_conf_wino(acl_conv_conf_t &acp, memory_desc_t &src_md,
355355
// Under these conditions, fallback to faster GEMM-based convolution
356356
// unless the user explicitly specifies Winograd algorithm
357357
// clang-format off
358-
if (one_of(true, src_md.dims[2] > 112, // ih
359-
src_md.dims[3] > 112, // iw
360-
src_md.dims[1] < 64, // ic
361-
dst_md.dims[1] < 64, // oc
362-
dnnl_get_max_threads() > 28)
363-
&& cd.alg_kind == alg_kind::convolution_auto) {
364-
return status::unimplemented;
358+
359+
// Heuristic only for servers
360+
if (dnnl_get_max_threads() > 28 && cd.alg_kind == alg_kind::convolution_auto) {
361+
return status::unimplemented;
365362
}
363+
// Heuristic for other devices
364+
if (one_of(true, src_md.dims[1] < 64, // ic
365+
dst_md.dims[1] < 64) // oc
366+
&& cd.alg_kind == alg_kind::convolution_auto) {
367+
return status::unimplemented;
368+
}
369+
366370
// clang-format on
367371

368372
// General Compute Library checks, memory tags are also set there

0 commit comments

Comments
 (0)