Skip to content

Commit ff0da2c

Browse files
author
Roman Dubtsov
committed
fixup: cpu: ref: pooling: dispatch ndhwc to nhwc pooling
1 parent 7fc1e7a commit ff0da2c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/cpu/nhwc_pooling.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ struct nhwc_pooling_fwd_t: public cpu_primitive_t {
6262
&& utils::everyone_is(data_type,
6363
src_pd()->desc()->data_type,
6464
dst_pd()->desc()->data_type)
65-
&& utils::one_of(src_format, nchw, ndhwc)
65+
&& utils::one_of(src_format, nhwc, ndhwc)
6666
&& (src_format == dst_pd()->desc()->format)
6767
&& attr()->has_default_values();
6868
if (!ok) return status::unimplemented;
@@ -210,7 +210,9 @@ struct nhwc_pooling_bwd_t: public cpu_primitive_t {
210210
bool ws_ok = true
211211
&& hint_fwd_pd_
212212
&& hint_fwd_pd_->workspace_pd()
213-
&& hint_fwd_pd_->workspace_pd()->desc()->format == nhwc
213+
&& utils::one_of(
214+
hint_fwd_pd_->workspace_pd()->desc()->format,
215+
nhwc, ndhwc)
214216
&& hint_fwd_pd_->workspace_pd()->engine()->kind()
215217
== engine_kind::cpu;
216218
if (!ws_ok) return status::unimplemented;

0 commit comments

Comments
 (0)