vtune-xpu-offload
Run and interpret Intel VTune Profiler xpu-offload analysis (formerly gpu-offload): whether time goes to the host, to CPU-GPU transfers, or to the device…
от intel★ 54 звезды на GitHub
Установить vtune-xpu-offload в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
VTune XPU Offload
The first GPU-side analysis. It answers a single structural question: is the time going to the host, to data transfer, or to the device? Only after that is it worth looking inside kernels.
- Knobs, reports, transfer/queue recipes:
references/knobs-and-reports.md - Checked against VTune 2026.6 on Arc Pro B70 in an A/B test with and without this skill. Run plain
vtunecommands; check knob and report names withvtune -help collect xpu-offloadandvtune -help report <name>.
1. When to use
- Any application that offloads to an Intel GPU or accelerator and is slower than expected.
- SYCL / DPC++ / OpenCL / Level Zero / OpenMP target / oneAPI codes.
- PyTorch, IPEX, or vLLM on XPU where GPU utilization is unknown or low.
- The user asks whether the GPU is being kept busy, or whether transfers dominate.
performance-snapshotorhpc-performanceshowed GPU activity worth pursuing.
Do not use it when:
- You already know the device is busy and the kernels themselves are slow →
vtune-gpu-hotspots. - There is no accelerator in the picture.
- The host side is the obvious limit and no device work exists → a CPU profile
(
vtune -collect hotspots).
2. Version and tooling notes — read before building a command
Traps, verified on VTune 2026.4 and 2026.6:
-collect gpu-offloadno longer exists. It was renamed. Running it fails: usexpu-offload.-collect npuno longer exists. The error message suggestsxpu-offload -knob profile-npu=true, but that knob does not exist on 2026.4 or 2026.6 (Cannot find knob profile-npu). Do not paste it into a command. Checkvtune -help collect xpu-offloadon the installed version before promising NPU profiling.- The profiled run is slower than the real one, and only on the host side. Tracing
adds host time to every kernel launch. On a PyTorch decode step with ~245 small
kernels the step went from 4.26 ms to 7.83 ms under xpu-offload, so the GPU looked
44% busy while it is 81% busy without VTune. Always time the same work once
without VTune (wall clock or
torch.xpu.synchronize()around the region) and use that time in every busy % and speed-up estimate (§7).
Use an absolute, descriptive result directory, and never reuse an existing one.
3. Preconditions
- Intel GPU with a working driver stack; GPU metrics need the i915/Xe driver and, on
Linux, appropriate access to the device. Verify with
vtune-self-checker.sh(in the VTunebin64folder). - GPU metrics may require permission setup (membership in the
render/videogroup,dev.i915.perf_stream_paranoid=0on i915 ordev.xe.observation_paranoid=0on xe — check the self-checker output before assuming a driver bug). - Level Zero or OpenCL runtime present for API-level tracing.
- Build with device symbols / debug info if you want kernel source attribution later.
- For frameworks (PyTorch XPU, vLLM), know which device the work should land on and confirm it is not silently falling back to CPU — that is a frequent "GPU is slow" root cause that needs no profiler.
4. Collect
# Standard offload pass
vtune -collect xpu-offload -r <dir> -- ./sycl_app
# Add host-side CPU sampling to see what the host is doing while the GPU waits
vtune -collect xpu-offload -knob collect-cpu-sampling=true -r <dir> -- ./sycl_app
# Host stacks for kernel-submission attribution
vtune -collect xpu-offload -knob collect-cpu-sampling=true \
-knob enable-stack-collection=true -r <dir> -- ./sycl_app
# Host call stack of each GPU task and copy (2026.6)
vtune -collect xpu-offload -knob enable-tasks-stack-collection=true -r <dir> -- ./app
# Add host memory bandwidth (needs VTune's sampling driver; without it the collection
# fails: "Failed to connect to PMU reservation service (PAX)" — load it with insmod-sep)
vtune -collect xpu-offload -knob collect-memory-bandwidth=true -r <dir> -- ./app
# ITT-instrumented phases only (framework or user tasks)
vtune -collect xpu-offload -knob enable-user-tasks=true -r <dir> -- ./app
# Narrow to the steady-state region of a long inference/training run
vtune -collect xpu-offload -start-paused -r <dir> -- ./app
# then: vtune -command resume -r <dir> ... vtune -command stop -r <dir>
5. Knobs (VTune 2026.6 — re-verify with vtune -help collect xpu-offload)
| Knob | Default | Values | When to change it |
|---|---|---|---|
collect-cpu-sampling |
false |
true, false |
true when the GPU is idle and you need to know what the host is doing |
enable-stack-collection |
false |
true, false |
true to attribute kernel submissions and transfers to host call sites |
enable-tasks-stack-collection |
false |
true, false |
true to see the host call stack behind each GPU task and copy |
collect-memory-bandwidth |
false |
true, false |
true when host↔device transfers are large; needs VTune's sampling driver (PAX) |
| `collect |
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/knobs-and-reports.md
FAQ
Что делает скилл vtune-xpu-offload?
Run and interpret Intel VTune Profiler xpu-offload analysis (formerly gpu-offload): whether time goes to the host, to CPU-GPU transfers, or to the device, with GPU busy computed against un-profiled timing, per phase. Covers compute-task counts and duration, transfer size and time, kernel launch and sync overhead, for SYCL, OpenCL, Level Zero, OpenMP offload and PyTorch XPU. Use when the user wants VTune to find whether the GPU, the CPU or data copies are the bottleneck, as the first VTune GPU analysis. Triggers on: vtune xpu-offload, -collect xpu-offload, gpu-offload, VTune GPU utilization, host to device transfer in VTune, kernel launch overhead. For torch.profiler use torch-xpu-profile; inside a kernel use vtune-gpu-hotspots; vLLM servers use vtune-vllm.
Как установить скилл vtune-xpu-offload?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл vtune-xpu-offload запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…