vtune-vllm
Intel VTune Profiler region-of-interest (ROI) profiling for vLLM serving on Intel GPUs (gpu-hotspots). Use when the user wants VTune on a vLLM or…
от intel★ 54 звезды на GitHub
Установить vtune-vllm в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
VTune Conditional Profiling for vLLM on Intel Xe GPU
Scope. This is the framework-specific skill for vLLM. It assumes the analysis type is already
gpu-hotspotsand answers how to aim it at an LLM server. For the analysis type itself (knobs, reports, metric thresholds) read../vtune-gpu-hotspots/SKILL.md; for deciding whether the bottleneck is on the device or the host,../vtune-xpu-offload/SKILL.md. Verify every knob and report flag against the installed VTune withvtune -help collect gpu-hotspotsandvtune -help report <name>before building a command — the versions noted below are what upstream validated, not what is installed here.
Prerequisite: VTune Profiler is a separate install. The oneAPI Base Toolkit alone (
/opt/intel/oneapi/withcompiler,mkl,pti, etc.) does NOT include VTune. Ifcommand -v vtunereturns nothing aftersource /opt/intel/oneapi/setvars.sh, install the VTune Profiler package separately (e.g.apt install intel-oneapi-vtuneor the standalone installer).run_vtune_vllm.shfails preflight with the same hint.Validated on
intel/vllm:0.17.0-xpu(vLLM 0.1.dev14456+gde3f7fe65, torch 2.10) with oneAPI 2025.3 base kit + VTune installed alongside. Verified againstintel/vllm:0.14.1-xpuat repo genesis; both v1 Worker paths hold. Re-checked onvllm/vllm-openai-xpu(vLLM 0.33.0, torch 2.14) with VTune 2026.6 on Arc Pro B70: section 0 and the notes marked "0.33" come from that test (an A/B test with and without this skill).
0. Read first: what decides whether the answer is right
These three points caused the wrong answers in our tests. Apply them before reading any number from a vLLM profile.
- vLLM's default mode hides the decode kernels. By default vLLM compiles the model
and replays each decode step as an XPU graph. VTune does not list the kernels inside a
graph replay. On Qwen3-8B the default-mode kernel table held 3.4 s of GPU time for
~1,000 decode steps; with graphs off it held 31 s. What remains visible (the lm_head
GEMM, the sampler, prefill GEMMs) is not the decode workload.
- For the kernel ranking, profile with graphs off:
--enforce-eager, or--compilation-config.cudagraph_mode=NONE(keeps torch.compile). Un-profiled, these run at the same speed as the default (256 vs 259 tok/s on Qwen3-8B, 8 at a time). - Never divide the default-mode kernel time by the window and call it "GPU busy".
The GPU engine time in
-report summary("GPU Time") still counts graph replays.
- For the kernel ranking, profile with graphs off:
- The profiled server is slower than the real one. gpu-hotspots added +39% per
output token with graphs off and +5% in default mode. Time every speed you report or
compare with un-profiled
vllm bench serveruns. A profiled eager run vs an un-profiled default run measures VTune, not eager mode. - GPU busy = GPU kernel time per decode step ÷ the un-profiled time per output token (TPOT). On Qwen3-8B: 29.7 ms of kernels per step vs 29.9 ms TPOT — the GPU is busy all the time and there are no host gaps to remove. Gaps seen in a profiled window are VTune's overhead unless they also show in un-profiled timing.
Decode on one GPU is normally memory-bound: bytes of weights read per step ÷ GEMM time per step is close to the DRAM peak (580 of 608 GB/s on B70). VTune's 1 ms sampled values for the same GEMMs (XVE Active ~5%, ~394 GB/s) are diluted — do not act on them without this bytes ÷ time check. Levers that move tokens/s then are fewer bytes per token (fp8 / int4 weights: +58% on B70) and more requests per step (batching: 3.2× from 8 to 32 at a time); kernel tuning has little headroom.
How to Use This Skill
- This file — architecture, cheat sheet reference, quick-start commands, workflow
references/validation-and-flow.md— annotated capture timeline, pre-flight + post-run verification checks (read this if you want to know why the ROI looks the way it does)references/itt-api.md— ITT API deep dive, C bindings, Python wrappersreferences/vllm-integration.md— All vLLM patch patterns (prefill, decode, per-request, middleware)references/troubleshooting.md— GPU timeline failures, ZE conflicts, sync issues, healthy-trace cheat sheet (§11)scripts/run_vtune_vllm.sh— the end-to-end launcher (preflight → paused collect → resume/pause window → finalize → CSV reports)scripts/serve_with_vtune.py— patched-server entry point;scripts/vtune_itt.py— the zero-dependency ctypes ITT wrapper
Layered skills. This skill owns ROI mechanics for a vLLM server only. Pair it with the
analysis-type skill (vtune-xpu-offload, then vtune-gpu-hotspots) for knobs and metric
bands. If the server runs in a container — the common deployment — see §3.6:
capabilities are fixed at docker run and cannot be added afterwards, and GPU metrics
need /dev/dri plus render-group membership inside the container.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/PROVENANCE.md
- references/commands-and-workflow.md
- references/itt-api.md
- references/troubleshooting.md
- references/validation-and-flow.md
- references/vllm-integration.md
- scripts/run_vtune_vllm.sh
- scripts/serve_with_vtune.py
- scripts/sitecustomize.py
- scripts/vtune_itt.py
FAQ
Что делает скилл vtune-vllm?
Intel VTune Profiler region-of-interest (ROI) profiling for vLLM serving on Intel GPUs (gpu-hotspots). Use when the user wants VTune on a vLLM or OpenAI-compatible LLM server: leaving model load, compile and warm-up out of the trace (vtune -start-paused, vtune -command resume/pause, ITT), decode or prefill windows, patching Worker.execute_model in the spawned EngineCore, vLLM XPU graphs hiding decode kernels, profiling overhead, VTune in a container, and headless kernel reports. Triggers on: profile vLLM with VTune, VTune ROI or decode-only profiling of a vLLM server, ittapi, ZE_ENABLE_TRACING_LAYER. For torch.profiler traces of a vLLM server use vllm-xpu-profile; not an LLM server: vtune-gpu-hotspots; device vs host split: vtune-xpu-offload.
Как установить скилл vtune-vllm?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл vtune-vllm запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
AnthropicUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
xlsx
AnthropicUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
pptx
AnthropicUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…