mlcommons / mlcommons/chakra

Incorrect JSON format during Pytorch Execution Trace generation

Open
#166 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
196
Forks
84
PR merge metrics
No merged PRs in 30d

Description

Bug Description

I am running a distributed Linear model (20 parameters) across 2 GPU Nodes, each node having 2 NVIDIA H100 NVL GPUs. The Model uses DDP parallelization strategy. I am generating the Pytorch ET (in json format) trace using the ExecutionTraceObserver() as mentioned in the instructions. I observe that the trace has many syntactical errors. Also, many nodes have incomplete data (images attached)
I tried this with the latest Pytorch version (2.5.0) as well but encountered the same problem.

Steps to Reproduce

Code used for distributed training: https://github.com/pytorch/examples/tree/main/distributed/ddp-tutorial-series
Command to run across both nodes:
torchrun --nproc_per_node=2 --nnodes=2 --node_rank=0 --rdzv_id=456 --rdzv-backend=c10d --rdzv_endpoint=<ip:port> <code>.py <no. of epochs> <epochs after which result will be saved>
I am capturing the ET trace for one epoch.

Information for one GPU Node (Both nodes have the same configuration):
Pytorch: 2.1.2 , 2.5.1 (tried both)
OS: Linux
Kernel version: 5.15.0-124-generic
Ubuntu Version: Ubuntu 22.04.5
No. of CPUs : 64
CPU Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
CPU Address sizes: 52 bits physical, 57 bits virtual
CPU Byte Order: Little Endian
Memory: 503Gi
No. of GPUs: 2
GPU Memory (each GPU): 95830MiB

I would be obliged if someone could help in this regard.

Screenshots

incomplete_output1
incomplete_output2
incomplete_output3
syntactical_error1
syntactical_error2
syntactical_error3
syntactical_error4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the report with the distributed DDP tutorial and the provided torchrun command across two nodes, using ExecutionTraceObserver() for one epoch. Inspect the generated JSON for syntax errors and incomplete node data, then compare behavior across the reported PyTorch versions. Done means the generated trace is valid JSON and contains complete data for the distributed execution.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
distributed-systems, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.