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

[CodeCamp #29] Add profiler hook functionality #768

Merged
merged 41 commits into from Dec 27, 2022

Conversation

BayMaxBHL
Copy link
Contributor

Motivation

Migrate the profiler hook of mmcv to mmengine.

Modification

Migrate the profiler hook of mmcv to mmengine:
Some modifications were made to the comments.
Split out the _parse_on_trace_ready method to make the code more readable.

A simple test file was written with the following features:
profiler hooks are generated with default options.
profiler hooks that use log printing.
profiler hooks saved using json.
Use tensorboard's profiler hook.

mmengine/hooks/profiler_hook.py Outdated Show resolved Hide resolved
mmengine/hooks/profiler_hook.py Outdated Show resolved Hide resolved
mmengine/hooks/profiler_hook.py Outdated Show resolved Hide resolved
mmengine/hooks/profiler_hook.py Outdated Show resolved Hide resolved
mmengine/hooks/profiler_hook.py Show resolved Hide resolved
mmengine/hooks/profiler_hook.py Outdated Show resolved Hide resolved
@zhouzaida zhouzaida linked an issue Nov 28, 2022 that may be closed by this pull request
@BayMaxBHL
Copy link
Contributor Author

1670052120585

mmengine/hooks/__init__.py Show resolved Hide resolved
tests/test_hooks/test_profiler_hook.py Outdated Show resolved Hide resolved
mmengine/hooks/profiler_hook.py Outdated Show resolved Hide resolved
mmengine/hooks/profiler_hook.py Outdated Show resolved Hide resolved
mmengine/hooks/profiler_hook.py Outdated Show resolved Hide resolved
mmengine/hooks/profiler_hook.py Outdated Show resolved Hide resolved
mmengine/hooks/profiler_hook.py Outdated Show resolved Hide resolved
tests/test_hooks/test_profiler_hook.py Outdated Show resolved Hide resolved
tests/test_hooks/test_profiler_hook.py Outdated Show resolved Hide resolved
mmengine/hooks/profiler_hook.py Show resolved Hide resolved
@HAOCHENYE
Copy link
Collaborator

We should also update api.rst in docs/en/api/hooks.rst and docs/zh_cn/api/hooks.rst

@zhouzaida zhouzaida changed the title [Feature] Add profiler hook functionality [CodeCampe #29] Add profiler hook functionality Dec 4, 2022
@HAOCHENYE HAOCHENYE added this to the 0.4.0 milestone Dec 16, 2022
@BayMaxBHL
Copy link
Contributor Author

image

zhouzaida
zhouzaida previously approved these changes Dec 27, 2022
@zhouzaida zhouzaida changed the title [CodeCampe #29] Add profiler hook functionality [CodeCamp #29] Add profiler hook functionality Dec 27, 2022
mmengine/hooks/profiler_hook.py Outdated Show resolved Hide resolved
mmengine/hooks/profiler_hook.py Outdated Show resolved Hide resolved
@zhouzaida zhouzaida merged commit 16589ce into open-mmlab:main Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] PyTorch Profiler With TensorBoard
4 participants