Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

rocprof-compute-kernel-bottleneck

БесплатноБез исполняемых скриптовНе проверен

Profiles an AMD GPU application with rocprof-compute and finds which kernel is slow and why, using performance metrics and PC sampling. Collects counters and…

amdот amd★ 523 звезды на GitHub

Об этом скилле

Profile an AMD GPU application and find the kernel bottleneck

Start here for any "profile this" or "why is this kernel slow" request. This skill collects counters, narrows a workload down to one kernel, and identifies what limits it. Hand off to a focused skill once the limit is clear.

Run rocprof-compute profile --help and rocprof-compute analyze --help before choosing flags. Options change between releases; do not guess one.

Two sources of performance data

rocprof-compute collects from two independent sources, and they answer different questions. Choose by what the user is asking, not by difficulty.

Source Answers Skill
Perfmon counters How the architecture behaves: bandwidth, cache, occupancy, pipeline utilization this skill, then rocprof-compute-speed-of-light, rocprof-compute-memory, rocprof-compute-roofline
PC sampling How the source code behaves: which instruction or line is hot and why it stalls rocprof-compute-pc-sampling

Counters are the default starting point because they cover the whole kernel cheaply. Go straight to rocprof-compute-pc-sampling when the user asks about instructions, source lines, or stall reasons, and use both when an architectural limit needs to be traced back to the code that causes it.

Before you start

If command -v rocprof-compute finds the tool and rocprof-compute analyze --debug-verify-deps passes, skip this section. On ROCm 10.2, use --verify-deps instead of --debug-verify-deps.

Otherwise, check that ROCm and a GPU are present:

rocminfo
amd-smi list

If either command fails, ROCm is not installed or no GPU is visible. Stop and point the user to "Install the ROCm Core SDK" in the install guide. Installing rocprof-compute alone does not help.

Check the GPU against compatible accelerators. The table lists product families, so match the Marketing Name that rocminfo prints, and use the gfx name to confirm. If the GPU is not supported, stop and tell the user.

Then follow "Install the analyze mode dependencies" in the install guide, which installs rocprof-compute in a virtual environment of its own. Use the nightly index so the version matches these skills. Activate that environment with source <venv>/bin/activate before you run rocprof-compute, and confirm with rocprof-compute analyze --debug-verify-deps. If the application is a Python script, note the full path of its Python before you activate, and run the script with that path.

1. Check the environment

rocprof-compute --specs

It reports what the profiler detected, including ROCm Version, GPU Model, and GPU Arch. Not every feature works on every GPU. The docs for each feature say which GPUs support it. When rocprof-compute reports that a feature is not supported, tell the user, and do not work around it.

2. Collect what you need before profiling

Ask once:

  1. Launch command and arguments
  2. A short workload name, used as --name
  3. Which kernels matter, if not all

Profiling replays the application once per counter pass, so the command must be safe to run repeatedly and short enough to run several times. Ask for a reduced iteration count or problem size rather than profiling a long run. Do not invent a timeout; profile mode has no such option.

3. Profile

Start with Speed-of-Light for the kernels that matter:

rocprof-compute profile --name <workload_name> --speed-of-light -k <kernel_name> -- <application> <args>

On ROCm 10.2 and earlier, use -b sol instead of --speed-of-light.

Drop -k when the user has not named kernels. Once Speed-of-Light points at a limit, profile again with only the blocks section 5 opens, such as wavefront, spi, or cu_pipe.

Output lands in ./workloads/<workload_name>/<gpu_model>/, or <rank>/ under MPI. Change it with --output-directory, which replaces --name for building the path. Re-profiling into a non-empty directory needs --overwrite; prefer a fresh directory.

To restrict which GPU the application uses, set HIP_VISIBLE_DEVICES. Under Slurm, derive it from ROCR_VISIBLE_DEVICES, not from SLURM_STEP_GPUS; the indices differ.

See profile mode for output layout, filtering, and the full option list. To profile a process that is already running, see [live attach and detach](https://github.com/ROCm/rocm-systems/blob/d46f9b4416abca78eede7cbe8ed8c5670

Полный SKILL.md на GitHub

Установить rocprof-compute-kernel-bottleneck в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

.federated.jsonevals/evals.jsonevals/extended_evals.jsonevals/machine.ymlevals/samples/common.hevals/samples/occupancy.hipevals/samples/vcopy.cppevals/samples/vmem.hipskill-card.md

FAQ

Что делает скилл rocprof-compute-kernel-bottleneck?

Profiles an AMD GPU application with rocprof-compute and finds which kernel is slow and why, using performance metrics and PC sampling. Collects counters and selects kernels and dispatches, then analyzes GPU memory throughput, compute efficiency, wavefront occupancy and wavefront limits, scheduler stalls, etc. Use when the user asks to profile, benchmark, or speed up a HIP/ROCm kernel or application, or asks where a kernel's bottleneck is. Not for CUDA tools, Windows even when the user names rocprof-compute, system-wide CPU/MPI tracing, or writing kernel source.

Как установить скилл rocprof-compute-kernel-bottleneck?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл rocprof-compute-kernel-bottleneck запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить rocprof-compute-kernel-bottleneck с