Segmentation fault when training, GDB catch event in PyLong_AsLongLongAndOverflow()

Update:
I have located the original problem in my project, which occurs in this line:

temp = torch.cuda.IntTensor(B, N)

where B=1 is a python int type, N=1024 is np.int32 (such as got by numpy array A[0]).

The segmentation fault happened randomly and I cannot reproduce it by several line codes, which can be fixed by converting the second argument N to the standard int type of python.
My pytorch version is “1.0.0a0+76ab26c”.
Hope it helpful for the update of pytorch, and can you tell me what happens here?
Thanks very much.

@ptrblck @apaszke