Skip to content

Commit

Permalink
added missing definition GetPaddingSizeFull
Browse files Browse the repository at this point in the history
ChaiBapchya committed May 4, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 5bf9c76 commit 62be87b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/operator/nn/mkldnn/mkldnn_pooling-inl.h
Original file line number Diff line number Diff line change
@@ -87,6 +87,14 @@ class MKLDNNPoolingBwd {
const mkldnn::pooling_backward::primitive_desc &GetPd();
};

inline int GetPaddingSizeFull(dim_t x, int padl, int padr, int k, int s) {
if ((x + padl + padr - k) % s != 0) {
return (padr + s - ((x + padl + padr - k) % s));
} else {
return padr;
}
}

inline bool SupportMKLDNNPooling(const PoolingParam &param) {
return (param.kernel.ndim() == 1 || param.kernel.ndim() == 2 ||
param.kernel.ndim() == 3) &&

0 comments on commit 62be87b

Please sign in to comment.