Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR reorganizes example workflows by adding a new Jupyter Notebook that demonstrates how to use the TreePerfAnalyzer for fusion opportunity analysis.
- Adds a new notebook with multiple code cells showcasing helper functions and event analysis
- Introduces functions to navigate GPU event hierarchies and summarize their information
| " print(next_evt['name'])\n", | ||
| " summarize_gpu_events_for_host_op(perf_analyzer, next_evt)\n", | ||
| " gpu_events = [perf_analyzer.tree.get_UID2event(uid) for uid in next_evt.get('gpu_events')]\n", | ||
| " if 'elementwise' in gpu_events[0]['name']:\n", |
There was a problem hiding this comment.
Consider adding a check to ensure that the 'gpu_events' list is not empty before accessing the first element to avoid a potential IndexError.
Suggested change
| " if 'elementwise' in gpu_events[0]['name']:\n", | |
| " if not gpu_events:\n", | |
| " print('No GPU events found for the next host op. Skipping...')\n", | |
| " elif 'elementwise' in gpu_events[0]['name']:\n", |
| "id": "1dbf8b45-81fb-44b7-af6f-f1e10e13a7b4", | ||
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ |
There was a problem hiding this comment.
[nitpick] Clarify in a comment that this file path is a placeholder for demonstration purposes and should be replaced with an actual profile file path for production use.
Suggested change
| "source": [ | |
| "source": [ | |
| "# Note: This is a placeholder file path for demonstration purposes.\n", | |
| "# Replace '/path/to/profile.json' with the actual profile file path in production.\n", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.