mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 21:49:24 +08:00
[profiler] add send/recv src/dst info (#111811)
Summary: There is an ask to add src/dst to nccl trace. This feels like the easiest way to do - adding it to metadata seems to require plumbing a few stacks so will be more work Test Plan: {F1128545195} Reviewed By: davidberard98 Differential Revision: D50560692 Pull Request resolved: https://github.com/pytorch/pytorch/pull/111811 Approved by: https://github.com/davidberard98, https://github.com/aaronenyeshi, https://github.com/fduwjj
This commit is contained in:
committed by
PyTorch MergeBot
parent
2c7c2b7827
commit
3080fd8383
@ -185,13 +185,17 @@ DEFAULT_TIMEOUT = 300
|
||||
CUSTOMIZED_TIMEOUT = {"test_DistributedDataParallel": 500}
|
||||
|
||||
|
||||
def get_profiling_event(postfix, profiler):
|
||||
def get_profiling_event(event_name, profiler):
|
||||
event_list = (
|
||||
profiler.events()
|
||||
if isinstance(profiler, torch.profiler.profile)
|
||||
else profiler.function_events
|
||||
)
|
||||
return [event for event in event_list if event.name.endswith(postfix)]
|
||||
return [
|
||||
event for event in event_list if (
|
||||
event.name.endswith(event_name) or event.name.startswith(event_name)
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
# Base error message substring on unfinished reductions.
|
||||
|
Reference in New Issue
Block a user