verl icon indicating copy to clipboard operation
verl copied to clipboard

[RFC] scheduling analysis based on profiling data

Open mayunaise opened this issue 9 months ago • 3 comments

Feature request

Image

A profiling tools capable of parsing raw profiling data generated by verl (e.g., JSON, nsys-rep) and generating visualized charts for rapid performance analysis of execution stages across different ranks.

Motivation

As verl transitions toward a fully asynchronous architecture (Async Mode) in #4207 traditional profiling methodologies are no longer sufficient, facing the following key challenges:

  • With the introduction of AgentLoop and independent Rollout processes, training and sampling are highly interleaved on the timeline.
  • Trace formats vary significantly across different hardware platforms (e.g., NVIDIA Nsight vs. Ascend). Requiring every developer to manually write custom analysis scripts results in massive redundancy and wasted engineering effort.

Building on top of this PR #4746 by @tardis-key

Support profiling Tools

  • [x] npu
  • mstx and framwork:https://github.com/verl-project/verl/pull/5248
  • [x] gpu
  • torch:https://github.com/verl-project/verl/pull/5367
  • nvtx:@Rhetee

Your contribution

Suggest or implement new features

mayunaise avatar Feb 28 '26 08:02 mayunaise

This profiling RFC addresses an important gap for async mode debugging. A few suggestions:

1. Unified Trace Format Consider defining a verl-specific trace format (JSON-based) that abstracts away hardware differences:

{
  "rank": 0,
  "timestamp_us": 1234567890,
  "event_type": "rollout_start",
  "duration_us": 50000,
  "metadata": {"batch_size": 16}
}

Converters for each hardware backend (nsys, mstx, torch.profiler) would emit this format.

2. Key Metrics to Track For async mode specifically:

  • Time between rollout completion and training start (staleness)
  • Rollout/training overlap ratio
  • Per-rank memory utilization over time
  • NCCL/HCCL communication time breakdown

3. Visualization Consider integrating with existing tools:

  • Chrome Trace Viewer (catapult) - already used by torch.profiler
  • Perfetto - more modern, better for large traces
  • TensorBoard profiler plugin

4. Integration with wandb/tensorboard Export key metrics to wandb/tensorboard for real-time monitoring during training.

Looking forward to the implementation!

Kirrito-k423 avatar Mar 17 '26 12:03 Kirrito-k423

I'm totally agree with you! We’re currently working on related efforts for very-project/rl-insight. A unified JSON file format and online monitor are both on our roadmap. We will take your suggestions into account in future implementations and invite you to try them out once ready @Kirrito-k423

tardis-key avatar Mar 17 '26 12:03 tardis-key

https://rl-insight.readthedocs.io/en/latest/cluster_analysis.html

tardis-key avatar Apr 07 '26 07:04 tardis-key