Thanks @LeviViana,
I did not know that it would work. Looking at the call stack the execution was not anywhere near my model (it was inside torch.onnx in many calls). I took a look at the onnx code and found out where I could print the name of the current operation (even if symbolic), so I did that using gdb as I usually do.
In the end I found out a bug that is already registered at github.
Regards