Bug: Incorrect cross-rank GPU attribution during multinode merged trace analysis, indefinite hangs
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- data, performance
Research direction
Start with add_gpu_ops_to_tree and its _get_graph_gpu_events lookup, using the merged PyTorch trace behavior described in the issue as the reproduction target. Compare the proposed changes in PR #577 and verify that GPU kernels are attributed to the correct rank without duplicate ancestor propagation or indefinite processing.
Written by the indexing model from the issue text.
Description
Problem
Engineers on my team were unable to use TraceLens to process merged trace files from multi-node workload runs.
Investigation
When PyTorch profiles a single rank, each GPU kernel launch is assigned a correlation ID unique within that session. When traces from K ranks are merged into one file, each rank's correlation IDs restart from the same numeric range, causing collisions. add_gpu_ops_to_tree uses these correlation IDs to link CPU runtime events to their GPU kernels, and was vulnerable to these collisions in two ways.
First, _get_graph_gpu_events looked up GPU kernels by correlation ID alone, so in a merged trace every graph launch event claimed kernels from all K ranks sharing that ID, producing incorrect attribution.
Second, the per-kernel ancestor walk had no mechanism to deduplicate GPU events that appeared as children of multiple runtime parents, causing $O(K^2 \times N_{gpu})$ complexity during propagation.
Together, these are causing issues such as incorrect cross-rank GPU attribution and indefinite hangs when processing merged trace files from PyTorch profiling of multi-node workloads.
Status
I have a PR open (#577) with a description of my fixes to address the issues my team was facing. With these changes, a large multi-node merged PyTorch trace file that previously ran indefinitely now runs in 235.9 seconds. However, I would like to encourage some discussion about my observations so that we can arrive at the best solution.
- Dominant language
- Python
- Stars
- 101
- Forks
- 34
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 78
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AMD-AGI/TraceLens
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
2 graph capture handling bugsPossibly taken @gabeweisz claimed this 1 day ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
All issues in AMD-AGI/TraceLens
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
comp/desktop P3 type/feature
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#154285 ·
Maintainers usually reply within 1 day
-
docs: qualify copied and custom kubectl debug policy notesPossibly taken @nym01 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
kubescape/cel-admission-library#166 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
SACGF/variantgrid#2804 · 1 comment ·
Maintainers usually reply within 1 day
-
[BUG] HTTP lifecycle dispatch treats a NO_PROXY-only environment as corporate egress and skips the resolve-and-pinned sessionPossibly taken @bodapatisaikrishna claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day