Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit f6efd34

Browse files
committed
avoid global pooling in mkldnn.
There is a bug in global pooling in mkldnn.
1 parent b48346a commit f6efd34

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/operator/nn/mkldnn/mkldnn_pooling-inl.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ class MKLDNNPoolingFwd {
8181
inline bool SupportMKLDNNPooling(const PoolingParam &param) {
8282
return param.kernel.ndim() == 2 &&
8383
(param.pool_type == pool_enum::kMaxPooling ||
84-
param.pool_type == pool_enum::kAvgPooling);
84+
param.pool_type == pool_enum::kAvgPooling)
85+
// This is a temporary fix. There is a bug in global pooling of MKLDNN.
86+
&& !param.global_pool;
8587
}
8688

8789
inline bool SupportMKLDNNPooling(const PoolingParam &param,

0 commit comments

Comments
 (0)