Skip to content

[Wait for #3118][PROFILE] Implement new feature for profiler #3114

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SeoHyungjun
Copy link
Member

@SeoHyungjun SeoHyungjun commented Apr 14, 2025

Modified to save memory load/unload time and execution order.
Added functionality to record inference start/end times for neural networks.

To visualize the timeline, the profile option must be enabled.
Additionally, if you agree to create a log file during execution, a file named "visualization_log_%d-%02d-%02d_%02d-%02d.log" will be generated.
This log file can be used for visualization.The timeline generated using Plotly is displayed in HTML format.

cd nntrainer/utils
python3 timeline_visualization.py <file_path>

Signed-off-by: SeoHyungjun [email protected]

Self evaluation:

  1. Build test: [ ]Passed [ ]Failed [*]Skipped
  2. Run test: [ ]Passed [ ]Failed [*]Skipped

Add new macros for profiling memory mapping and annotation with
execution order.

- Added `PROFILE_MMAP` and `PROFILE_MUNMAP` macros to track memory
mapping and unmapping events.
- Added `PROFILE_MEM_ANNOTATE_START` and `PROFILE_MEM_ANNOTATE_END`
macros to annotate memory events with execution order.
- Updated `ProfileEventData` struct to include additional fields for
execution order and index.
- Modified `Profiler` class to handle the new events and annotations.

Signed-off-by: SeoHyungjun <[email protected]>
Modified to save memory load/unload time and execution order.
Added functionality to record inference start/end times for neural
networks.

To visualize the timeline, the profile option must be enabled.
Additionally, if you agree to create a log file during execution,
a file named "visualization_log_%d-%02d-%02d_%02d-%02d.log" will
be generated. This log file can be used for visualization.
The timeline generated using Plotly is displayed in HTML format.

```console
cd nntrainer/utils
python3 timeline_visualization.py <file_path>
```

Signed-off-by: SeoHyungjun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant