KEMBAR78
[Profiler] Update README by sraikund16 · Pull Request #159816 · pytorch/pytorch · GitHub
Skip to content

Conversation

@sraikund16
Copy link
Contributor

Summary: Updated README with code structure and explanation of core features within profiler

Test Plan:
N/A

Rollback Plan:

Differential Revision: D79604189

@pytorch-bot
Copy link

pytorch-bot bot commented Aug 4, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/159816

Note: Links to docs will display an error until the docs builds have been completed.

✅ You can merge normally! (1 Unrelated Failure)

As of commit d7f242a with merge base 289f62c (image):

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

  • pull / linux-jammy-py3_9-clang9-xla / test (xla, 1, 1, linux.12xlarge, unstable) (gh) (#158876)
    /var/lib/jenkins/workspace/xla/torch_xla/csrc/runtime/BUILD:476:14: Compiling torch_xla/csrc/runtime/xla_util_test.cpp failed: (Exit 1): gcc failed: error executing CppCompile command (from target //torch_xla/csrc/runtime:xla_util_test) /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 229 arguments skipped)

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Aug 4, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D79604189

sraikund16 added a commit to sraikund16/pytorch that referenced this pull request Aug 5, 2025
Summary:

Updated README with code structure and explanation of core features within profiler

Test Plan:
N/A

Rollback Plan:

Differential Revision: D79604189
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D79604189

sraikund16 added a commit to sraikund16/pytorch that referenced this pull request Aug 5, 2025
Summary:

Updated README with code structure and explanation of core features within profiler

Test Plan:
N/A

Rollback Plan:

Differential Revision: D79604189
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D79604189

sraikund16 added a commit to sraikund16/pytorch that referenced this pull request Aug 5, 2025
Summary:
Pull Request resolved: pytorch#159816

Updated README with code structure and explanation of core features within profiler

Test Plan:
N/A

Rollback Plan:

Differential Revision: D79604189
@sraikund16 sraikund16 force-pushed the export-D79604189 branch 2 times, most recently from 3ee28e0 to 03b2dda Compare August 5, 2025 21:39
sraikund16 added a commit to sraikund16/pytorch that referenced this pull request Aug 5, 2025
Summary:

Updated README with code structure and explanation of core features within profiler

Test Plan:
N/A

Rollback Plan:

Differential Revision: D79604189
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D79604189

Copy link
Contributor

@sanrise sanrise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Pretty informative even for someone who works on the profiler.

When a trace begins, the autograd/profiler backend calls into `profiler_kineto.cpp` to prepare, start, or stop collection. At the start of tracing, the `onFunctionEnter` and `onFunctionExit` callbacks defined in `profiler_kineto.cpp` are registered.

Callback registration can be either global or local, depending on the `ExperimentalConfig` used:
- **Global:** The callback is registered to all threads throughout execution.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give an example of when the profiler would need to use global callback in ExperimentalConfig. The thread local callback makes sense to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking of adding this to a tutorial instead so I can add some visuals to the difference?

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Aug 6, 2025
Summary:

Updated README with code structure and explanation of core features within profiler

Test Plan:
N/A

Rollback Plan:

Reviewed By: aaronenyeshi

Differential Revision: D79604189
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D79604189

@facebook-github-bot
Copy link
Contributor

@pytorchbot merge

(Initiating merge automatically since Phabricator Diff has merged)

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

markc-614 pushed a commit to markc-614/pytorch that referenced this pull request Sep 17, 2025
Summary: Updated README with code structure and explanation of core features within profiler

Test Plan:
N/A

Rollback Plan:

Differential Revision: D79604189

Pull Request resolved: pytorch#159816
Approved by: https://github.com/sanrise, https://github.com/aaronenyeshi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request fb-exported Merged topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants