We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db4f7a3 commit 993cd49Copy full SHA for 993cd49
src/GroupwiseConv.h
@@ -124,8 +124,12 @@ class GenConvKernelBase {
124
H_PAD_ = conv_param.pad[0];
125
W_PAD_ = conv_param.pad[1];
126
127
- use_bottom_padding_ =
128
- !(STRIDE_ > 1 && conv_param.IN_DIM[SPATIAL_DIM - 2] % 2 == 0);
+ if constexpr (SPATIAL_DIM >= 2) {
+ use_bottom_padding_ =
129
+ !(STRIDE_ > 1 && conv_param.IN_DIM[SPATIAL_DIM - 2] % 2 == 0);
130
+ } else {
131
+ use_bottom_padding_ = false;
132
+ }
133
use_right_padding_ =
134
!(STRIDE_ > 1 && conv_param.IN_DIM[SPATIAL_DIM - 1] % 2 == 0);
135
}
0 commit comments