Could you post the stack trace from gdb via:
$ gdb --args python my_script.py
...
Reading symbols from python...done.
(gdb) run
...
(gdb) backtrace
...

Also, could you post a reproducible code snippet (use random tensors as the inputs) as well as the PyTorch, CUDA, and cudnn versions you are using?