cpp_backtrace.py 457 B

1234567891011
  1. from torch._C import _get_cpp_backtrace
  2. def get_cpp_backtrace(frames_to_skip=0, maximum_number_of_frames=64) -> str:
  3. r"""
  4. Returns a string containing the C++ stack trace of the current thread.
  5. Args:
  6. frames_to_skip (int): the number of frames to skip from the top of the stack
  7. maximum_number_of_frames (int): the maximum number of frames to return
  8. """
  9. return _get_cpp_backtrace(frames_to_skip, maximum_number_of_frames)