Skip to content

Commit 93bfe1d

Browse files
authored
[NPU] Remove depthwise_conv2d limit (PaddlePaddle#227)
1 parent dc43dc5 commit 93bfe1d

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

backends/npu/kernels/conv_kernel.cc

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -242,28 +242,6 @@ void DepthwiseConv2dKernel(const Context& dev_ctx,
242242
std::vector<int> dilation = dilations_in;
243243

244244
const bool channel_last = data_format == "NHWC";
245-
if (channel_last) {
246-
PADDLE_ENFORCE_EQ(
247-
out->dims()[out->dims().size() - 1],
248-
input.dims()[input.dims().size() - 1],
249-
phi::errors::InvalidArgument(
250-
"ShapeError: The output channels must be equal to the "
251-
"input channels. But receivced output channel number is %d "
252-
"and input channel number is %d",
253-
out->dims()[out->dims().size() - 1],
254-
input.dims()[input.dims().size() - 1]));
255-
} else {
256-
PADDLE_ENFORCE_EQ(
257-
out->dims()[1],
258-
input.dims()[1],
259-
phi::errors::InvalidArgument(
260-
"ShapeError: The output channels must be equal to the "
261-
"input channels. But receivced output channel number is %d "
262-
"and input channel number is %d",
263-
out->dims()[1],
264-
input.dims()[1]));
265-
}
266-
267245
auto in_dims = input.dims();
268246
auto filter_dims = filter.dims();
269247
phi::DDim in_data_dims;

0 commit comments

Comments
 (0)