I am working with a neural network that is supposed to recognize symmetries in images (using the MNIST dataset). Since it is implemented with PyTorch, I wanted to optimize the runtime on a GPU and used the profiler to analyze the current model. The tracing file provided by the profiler shows deep traceback calls for many operations, like this:
List of calls in the profiler in hierarchical order:
- built-in method matmul of type object
- aten::expand
- torch/fx/traceback.py(61): format_stack
- traceback.py(217): extract_stack
- traceback.py(372): extract
- traceback.py(394): _extract_from_extended_frame_gen
- built-in function getattr
- traceback.py(388): extended_frame_gen
- traceback.py(331): walk_stack
The profiler is implemented as follows:
prof = profile(activities=[ProfilerActivity.CPU, ProfilerActivity.CUDA],
profile_memory=True,
record_shapes=True,
with_flops=True,
with_stack=True,
schedule=schedule(skip_first=5, wait=5, warmup=5, active=2, repeat=1))
What could be the reasons for these deep traceback calls?
doppanator87 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.