Add TORCH_SHOW_CPP_STACKTRACES to Contributing.md (#64052)

Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/64052

Reviewed By: ezyang

Differential Revision: D31107779

Pulled By: Chillee

fbshipit-source-id: 2ad8ad40cd48e54fe711863c3c74df884a2e2de7
This commit is contained in:
Horace He 2021-09-22 22:51:44 -07:00 committed by Facebook GitHub Bot
parent 14949d2922
commit 7e7be526c9

View File

@ -33,6 +33,7 @@
- [Use pre-compiled headers](#use-pre-compiled-headers)
- [C++ frontend development tips](#c-frontend-development-tips)
- [GDB integration](#gdb-integration)
- [C++ stacktraces](#c-stacktraces)
- [CUDA development tips](#cuda-development-tips)
- [Windows development tips](#windows-development-tips)
- [Known MSVC (and MSVC with NVCC) bugs](#known-msvc-and-msvc-with-nvcc-bugs)
@ -891,6 +892,9 @@ which is in your home directory, **not** `/path/to/pytorch/.gdbinit`):
add-auto-load-safe-path /path/to/pytorch/.gdbinit
```
### C++ stacktraces
Set `TORCH_SHOW_CPP_STACKTRACES=1` to get the C++ stacktrace when an error occurs in Python.
## CUDA development tips
If you are working on the CUDA code, here are some useful CUDA debugging tips: