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

Is it possible to categorize the kernels befween forward and backward passes #206

Open
mpashkovskiy opened this issue Nov 29, 2024 · 1 comment
Labels
help wanted Extra attention is needed needs triage question Further information is requested

Comments

@mpashkovskiy
Copy link

What is your question?

Thanks for the great library!

analyzer.get_gpu_kernel_breakdown(visualize=True) returns a dataframe with kernels statistics. Is it possible to split those between forward/backward categories?

Code

No response

What have you tried?

No response

Environment

No response

@mpashkovskiy mpashkovskiy added help wanted Extra attention is needed needs triage question Further information is requested labels Nov 29, 2024
@briancoutinho
Copy link
Contributor

Added a feature that should help with getting this kind of breakdown.
#213
It is not as polished as aggregating a breakdown right now, it returns all the kernel for one. But you can then aggregate over that returned dataframe.

facebook-github-bot pushed a commit that referenced this issue Feb 6, 2025
Summary:
## What does this PR do?
Adds a trace analysis method to get GPU kernel breakdown by user annotation range.
Addresses #206 #180

## Example notebook

[
![Screenshot 2025-01-30 at 6 20 53 PM](https://github.com/user-attachments/assets/b30310f2-ce80-4ce3-ac1c-ad789b6ada65)
![Screenshot 2025-01-30 at 6 20 46 PM](https://github.com/user-attachments/assets/03716fb8-fa7a-4b20-8d8d-d63331c80bdb)
](url)

## Tests
Testplan:

```
pytest tests/test_trace_analysis.py -k test_get_gpu_kernels_with_user_annotations
pytest tests/test_trace_utils.py -k test_shorten_name
```

## Before submitting

- [y] Was this discussed/approved via a Github issue? (no need for typos, doc improvements)
  - [ ] N/A
- [y] Did you write any new necessary tests?
  - [ ] N/A
- [y] Did you make sure to update the docs?
  - [ ] N/A
- [y] Did you update the [changelog](https://github.com/facebookresearch/HolisticTraceAnalysis/blob/main/CHANGELOG.md)?
  - [ ] N/A

Pull Request resolved: #213

Reviewed By: fengxizhou

Differential Revision: D68976810

Pulled By: briancoutinho

fbshipit-source-id: 9e71bd35d69cbb1906928e9b90cce389843ae28e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed needs triage question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants