Facing same layer name problem in torch-tensorrt compile function

Fateme_Bafghi: <p>Hello every one. I am trying to compile my traced model using torch-tensorrt; In my model I have some tensor.Long values so I had to turn truncate_long_and_double flag true. when compiling with this flag on, I get following error.</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/4/d/4df0c7ec36867ae5e61cd5cbfd8aef62dce2d22d.png" data-download-href="https://discuss.pytorch.org/uploads/default/4df0c7ec36867ae5e61cd5cbfd8aef62dce2d22d" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/4/d/4df0c7ec36867ae5e61cd5cbfd8aef62dce2d22d_2_690x173.png" alt="image" data-base62-sha1="b7uDqSXz2bubXVxAh1SHIJJe07X" width="690" height="173" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/4/d/4df0c7ec36867ae5e61cd5cbfd8aef62dce2d22d_2_690x173.png, https://discuss.pytorch.org/uploads/default/optimized/3X/4/d/4df0c7ec36867ae5e61cd5cbfd8aef62dce2d22d_2_1035x259.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/4/d/4df0c7ec36867ae5e61cd5cbfd8aef62dce2d22d_2_1380x346.png 2x" data-dominant-color="2F313C"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1869×469 83.2 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>I have even tried to dump my programm when compile function crashes by os.abort() but in gdb I don’t see a understandable bt.<br>
I do not know how I can fix the problem<br>
my model’s backbone is swinir</p>
<p>Thread 1 “python” received signal SIGABRT, Aborted.<br>
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140737350493120) at ./nptl/pthread_kill.c:44<br>
44      ./nptl/pthread_kill.c: No such file or directory.<br>
(gdb) bt<br>
<span class="hashtag-raw">#0</span>  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737350493120) at ./nptl/pthread_kill.c:44<br>
<span class="hashtag-raw">#1</span>  __pthread_kill_internal (signo=6, threadid=140737350493120) at ./nptl/pthread_kill.c:78<br>
<span class="hashtag-raw">#2</span>  __GI___pthread_kill (threadid=140737350493120, signo=signo@entry=6) at ./nptl/pthread_kill.c:89<br>
<span class="hashtag-raw">#3</span>  0x00007ffff7cc9476 in __GI_raise (sig=sig@entry=6) at …/sysdeps/posix/raise.c:26<br>
<span class="hashtag-raw">#4</span>  0x00007ffff7caf7f3 in __GI_abort () at ./stdlib/abort.c:79<br>
<span class="hashtag-raw">#5</span>  0x00005555555b4601 in os_abort_impl () at /opt/conda/conda-bld/python-split_1648465063888/work/Modules/posixmodule.c:11772<br>
<span class="hashtag-raw">#6</span>  os_abort (module=, _unused_ignored=) at /opt/conda/conda-bld/python-split_1648465063888/work/Modules/clinic/posixmodule.c.h:6893<br>
<span class="hashtag-raw">#7</span>  0x000055555568e01b in cfunction_vectorcall_NOARGS (func=0x7ffff6b27e00, args=, nargsf=, kwnames=) at /opt/conda/conda-bld/python-split_1648465063888/work/Objects/methodobject.c:463<br>
<span class="hashtag-raw">#8</span>  0x000055555572f923 in _PyObject_Vectorcall (kwnames=0x0, nargsf=, args=0x555607901ec0, callable=0x7ffff6b27e00) at /opt/conda/conda-bld/python-split_1648465063888/work/Include/cpython/abstract.h:127<br>
<span class="hashtag-raw">#9</span>  call_function (kwnames=0x0, oparg=, pp_stack=, tstate=0x5555558f3c10) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/ceval.c:4963<br>
<span class="hashtag-raw">#10</span> _PyEval_EvalFrameDefault (f=, throwflag=) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/ceval.c:3469<br>
<span class="hashtag-raw">#11</span> 0x0000555555720600 in PyEval_EvalFrameEx (throwflag=0, f=0x555607901c70) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/ceval.c:741<br>
<span class="hashtag-raw">#12</span> _PyEval_EvalCodeWithName (_co=, globals=, locals=, args=, argcount=, kwnames=0x7ffff69fb398, kwargs=0x555605f52548, kwcount=3, kwstep=1,<br>
defs=0x7fff102ee2c8, defcount=20, kwdefs=0x0, closure=0x0, name=0x7ffff6b58f30, qualname=0x7ffff6b58f30) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/ceval.c:4298<br>
<span class="hashtag-raw">#13</span> 0x0000555555721bc4 in _PyFunction_Vectorcall (func=, stack=0x555605f52540, nargsf=, kwnames=) at /opt/conda/conda-bld/python-split_1648465063888/work/Objects/call.c:436<br>
–Type  for more, q to quit, c to continue without paging–<br>
<span class="hashtag-raw">#14</span> 0x000055555572beb0 in _PyObject_Vectorcall (kwnames=0x7ffff69fb380, nargsf=, args=, callable=0x7fff102cbc10) at /opt/conda/conda-bld/python-split_1648465063888/work/Include/cpython/abstract.h:127<br>
<span class="hashtag-raw">#15</span> call_function (kwnames=0x7ffff69fb380, oparg=, pp_stack=, tstate=) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/ceval.c:4963<br>
<span class="hashtag-raw">#16</span> _PyEval_EvalFrameDefault (f=, throwflag=) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/ceval.c:3515<br>
<span class="hashtag-raw">#17</span> 0x00005555557217e7 in PyEval_EvalFrameEx (throwflag=0, f=0x555605f523b0) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/ceval.c:741<br>
<span class="hashtag-raw">#18</span> function_code_fastcall (globals=, nargs=, args=, co=) at /opt/conda/conda-bld/python-split_1648465063888/work/Objects/call.c:284<br>
<span class="hashtag-raw">#19</span> _PyFunction_Vectorcall (func=, stack=, nargsf=, kwnames=) at /opt/conda/conda-bld/python-split_1648465063888/work/Objects/call.c:411<br>
<span class="hashtag-raw">#20</span> 0x000055555572ae60 in _PyObject_Vectorcall (kwnames=0x0, nargsf=, args=0x7fff0355e378, callable=0x7fff035cc790) at /opt/conda/conda-bld/python-split_1648465063888/work/Include/cpython/abstract.h:127<br>
<span class="hashtag-raw">#21</span> call_function (kwnames=0x0, oparg=, pp_stack=, tstate=0x5555558f3c10) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/ceval.c:4963<br>
<span class="hashtag-raw">#22</span> _PyEval_EvalFrameDefault (f=, throwflag=) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/ceval.c:3486<br>
<span class="hashtag-raw">#23</span> 0x0000555555720600 in PyEval_EvalFrameEx (throwflag=0, f=0x7fff0355e1f0) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/ceval.c:741<br>
<span class="hashtag-raw">#24</span> _PyEval_EvalCodeWithName (_co=, globals=, locals=, args=, argcount=, kwnames=0x7fff102b7898, kwargs=0x7fff0371bf00, kwcount=1, kwstep=1,<br>
defs=0x7ffff6a52aa8, defcount=1, kwdefs=0x0, closure=0x0, name=0x7ffff6b8c530, qualname=0x7ffff69f9580) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/ceval.c:4298<br>
<span class="hashtag-raw">#25</span> 0x0000555555721bc4 in _PyFunction_Vectorcall (func=, stack=0x7fff0371bef0, nargsf=, kwnames=) at /opt/conda/conda-bld/python-split_1648465063888/work/Objects/call.c:436<br>
<span class="hashtag-raw">#26</span> 0x000055555570d7da in _PyObject_FastCallDict (kwargs=0x7fff0354fd40, nargsf=, args=0x7fffffffcfe0, callable=0x7fff035cc670) at /opt/conda/conda-bld/python-split_1648465063888/work/Objects/call.c:104<br>
<span class="hashtag-raw">#27</span> _PyObject_Call_Prepend (kwargs=0x7fff0354fd40, args=0x555555721630 &lt;_PyFunction_Vectorcall&gt;, obj=0x7fff0354fd40, callable=0x7fff035cc670) at /opt/conda/conda-bld/python-split_1648465063888/work/Objects/call.c:888<br>
<span class="hashtag-raw">#28</span> slot_tp_init (self=self@entry=0x7fff035c8550, args=args@entry=0x7fff102cf130, kwds=kwds@entry=0x7fff0354fd40) at /opt/conda/conda-bld/python-split_1648465063888/work/Objects/typeobject.c:6790<br>
<span class="hashtag-raw">#29</span> 0x0000555555684fa8 in type_call (kwds=0x7fff0354fd40, args=0x7fff102cf130, type=) at /opt/conda/conda-bld/python-split_1648465063888/work/Objects/typeobject.c:994<br>
<span class="hashtag-raw">#30</span> _PyObject_MakeTpCall (callable=0x55555a7c4340, args=, nargs=, keywords=) at /opt/conda/conda-bld/python-split_1648465063888/work/Objects/call.c:159<br>
<span class="hashtag-raw">#31</span> 0x000055555572fe0a in _PyObject_Vectorcall (kwnames=0x7ffff6a52970, nargsf=, args=, callable=0x55555a7c4340) at /opt/conda/conda-bld/python-split_1648465063888/work/Include/cpython/abstract.h:125<br>
<span class="hashtag-raw">#32</span> call_function (kwnames=0x7ffff6a52970, oparg=, pp_stack=, tstate=) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/ceval.c:4963<br>
<span class="hashtag-raw">#33</span> _PyEval_EvalFrameDefault (f=, throwflag=) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/ceval.c:3515<br>
<span class="hashtag-raw">#34</span> 0x00005555557217e7 in PyEval_EvalFrameEx (throwflag=0, f=0x7fff035555e0) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/ceval.c:741<br>
<span class="hashtag-raw">#35</span> function_code_fastcall (globals=, nargs=, args=, co=) at /opt/conda/conda-bld/python-split_1648465063888/work/Objects/call.c:284<br>
<span class="hashtag-raw">#36</span> _PyFunction_Vectorcall (func=, stack=, nargsf=, kwnames=) at /opt/conda/conda-bld/python-split_1648465063888/work/Objects/call.c:411<br>
<span class="hashtag-raw">#37</span> 0x000055555572b0bb in _PyObject_Vectorcall (kwnames=0x0, nargsf=, args=0x7ffff6ad85b0, callable=0x7ffff69cd550) at /opt/conda/conda-bld/python-split_1648465063888/work/Include/cpython/abstract.h:127<br>
<span class="hashtag-raw">#38</span> call_function (kwnames=0x0, oparg=, pp_stack=, tstate=0x5555558f3c10) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/ceval.c:4963<br>
<span class="hashtag-raw">#39</span> _PyEval_EvalFrameDefault (f=, throwflag=) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/ceval.c:3500<br>
<span class="hashtag-raw">#40</span> 0x0000555555720600 in PyEval_EvalFrameEx (throwflag=0, f=0x7ffff6ad8440) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/ceval.c:741<br>
<span class="hashtag-raw">#41</span> _PyEval_EvalCodeWithName (_co=, globals=, locals=, args=, argcount=, kwnames=0x0, kwargs=0x0, kwcount=0, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0,<br>
closure=0x0, name=0x0, qualname=0x0) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/ceval.c:4298<br>
<span class="hashtag-raw">#42</span> 0x0000555555721eb3 in PyEval_EvalCodeEx (closure=0x0, kwdefs=0x0, defcount=0, defs=0x0, kwcount=0, kws=0x0, argcount=0, args=0x0, locals=, globals=, _co=)<br>
at /opt/conda/conda-bld/python-split_1648465063888/work/Python/ceval.c:4327<br>
<span class="hashtag-raw">#43</span> PyEval_EvalCode (co=, globals=, locals=) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/ceval.c:718<br>
<span class="hashtag-raw">#44</span> 0x0000555555796622 in run_eval_code_obj (co=0x7ffff69bdbe0, globals=0x7ffff6b17e40, locals=0x7ffff6b17e40) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/pythonrun.c:1166<br>
<span class="hashtag-raw">#45</span> 0x00005555557a71d2 in run_mod (mod=, filename=, globals=0x7ffff6b17e40, locals=0x7ffff6b17e40, flags=, arena=)<br>
at /opt/conda/conda-bld/python-split_1648465063888/work/Python/pythonrun.c:1188<br>
<span class="hashtag-raw">#46</span> 0x00005555557aa36b in pyrun_file (fp=0x55555592a800, filename=0x7ffff6a44db0, start=, globals=0x7ffff6b17e40, locals=0x7ffff6b17e40, closeit=1, flags=0x7fffffffd578)<br>
at /opt/conda/conda-bld/python-split_1648465063888/work/Python/pythonrun.c:1085<br>
<span class="hashtag-raw">#47</span> 0x00005555557aa54f in pyrun_simple_file (flags=0x7fffffffd578, closeit=1, filename=0x7ffff6a44db0, fp=0x55555592a800) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/pythonrun.c:439<br>
<span class="hashtag-raw">#48</span> PyRun_SimpleFileExFlags (fp=0x55555592a800, filename=, closeit=1, flags=0x7fffffffd578) at /opt/conda/conda-bld/python-split_1648465063888/work/Python/pythonrun.c:472<br>
<span class="hashtag-raw">#49</span> 0x00005555557aaa29 in pymain_run_file (cf=0x7fffffffd578, config=0x5555558f2e30) at /opt/conda/conda-bld/python-split_1648465063888/work/Modules/main.c:391<br>
<span class="hashtag-raw">#50</span> pymain_run_python (exitcode=0x7fffffffd570) at /opt/conda/conda-bld/python-split_1648465063888/work/Modules/main.c:616<br>
<span class="hashtag-raw">#51</span> Py_RunMain () at /opt/conda/conda-bld/python-split_1648465063888/work/Modules/main.c:695<br>
<span class="hashtag-raw">#52</span> 0x00005555557aac29 in Py_BytesMain (argc=, argv=) at /opt/conda/conda-bld/python-split_1648465063888/work/Modules/main.c:1127<br>
–Type  for more, q to quit, c to continue without paging–<br>
<span class="hashtag-raw">#53</span> 0x00007ffff7cb0d90 in __libc_start_call_main (main=main@entry=0x55555565bea0 , argc=argc@entry=2, argv=argv@entry=0x7fffffffd798) at …/sysdeps/nptl/libc_start_call_main.h:58<br>
<span class="hashtag-raw">#54</span> 0x00007ffff7cb0e40 in __libc_start_main_impl (main=0x55555565bea0 , argc=2, argv=0x7fffffffd798, init=, fini=, rtld_fini=, stack_end=0x7fffffffd788) at …/csu/libc-start.c:392<br>
<span class="hashtag-raw">#55</span> 0x000055555574dad7 in _start ()</p>

ptrblck: <p>Could you create an issue <a href="https://github.com/pytorch/TensorRT">here</a> with your description so the code owners could take a look at it, please?</p>

Fateme_Bafghi: <p>Yes. Thank you very much</p>