Skip to content

Commit 7174d35

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

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

src/cpu/acl/acl_convolution_utils.cpp

+15-7
Original file line numberDiff line numberDiff line change
@@ -355,14 +355,22 @@ 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) {
361+
if (one_of(true, src_md.dims[2] > 112, // ih
362+
src_md.dims[3] > 112) // iw
363+
&& cd.alg_kind == alg_kind::convolution_auto) {
364+
return status::unimplemented;
365+
}
365366
}
367+
// Heuristic for all devices
368+
if (one_of(true, src_md.dims[1] < 64, // ic
369+
dst_md.dims[1] < 64) // oc
370+
&& cd.alg_kind == alg_kind::convolution_auto) {
371+
return status::unimplemented;
372+
}
373+
366374
// clang-format on
367375

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

0 commit comments

Comments
 (0)