Skip to content

Commit 68f7227

Browse files
committed
Delete redundant isContiguous check from THCUNN SpatialDilatedConvolution
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
1 parent d97db0d commit 68f7227

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

aten/src/ATen/native/Convolution.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,7 @@ at::Tensor _convolution_nogroup(
395395
if (dim == 4) {
396396
if (dilated) {
397397
return at::thnn_conv_dilated2d(
398-
// TODO: This might not be necessary in the non-CUDA case,
399-
// as we only triggered a failure here with
400-
// test_ConvTranspose1d_cuda. Very unsatisfactory...
401-
input, weight.contiguous(), kernel_size, bias,
398+
input, weight, kernel_size, bias,
402399
stride, padding, dilation);
403400
} else { /* dim == 4, non-dilated */
404401
if (params.use_nnpack(input)) {

aten/src/THCUNN/generic/SpatialDilatedConvolution.cu

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ static inline void THNN_(SpatialDilatedConvolution_shapeCheck)(
1616
"kernel size should be greater than zero, but got kH: %d kW: %d", kH, kW);
1717
THArgCheck(dW > 0 && dH > 0, 11,
1818
"stride should be greater than zero, but got dH: %d dW: %d", dH, dW);
19-
THArgCheck(THCTensor_(isContiguous)(state, weight), 4,
20-
"weight tensor has to be contiguous");
2119
THArgCheck(!bias || THCTensor_(isContiguous)(state, bias), 5,
2220
"bias tensor has to be contiguous");
2321
THArgCheck(dilationW > 0 && dilationH > 0, 14,

0 commit comments

Comments
 (0)