8000 [DataPipe] Enable profiler record context in __next__ branch by NivekT · Pull Request #79757 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

[DataPipe] Enable profiler record context in __next__ branch #79757

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[DataPipe] Enable profiler record context in __next__ branch
[ghstack-poisoned]
  • Loading branch information
NivekT committed Jun 16, 2022
commit 03a9ef4bd3b5eb3ad3d7c9d6377bd6ee66345973
3 changes: 2 additions & 1 deletion torch/utils/data/datapipes/_hook_iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ def wrap_generator(*args, **kwargs):
@functools.wraps(next_func)
def wrap_next(*args, **kwargs):
if torch.autograd._profiler_enabled():
return next_func(*args, **kwargs)
with profiler_record_fn_context():
return next_func(*args, **kwargs)
else:
return next_func(*args, **kwargs)

Expand Down
0