Skip to content

Conversation

@tardis-key
Copy link
Contributor

@tardis-key tardis-key commented Dec 10, 2025

What does this PR do?

Profiling in reinforcement learning generates a large volume of data, which impairs its ease of use. Based on optimization experience @mengchengTang , the default recommended parameters have been modified.
refer to https://www.hiascend.com/document/detail/zh/Pytorch/720/apiref/torchnpuCustomsapi/context/torch_npu-profiler-_ExperimentalConfig.md for detailed interface specifications.

The test results of tests/special_npu/run_qwen2_5_05b_grpo.sh are as follows:

  • Before modification + analysis=True: 12.8GB
  • Before modification + analysis=False: 3.25GB
  • After modification + analysis=True: 3.48GB
  • After modification + analysis=False: 1.92GB

Checklist Before Starting

  • Search for similar PRs. Paste at least one query link here: ...
  • Format the PR title as [{modules}] {type}: {description} (This will be checked by the CI)
    • {modules} include fsdp, megatron, sglang, vllm, rollout, trainer, ci, training_utils, recipe, hardware, deployment, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckpt, doc, data
    • If this PR involves multiple modules, separate them with , like [megatron, fsdp, doc]
    • {type} is in feat, fix, refactor, chore, test
    • If this PR breaks any API (CLI arguments, config, function signature, etc.), add [BREAKING] to the beginning of the title.
    • Example: [BREAKING][fsdp, megatron] feat: dynamic batching

Test

For changes that can not be tested by CI (e.g., algorithm implementation, new model support), validate by experiment(s) and show results like training curve plots, evaluation results, etc.

API and Usage Example

Demonstrate how the API changes if any, and provide usage example(s) if possible.

# Add code snippet or script demonstrating how to use this

Design & Code Changes

Demonstrate the high-level design if this PR is complex, and list the specific changes.

Checklist Before Submitting

Important

Please check all the following items before requesting a review, otherwise the reviewer might deprioritize this PR for review.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request aims to reduce the data volume from the NPU profiler by changing the default profiling level from level1 to level0. The changes are consistently applied across various configuration files, examples, and the default configuration object. Additionally, the profiler configuration is updated to exclude communication data and switch to a database export format, which should further improve performance. I have one critical suggestion to improve the robustness of a runtime dependency check.

@tardis-key tardis-key changed the title [perf] fix: modify the NPU profiler configuration to reduce data volume. [perf] fix: modify the NPU profiler default configuration Dec 10, 2025
@tardis-key tardis-key force-pushed the profiler_simplification branch from 248e80b to a79a55e Compare December 10, 2025 07:56
@tardis-key tardis-key changed the title [perf] fix: modify the NPU profiler default configuration [WIP][perf] fix: modify the NPU profiler default configuration Dec 10, 2025
@tardis-key tardis-key marked this pull request as draft December 10, 2025 07:58
@tardis-key tardis-key marked this pull request as ready for review December 10, 2025 08:07
@tardis-key tardis-key changed the title [WIP][perf] fix: modify the NPU profiler default configuration [perf] fix: modify the NPU profiler default configuration Dec 10, 2025
@tardis-key tardis-key force-pushed the profiler_simplification branch 2 times, most recently from 9cfefff to 6a659fe Compare December 15, 2025 09:04
@CLAassistant
Copy link

CLAassistant commented Dec 16, 2025

CLA assistant check
All committers have signed the CLA.

@tardis-key tardis-key force-pushed the profiler_simplification branch from 6996701 to 9b101b8 Compare December 16, 2025 08:13
tardis-key and others added 3 commits December 18, 2025 20:09
1. Check torch_npu version instead of sig.parameters for better readability and troubleshooting
2. Delete aic_metrics since it's not necessary for level0
3. Recommend 'module' instead of 'stack'
@FightingZhen FightingZhen merged commit 71a6eb6 into volcengine:main Dec 19, 2025
70 checks passed
@tardis-key tardis-key deleted the profiler_simplification branch December 31, 2025 02:15
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.

4 participants