Skip to content

Commit df24de5

Browse files
authored
remove format checks in conv and convtranspose (#1254)
1 parent a89ab64 commit df24de5

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

csrc/cpu/aten/Conv.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,6 @@ void convolution_kernel_output(
3636
at::IntArrayRef dilation,
3737
int64_t groups,
3838
const ideep::attr_t& attr) {
39-
// Convolution output kernel, assuming the output always has same format with
40-
// input, so this function will not change input and output's format, making
41-
// sure you has made pre-process for input and output to make them have same
42-
// format before call this function.
43-
TORCH_CHECK(
44-
input.suggest_memory_format() == output.suggest_memory_format(),
45-
"input and output need has same format for convolution_kernel_output");
4639
TORCH_CHECK(
4740
(IS_CONTIGUOUS_ANY(input)) && (IS_CONTIGUOUS_ANY(output)),
4841
"input and output are need contiguous tensor for "

csrc/cpu/aten/ConvTranspose.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,6 @@ void conv_transpose_out_kernel_impl(
141141
at::IntArrayRef dilation,
142142
at::IntArrayRef origin_weight_dims,
143143
const ideep::attr_t& attr) {
144-
// ConvTranspose out kernel, assuming the output always has same format with
145-
// input, so this function will not change input and output's format, making
146-
// sure you has made pre-process for input and output to make them have same
147-
// format before call this function.
148-
TORCH_CHECK(
149-
input.suggest_memory_format() == output.suggest_memory_format(),
150-
"input and output need has same format for conv_transpose_out_kernel_impl");
151144
TORCH_CHECK(
152145
(IS_CONTIGUOUS_ANY(input)) && (IS_CONTIGUOUS_ANY(output)),
153146
"input and output should be contiguous tensor for "

0 commit comments

Comments
 (0)