Skip to content

Support hipprof step profiling#1234

Open
lihongyang1990 wants to merge 9 commits into
flagos-ai:mainfrom
lihongyang1990:hipprof-step-profile
Open

Support hipprof step profiling#1234
lihongyang1990 wants to merge 9 commits into
flagos-ai:mainfrom
lihongyang1990:hipprof-step-profile

Conversation

@lihongyang1990

@lihongyang1990 lihongyang1990 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

PR Category

Train | Hardware | Tools

PR Types

New Features | Improvements

PR Description

Add hipprof session-based profiling support for training so DCU runs can use profile_step_start and profile_step_end to control the profiling
window.

Changes:

  • Add use_hipprof_profiler, hipprof_bin_path, and hipprof_session_id profiling options.
  • Start and stop hipprof sessions from the training loop at the configured profiling step boundaries.
  • Add a PYTHON_EXEC wrapper script that attaches hipprof to selected torchrun worker ranks and exports the session id for in-process start/stop
    control.

Validation:

  • pre-commit run --files flagscale/train/megatron/training/config/common_config.py flagscale/train/megatron/training/training.py tools/ profiling/hipprof_python_wrapper.sh
  • bash -n tools/profiling/hipprof_python_wrapper.sh

Runtime hipprof validation still needs to be run on the target DCU server.

@lihongyang1990 lihongyang1990 force-pushed the hipprof-step-profile branch from 41d0ff8 to 8e853d5 Compare July 9, 2026 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant