Gdb python very slow when debug pytorch C++ extensions?

I debugged pytorch C++ extension in source code by gdb python debgger. But when I run “import torch”, this command is very slow in gdb python. So how to make gdb faster when debugging source code?


There are a few possible reasons for this:

Hope this helps!

Thank you so much, i will have a try.

How to check dependencies’ symbols is cached properly or not? If not, how to cache or skip these symbols in pytorch build?

I think you would have to check with your version of gdb.
For me, this often happens when trying to load libc and the like which can take a bit to download. If you don’t see a downloading message from gdb though, it is most likely something else.

1 Like