Skip to content

Commit 4664a46

Browse files
committed
cpu: arm: acl change winograd heuristic
1 parent bbf8399 commit 4664a46

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/cpu/aarch64/acl_convolution_utils.cpp

+11-7
Original file line numberDiff line numberDiff line change
@@ -292,14 +292,18 @@ status_t init_conf_wino(acl_conv_conf_t &acp, memory_desc_t &src_md,
292292
// Under these conditions, fallback to faster GEMM-based convolution
293293
// unless the user explicitly specifies Winograd algorithm
294294
// clang-format off
295-
if (one_of(true, src_md.dims[2] > 112, // ih
296-
src_md.dims[3] > 112, // iw
297-
src_md.dims[1] < 64, // ic
298-
dst_md.dims[1] < 64, // oc
299-
dnnl_get_max_threads() > 28)
300-
&& cd.alg_kind == alg_kind::convolution_auto) {
301-
return status::unimplemented;
295+
296+
// Heuristic only for servers
297+
if (dnnl_get_max_threads() > 28 && cd.alg_kind == alg_kind::convolution_auto) {
298+
return status::unimplemented;
302299
}
300+
// Heuristic for other devices
301+
if (one_of(true, src_md.dims[1] < 64, // ic
302+
dst_md.dims[1] < 64) // oc
303+
&& cd.alg_kind == alg_kind::convolution_auto) {
304+
return status::unimplemented;
305+
}
306+
303307
// clang-format on
304308

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

0 commit comments

Comments
 (0)