Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for extracting and returning query, key, and value strides from the event arguments in both the performance report generator and the flash attention model.
- Extract
Input Strides, convert each to a tuple, and include them in the returned parameter dict ingenerate_perf_report_megatron_lm.py. - Unpack and include
q_stride,k_stride, andv_strideinflash_attention.get_param_detailswithinperf_model.py.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| examples/custom_workflows/generate_perf_report_megatron_lm.py | Added logic to slice, tuple-convert, and return q/k/v strides |
| TraceLens/PerfModel/perf_model.py | Introduced q/k/v stride extraction and added them to the params |
Comments suppressed due to low confidence (3)
examples/custom_workflows/generate_perf_report_megatron_lm.py:33
- [nitpick] The variable names use plural
q_strides,k_strides,v_stridesbut inperf_model.pyyou use singular (q_stride). Consider unifying the naming convention across modules for consistency.
q_strides, k_strides, v_strides = strides[q_idx: q_idx+3]
TraceLens/PerfModel/perf_model.py:853
- [nitpick] You already unpacked
k_shapeabove; consider usingk_shapehere (e.g._, N_KV, H_KV, _ = k_shape) to avoid mixing direct indexing with named variables.
_, N_KV, H_KV, _ = input_dims[1]
examples/custom_workflows/generate_perf_report_megatron_lm.py:32
- New behavior for extracting
Input Stridesis introduced; ensure you add or update tests to cover these stride values and their conversion to tuples.
strides = event['args']['Input Strides']
lauri9
pushed a commit
that referenced
this pull request
Jun 11, 2025
This PR adds support for extracting and returning query, key, and value strides from the event arguments in both the performance report generator and the flash attention model.
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.