Skip to content

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

Draft
Gary-cjy wants to merge 4 commits intoverl-project:mainfrom
Gary-cjy:main
Draft

[ci] feat: add profiling tests to vLLM ci#5215
Gary-cjy wants to merge 4 commits intoverl-project:mainfrom
Gary-cjy:main

Conversation

@Gary-cjy
Copy link

@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
All committers have signed the CLA.

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.

MODEL_ID=${MODEL_ID:-Qwen/Qwen2.5-0.5B-Instruct}
MODEL_PATH=${MODEL_PATH:-${HOME}/.cache/models/${MODEL_ID}}

SAVE_PATH="your_path"
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

The SAVE_PATH is set to a placeholder "your_path". This is not a valid directory and will cause the script to fail, especially in a CI environment where such a path is unlikely to exist. Please use a valid, descriptive path for the output data.

Suggested change
SAVE_PATH="your_path"
SAVE_PATH="outputs/profile_qwen2_5_05b_grpo"


SAVE_PATH="your_path"
LEVEL="level1"
CONTENTS=['npu','cpu']
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

The assignment CONTENTS=['npu','cpu'] is invalid shell syntax. The shell will attempt to execute ['npu','cpu'] as a command and assign its output to the CONTENTS variable, which will fail. To assign the string representation of a list to the variable, the value must be enclosed in quotes.

Suggested change
CONTENTS=['npu','cpu']
CONTENTS="['npu','cpu']"

@tardis-key tardis-key marked this pull request as draft February 6, 2026 06:29
global_profiler.tool=npu \
global_profiler.steps=$PROFILE_STEPS \
global_profiler.save_path=$SAVE_PATH \
trainer.device=npu $@
Copy link
Collaborator

Choose a reason for hiding this comment

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

trainer.device is not required, device type can be obtained automatically

@tardis-key tardis-key changed the title Add a ci test shell [ci] feat: add profiling tests to vLLM ci Feb 6, 2026
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.

3 participants