Skip to content

[ci] feat: add profiling tests to vLLM ci#5215

Merged
wuxibin89 merged 13 commits intoverl-project:mainfrom
Gary-cjy:main
Mar 16, 2026
Merged

[ci] feat: add profiling tests to vLLM ci#5215
wuxibin89 merged 13 commits intoverl-project:mainfrom
Gary-cjy:main

Conversation

@Gary-cjy
Copy link
Contributor

@Gary-cjy Gary-cjy commented Feb 6, 2026

What does this PR do?

This PR integrates NPU profiling capabilities into the vLLM CI pipeline. It enables detailed performance monitoring for both the Actor and Reference components within the actor_rollout_ref module. By adding these profiling tests, we can capture execution traces, analyze hardware utilization (NPU/CPU), and identify performance bottlenecks during the CI process.

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, cfg, reward
    • 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

The changes have been tested by running the updated CI script on an Ascend NPU environment.

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.

@CLAassistant
Copy link

CLAassistant commented Feb 6, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ Gary-cjy
❌ ChenGary13


ChenGary13 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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 adds a shell script for a profiling test. I've found two critical issues in the script that will cause it to fail. One is the use of a placeholder path for saving results, which is not suitable for a CI environment. The other is a shell syntax error in a variable assignment. Both issues need to be fixed for the script to run correctly.

@tardis-key tardis-key marked this pull request as draft February 6, 2026 06:29
@tardis-key tardis-key changed the title Add a ci test shell [ci] feat: add profiling tests to vLLM ci Feb 6, 2026
@tardis-key tardis-key marked this pull request as ready for review February 9, 2026 02:56
@tardis-key
Copy link
Collaborator

@mengchengTang

@tardis-key
Copy link
Collaborator

tardis-key commented Feb 27, 2026

@wucong25 This CI script involves file writing and deletion. Please confirm the file read/write usage in the CI environment.

@tardis-key
Copy link
Collaborator

lgtm

global_profiler.steps=$PROFILE_STEPS \
global_profiler.save_path="$SAVE_PATH" $@

python3 "tests/utils/test_check_and_profiler_output.py" --profiler-dir="$SAVE_PATH"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you also help to enable profiler in GPU fsdp e2e test?

Copy link
Collaborator

Choose a reason for hiding this comment

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

+1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, We will perform the same verification on the GPU

@tardis-key
Copy link
Collaborator

In test_check_profiler_output, there is duplicate logic between NPU and GPU; please reuse it.


# Call corresponding check logic based on device type
if self.device_type == "gpu":
return self._check_gpu_profiler()
Copy link
Collaborator

Choose a reason for hiding this comment

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

There is still a large amount of duplicate code in these two functions. Their functionalities are almost identical, differing only in the part where numeric checks are performed. We should extract the common logic.

return False

# Check files in directory
for gpu_dir in dirs:
Copy link
Collaborator

Choose a reason for hiding this comment

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

if u expect len(dirs) == 1(line 51), there is no need to iterate over it. Unless u share common logic with npu.

for stage in self.TARGET_STAGES:
# Determine expected directory count for each stage
if stage == "*_rollout_*":
expected_count = 2
Copy link
Collaborator

Choose a reason for hiding this comment

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

This number came from a specific test scenario and lacks generalization. We can directly require that len >= 1 during rollout, and len == 1 in ref and actor_update


# Print debug information
for d in dirs:
print(f"[{stage}] Found: {d}")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unify your output method. Change it to logger.info

@tardis-key tardis-key marked this pull request as draft March 12, 2026 06:54
@tardis-key tardis-key marked this pull request as ready for review March 13, 2026 09:24
@wuxibin89 wuxibin89 merged commit 18f1a7a into verl-project:main Mar 16, 2026
22 of 38 checks passed
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.

5 participants