You can run gdb python. Then enter r when gdb is started. You then get into your python shell. From there you can call import torch. When it segfaults and control returns to gdb, enter bt to get the stacktrace.
Also make sure to uninstall all pytorch install (pip uninstall torch multiple times) before installing. Having partial installations lingering can cause problems when an old library is used instead of the new one.