torch2trt icon indicating copy to clipboard operation
torch2trt copied to clipboard

Segmentation fault (core dumped)

Open fly520fly520 opened this issue 4 years ago • 4 comments

My Code :

create example data,

x = torch.ones((1, 3, 112, 112)).cuda()

model_trt_new = TRTModule()

model_trt_new.load_state_dict(torch.load('face_trt.pth'))
y_trt_new = model_trt_new(x)

This code can run normally, but when it is finished, I will get an error message as follows: Segmentation fault (core dumped) And create a core.xxx file I use gdb to open the core.xxx file and get the following information: Core was generated by `python'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f9105d527d8 in ?? ()

fly520fly520 avatar Dec 02 '20 06:12 fly520fly520

hello, i meet the same problem as you. code can run normally, but when it is finished, I will get an error message as follows: Segmentation fault Also the results is not match with the torch's output please give me some advice.

hmmlencat avatar Jul 27 '21 03:07 hmmlencat

I have same issue too.. please solve it..

comeeasy avatar Aug 12 '21 05:08 comeeasy

Hello!

I have the same problem as you guys. In my case it also happens when I import torch2trt library, regardless of what comes after. And actually the error varies a little bit, sometimes a Segmentation fault, but sometimes free(): invalid pointer or even munmap_chunk(): invalid pointer.

I hope someone can solve it.

PS: cuda 10.2, pythorch 1.1.0, tensorrt 7.0.0.11, torch2trt 0.3.0

Luizerko avatar Nov 30 '21 11:11 Luizerko

I have same issue too.

xinwangChen avatar Nov 17 '23 07:11 xinwangChen