Skip to content

[XPU][UT] Fix OOM and skip graph case - #49287

Merged
jikunshang merged 8 commits into
vllm-project:mainfrom
mayuyuace:qiming/fix_oom
Aug 18, 2026
Merged

[XPU][UT] Fix OOM and skip graph case#49287
jikunshang merged 8 commits into
vllm-project:mainfrom
mayuyuace:qiming/fix_oom

Conversation

@mayuyuace

@mayuyuace mayuyuace commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Fix UT on XPU:

  1. test_mamba_cache_cg_padding can only run with graph enabled. Otherwise, UT will fall into an infinite loop.
  2. To address the issue of insufficient VRAM caused by consecutive use cases (where there is insufficient free memory upon engine startup), the approach is to reuse the existing ROCm VRAM waiting mechanism and provide an appropriate default gpu_memory_utilization for the XPU.

Signed-off-by: mayuyuace <qiming1.zhang@intel.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify mergify Bot added the intel-gpu Related to Intel GPU label Jul 21, 2026
@jikunshang

Copy link
Copy Markdown
Member

@chaojun-zhang for the second part, I feel you should already fix it.

@mayuyuace

Copy link
Copy Markdown
Contributor Author

@chaojun-zhang for the second part, I feel you should already fix it.

I tested the latest vllm, but problem is not fixed yet.

@mayuyuace mayuyuace closed this Aug 5, 2026
@mayuyuace
mayuyuace deleted the qiming/fix_oom branch August 5, 2026 06:32
@mayuyuace
mayuyuace restored the qiming/fix_oom branch August 5, 2026 06:33
@mayuyuace mayuyuace reopened this Aug 5, 2026
@jikunshang

Copy link
Copy Markdown
Member

cc @chaojun-zhang @zhenwei-intel can you take a look?

@zhenwei-intel

Copy link
Copy Markdown
Contributor

sycl graph cannot work with flash attn kernel

flash attn is supported by sycl graph in pytorch2.13

@mayuyuace

Copy link
Copy Markdown
Contributor Author

sycl graph cannot work with flash attn kernel

flash attn is supported by sycl graph in pytorch2.13

Thanks, I will try it with torch 2.13.

Signed-off-by: mayuyuace <qiming1.zhang@intel.com>
@mayuyuace

Copy link
Copy Markdown
Contributor Author

sycl graph cannot work with flash attn kernel

flash attn is supported by sycl graph in pytorch2.13

Verified.
Change the skip condition to if graph is disabled; otherwise, it will result in an infinite loop.

Comment thread tests/conftest.py Outdated
torch._dynamo.reset()
cleanup_dist_env_and_memory()
self._wait_for_rocm_memory_release(gpu_memory_utilization)
self._wait_for_xpu_memory_release(gpu_memory_utilization)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can merge _wait_for_rocm_memory_release and _wait_for_xpu_memory_release to single function _wait_for_memory_release

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Merged.

Comment thread tests/conftest.py Outdated
# previous engine shuts down, so wait before constructing LLM.
from tests.utils import wait_for_xpu_memory_to_settle

wait_for_xpu_memory_to_settle(threshold_ratio=1.0 - gpu_memory_utilization)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we merge wait_for_xpu_memory_to_settle and wait_for_rocm_memory_to_settle to single function wait_for_memory_to_settle ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Merged.

Signed-off-by: mayuyuace <qiming1.zhang@intel.com>
@mergify mergify Bot added multi-modality Related to multi-modality (#4194) mistral Related to Mistral models kv-connector labels Aug 13, 2026
@mergify

mergify Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @mayuyuace.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Aug 13, 2026
Signed-off-by: Qiming Zhang <qiming1.zhang@intel.com>
@mergify mergify Bot removed the needs-rebase label Aug 14, 2026
@jikunshang

Copy link
Copy Markdown
Member

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #84025 for commit cd874ca8aa02.

@mayuyuace

Copy link
Copy Markdown
Contributor Author

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #84131 for commit 9f3cc3befcb8.

@jikunshang

Copy link
Copy Markdown
Member

/ci retry

@github-actions

Copy link
Copy Markdown

✅ Queued 1 failed job(s) for retry in Buildkite CI #84131.

@jikunshang
jikunshang merged commit f4b161d into vllm-project:main Aug 18, 2026
69 checks passed
@mayuyuace
mayuyuace deleted the qiming/fix_oom branch August 20, 2026 07:13
zyp2014 pushed a commit to zyp2014/vllm that referenced this pull request Aug 21, 2026
Signed-off-by: mayuyuace <qiming1.zhang@intel.com>
Signed-off-by: Qiming Zhang <qiming1.zhang@intel.com>
Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
wyettzeng pushed a commit to wyettzeng/vllm that referenced this pull request Aug 21, 2026
Signed-off-by: mayuyuace <qiming1.zhang@intel.com>
Signed-off-by: Qiming Zhang <qiming1.zhang@intel.com>
Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
Signed-off-by: Wyett <wyettzeng@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

intel-gpu Related to Intel GPU kv-connector mistral Related to Mistral models multi-modality Related to multi-modality (#4194)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants