Skip to content

Add profiling multimodal model step and fix the OOM bug when profilin… #1408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ChenTaoyu-SJTU
Copy link
Collaborator

What this PR does / why we need it?

This PR is to add the multimodal profile functionality. It also fixes the out-of-memory bug (using a solution that might be temporary).

The reason this approach is temporary is that on the CUDA platform in the upstream vLLM, the Qwen2.5 VL's ViT layers (i.e., the encoder layers) do not run out of memory even without adding @torch.inference_mode(). However, under the current PyTorch and Ascend hardware environment, during the forward propagation through the multiple blocks of the ViT (over 30 layers in total), the memory increases by approximately 1.2 GB per layer, which is unacceptable. Yet, after adding @torch.inference_mode(), this issue disappears, and the memory increase behavior becomes almost similar to the growth pattern observed on the CUDA platform. But the underlying cause currently remains unknown, need more research.

Does this PR introduce any user-facing change?

no

How was this patch tested?

By pass the CI

Copy link

codecov bot commented Jun 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 34.14%. Comparing base (c30ddb8) to head (e285e6c).
Report is 56 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1408      +/-   ##
==========================================
+ Coverage   27.39%   34.14%   +6.75%     
==========================================
  Files          56       63       +7     
  Lines        6191     7315    +1124     
==========================================
+ Hits         1696     2498     +802     
- Misses       4495     4817     +322     
Flag Coverage Δ
unittests 34.14% <ø> (+6.75%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ChenTaoyu-SJTU ChenTaoyu-SJTU added ready-for-test start test by label for PR vl-accuracy-test enable vl accuracy test for PR ready read for review labels Jun 24, 2025
@Yikun
Copy link
Collaborator

Yikun commented Jun 24, 2025

please do a rebase

@ChenTaoyu-SJTU ChenTaoyu-SJTU force-pushed the fix_multimodal_profile_OOM branch from 0d13396 to 4d92137 Compare June 25, 2025 01:12
@ChenTaoyu-SJTU ChenTaoyu-SJTU added ready read for review ready-for-test start test by label for PR vl-accuracy-test enable vl accuracy test for PR accuracy-test enable all accuracy test for PR and removed ready read for review ready-for-test start test by label for PR vl-accuracy-test enable vl accuracy test for PR labels Jun 25, 2025
@ChenTaoyu-SJTU
Copy link
Collaborator Author

need code review @Yikun @wangxiyuan @yiz-liu @shen-shanshan . By the way, why didn't the accuracy test trigger after I added the label?

@Yikun
Copy link
Collaborator

Yikun commented Jun 25, 2025

You should first add vl-accuracy-test and then label ready-for-test otherwise will trigger twice.

The previous job link:
https://github.com/vllm-project/vllm-ascend/actions/runs/15869325461

@github-actions github-actions bot added merge-conflicts and removed ready read for review labels Jun 25, 2025
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@shen-shanshan
Copy link
Collaborator

LGTM.

@ChenTaoyu-SJTU ChenTaoyu-SJTU force-pushed the fix_multimodal_profile_OOM branch 2 times, most recently from 292d018 to 4d89890 Compare June 25, 2025 11:08
@ChenTaoyu-SJTU ChenTaoyu-SJTU added ready read for review vl-accuracy-test enable vl accuracy test for PR ready-for-test start test by label for PR and removed accuracy-test enable all accuracy test for PR ready-for-test start test by label for PR vl-accuracy-test enable vl accuracy test for PR ready read for review labels Jun 25, 2025
@ChenTaoyu-SJTU ChenTaoyu-SJTU added ready read for review vl-accuracy-test enable vl accuracy test for PR ready-for-test start test by label for PR and removed vl-accuracy-test enable vl accuracy test for PR ready-for-test start test by label for PR labels Jun 26, 2025
@github-actions github-actions bot added merge-conflicts and removed ready read for review labels Jun 28, 2025
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

…g the multimodal model.

Signed-off-by: ChenTaoyu-SJTU <[email protected]>
@ChenTaoyu-SJTU ChenTaoyu-SJTU force-pushed the fix_multimodal_profile_OOM branch from afb3a20 to e285e6c Compare July 1, 2025 01:30
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