Segmentation fault at CPU mode (version '0.4.0a0+f4a75de')

Hello, I’m testing my code on CPU only.
The code works correctly on GPU. But, on CPU, I get a segfault.

I used a big tensor: [1, 128, 1248, 1712].

The code is too big to show, I’m attaching a call stack:

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x00007fffcd0dc07b in THNN_Floatcol2im () from /home/ubuntu/anaconda3/lib/python3.6/site-packages/torch/lib/libATen.so.1
(gdb) where
#0  0x00007fffcd0dc07b in THNN_Floatcol2im () from /home/ubuntu/anaconda3/lib/python3.6/site-packages/torch/lib/libATen.so.1
#1  0x00007fffcd1e411c in THNN_FloatSpatialFullDilatedConvolution_updateOutput () from /home/ubuntu/anaconda3/lib/python3.6/site-packages/torch/lib/libATen.so.1
#2  0x00007fffccafaeca in at::CPUFloatType::conv_transpose2d_forward(at::Tensor const&, at::Tensor const&, at::ArrayRef<long>, at::Tensor const&, at::ArrayRef<long>, at::ArrayRef<long>, at::ArrayRef<long>, at::ArrayRef<long>, at::Tensor const&, at::Tensor const&) const () from /home/ubuntu/anaconda3/lib/python3.6/site-packages/torch/lib/libATen.so.1
#3  0x00007fffede80691 in at::conv_transpose2d_forward (ones=..., columns=..., dilation=..., output_padding=..., padding=..., stride=..., bias=..., kernel_size=..., weight=..., self=...)
    at /home/ubuntu/download/pytorch/torch/lib/tmp_install/include/ATen/Functions.h:2174
#4  torch::autograd::compute_output (input=..., weight=..., bias=..., columns=..., ones=..., params=...) at torch/csrc/autograd/functions/convolution.cpp:765
#5  0x00007fffede836eb in torch::autograd::ConvForward::apply (this=0x555557285700, inputs=...) at torch/csrc/autograd/functions/convolution.cpp:335
#6  0x00007fffedd2cf58 in torch::autograd::Function::operator() (inputs=..., this=0x555557285700) at /home/ubuntu/download/pytorch/torch/csrc/autograd/function.h:87
#7  torch::autograd::(anonymous namespace)::THPCppFunction_call (self=<optimized out>, args=<optimized out>, kwargs=<optimized out>) at torch/csrc/autograd/python_cpp_function.cpp:45
#8  0x000055555566054b in _PyObject_FastCallDict ()

Oh, when I try the tensor [1, 128, 2048, 2048] it worked properly.
Well, this error is not critical to me now.

Thank you.

What is the size of your input to conv_transpose2d_forward?

The code shouldn’t be segfaulting.

The size was [1, 128, 1248, 1712]. Not a square, but still I guess it should work.