Skip to content
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

float8 profiling: save torch_logs, and attach them to profiling trace #645

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

vkuzo
Copy link
Contributor

@vkuzo vkuzo commented Aug 9, 2024

Summary:

Adds two extra things to benchmarks/float8/profile_linear_float8.py:

  1. for each profiling run, also saves the output of TORCH_LOGS="output_code"
  2. for each profiling trace, creates a modified trace with the inductor code from (1) attached to triton kernel GPU events, which enables the user to click on the triton kernels in chrome://tracing/ or perfetto, and see the triton code inline in the browser - no need to cross reference against logs anymore.

Screenshot 2024-08-09 at 10 25 27 AM

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Copy link

pytorch-bot bot commented Aug 9, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 226ef65 with merge base 433cd14 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 9, 2024
@vkuzo vkuzo requested review from drisspg and y-sq August 9, 2024 17:26
Copy link
Contributor

@y-sq y-sq left a comment

Choose a reason for hiding this comment

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

lgtm! Thanks for the changes, it will be very useful to view the triton kernels in the profiling trace.

Summary:

Adds two extra things to benchmarks/float8/profile_linear_float8.py:
1. for each profiling run, also saves the output of `TORCH_LOGS="output_code"`
2. for each profiling trace, creates a modified trace with the inductor
   code from (1) attached to triton kernel GPU events, which enables the
   user to click on the triton kernels in `chrome://tracing/` or
   perfetto, and see the triton code inline in the browser - no need to cross reference
   against logs anymore.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
@vkuzo vkuzo force-pushed the 20240809_f8_profile_update_trace branch from aef0176 to 226ef65 Compare August 9, 2024 22:54
@vkuzo vkuzo merged commit 9eef1ae into main Aug 12, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants