К основному содержанию
скилл CX Codex

rocprofiler-systems-discovering-profiling-options — скилл Claude Code

Скилл rocprofiler-systems-discovering-profiling-options для Claude Code подбирает команду для поиска настроек и возможностей профилирования ROCPROFSYS.

MIT 266 установок ★ 510 обновлён 2026-10-24

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add amd/skills --skill rocprofiler-systems-discovering-profiling-options -a claude-code
Открыть на GitHub

Что делает rocprofiler-systems-discovering-profiling-options

Скилл сопоставляет вопрос о настройках профилирования с командой rocprof-sys-avail или разделом справки rocprof-sys-run --help=<topic>. Он помогает найти переменные окружения, компоненты Timemory, аппаратные счётчики, домены API ROCm, метрики GPU и флаги командной строки. Короткий запрос — например, о доступных счётчиках — ведёт к соответствующему фильтру команды.

Для работы нужен установленный исполняемый файл rocprof-sys-avail, собранный вместе с rocprof-sys-run и rocprof-sys-sample. Если бинарник не находится через PATH, нужно выполнить source <install-prefix>/share/rocprofiler-systems/setup-env.sh. Скилл также показывает, как сохранить настройки в конфигурационный файл. Выбирать стартовый --preset для конкретной нагрузки он не помогает.

Какие задачи решает

  • найти доступные аппаратные счётчики на системе
  • перечислить домены API ROCm для трассировки
  • посмотреть параметры rocprof-sys-run для нужной темы
  • сохранить выбранные настройки профилирования в файл

Примеры запросов агенту

  • Какие аппаратные счётчики доступны на этой системе?
  • Какие домены API ROCm можно трассировать?
  • Как сохранить настройки профилирования между запусками?

Как установить rocprofiler-systems-discovering-profiling-options

1Через Skills CLI (Vercel)

npx skills add amd/skills --skill rocprofiler-systems-discovering-profiling-options -a claude-code

2Вручную: положить файлы

~/.claude/skills/rocprofiler-systems-discovering-profiling-options/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/rocprofiler-systems-discovering-profiling-options/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о rocprofiler-systems-discovering-profiling-options

Как установить rocprofiler-systems-discovering-profiling-options в Claude Code?

Выполните npx skills add amd/skills --skill rocprofiler-systems-discovering-profiling-options -a claude-code. Файл скилла находится по пути ~/.claude/skills/rocprofiler-systems-discovering-profiling-options/SKILL.md.

Что делает rocprofiler-systems-discovering-profiling-options?

Он подбирает команды rocprof-sys-avail и rocprof-sys-run --help=<topic> для поиска параметров, счётчиков, компонентов Timemory и возможностей трассировки. Для выбора стартового --preset он не предназначен.

Что нужно для работы rocprofiler-systems-discovering-profiling-options?

Нужен рабочий rocprof-sys-avail, установленный вместе с rocprof-sys-run и rocprof-sys-sample. Если бинарник не находится через PATH, загрузите окружение командой source <install-prefix>/share/rocprofiler-systems/setup-env.sh.

Исходный текст

SKILL.md · MIT
---
name: rocprofiler-systems-discovering-profiling-options
description: Answers questions about what rocprofiler-systems configuration options exist and how to use them — e.g. "what hardware counters are available on my system", "what ROCm APIs can I trace", "what settings control sampling/output", "how do I persist my configuration" — by mapping the question to the right `rocprof-sys-avail` or `rocprof-sys-run --help=<topic>` command. Use when the user wants to discover or explore ROCPROFSYS_* settings, Timemory components, hardware counters, ROCm API tracing domains, or GPU metrics, rather than apply them. Do NOT use this for picking a starting --preset for a workload — that's `choosing-a-profiling-preset`.
---

# Discovering Profiling Options

Maps a "what's available" or "how do I configure X" question to the exact
`rocprof-sys-avail` / `rocprof-sys-run --help=<topic>` command that answers it.
`rocprof-sys-avail` is self-updating and authoritative — prefer running it over
reciting static documentation.

## Prerequisites

A working `rocprof-sys-avail` binary, built/installed alongside
`rocprof-sys-run`/`rocprof-sys-sample`. If it is not on `PATH`, run
`source <install-prefix>/share/rocprofiler-systems/setup-env.sh` first.

## Discovery command reference

| User question | Command | Notes |
| --- | --- | --- |
| What settings/env vars exist, with descriptions? | `rocprof-sys-avail -S -bd` | `-b` suppresses the current-value/availability column, `-d` adds the description column |
| What hardware counters are available on my system? | `rocprof-sys-avail -H -bd -A` | `-A`/`--available` restricts to counters this machine can actually use; add `-c CPU` or `-c GPU` to split by device |
| What ROCm APIs can be traced? | `rocprof-sys-avail -bd -r ROCM_DOMAINS` | Regex-filters settings to the `ROCPROFSYS_ROCM_DOMAINS` row, listing every valid domain (`hip_runtime_api`, `hsa_api`, `kernel_dispatch`, `rccl_api`, `kfd_events`, ...) |
| What operations/API calls exist within one ROCm domain? | `rocprof-sys-avail --list-domains` then `rocprof-sys-avail --list-operations <domain>` | e.g. `--list-operations hip_runtime_api` lists individual HIP calls. Only domains printed by `--list-domains` are accepted: composites must be expanded (`hip_api` → `hip_runtime_api`, `hip_compiler_api`; `hsa_api` → `hsa_core_api`, `hsa_amd_ext_api`, `hsa_image_ext_api`, `hsa_finalize_ext_api`; `kfd_events` → the `kfd_*` domains; `roctx` → `marker_api`), and `kernel_dispatch` has no operation list |
| What Timemory components can I collect? | `rocprof-sys-avail -C -bd` | add `-A` to restrict to components usable on this build |
| What settings exist for one topic (tracing, sampling, output, ...)? | `rocprof-sys-avail --list-categories` then `rocprof-sys-avail -S -bd -c settings::<category>` | category names don't always match plain English — it's `settings::trace`, not `settings::tracing` — so always check `--list-categories` first |
| What GPU power/temp/utilization metrics can I sample? | `rocprof-sys-avail -bd -r AMD_SMI_METRICS` | surfaces `ROCPROFSYS_AMD_SMI_METRICS` choices (`busy, temp, power, mem_usage, ...`) |
| What CLI flags does `rocprof-sys-run` have for topic X? | `rocprof-sys-run --help=<topic>` | topics: `preset, general, tracing, profiling, output, sampling, process, counters, backend, execution, debug, misc, gpu, cpu, rocm, parallel` |
| How do I persist chosen settings across runs? | `rocprof-sys-avail -G ~/.rocprof-sys.cfg [--all]` then `export ROCPROFSYS_CONFIG_FILE=~/.rocprof-sys.cfg` | `--all` includes descriptions/categories in the generated file; formats are txt (default), json, xml via `-F` |

## Terminology

"Trace" and "tracing" overlap in the output, so map the name you see to what it
controls before answering:

| Name you see | What it controls |
| --- | --- |
| `ROCPROFSYS_TRACE`, `settings::trace` and `--help=tracing` (its tuning options) | Perfetto trace output |
| `ROCPROFSYS_USE_ROCPD` | rocPD output |
| `ROCPROFSYS_PROFILE`, `--help=profiling` | timemory profile output |
| `ROCPROFSYS_USE_SAMPLING`, `--help=sampling` | call-stack sampling |
| `ROCPROFSYS_ROCM_DOMAINS`, `--help=rocm` | ROCm API tracing |
| `ROCPROFSYS_USE_MPIP`, `_RCCLP`, `_OMPT`, `_KOKKOSP` | MPI, RCCL, OpenMP and Kokkos API tracing |

"Tracing" means API tracing (recording the calls of one API); "trace output" means the
Perfetto file. A question like "what tracing options are there?" usually means the ROCm
domains, so ask or answer both if it is unclear.

## How to answer a discovery question

1. Identify which axis the question is about: settings/env-vars, Timemory
   components, hardware counters, ROCm API domains, GPU metrics, or CLI flags.
2. Pick the matching row from the table above.
3. Run the command (or hand it to the user) and report the relevant rows —
   don't dump the entire table if the question was narrow; combine with
   `-r <regex>` / `-c <category>` / `-A` to narrow first.
4. If the result is still broad, suggest adding `-A`/`--available` (installed/
   supported only) or a category/regex filter.

## Persisting configuration

Once the right settings are identified, freeze them into a config file instead
of re-typing environment variables every run:

```bash
rocprof-sys-avail -G ~/.rocprof-sys.cfg --all   # --all adds descriptions/categories
export ROCPROFSYS_CONFIG_FILE=~/.rocprof-sys.cfg
```

Select the format with `-F txt|json|xml`; they load differently:

- `txt` (default) and `xml`: load with `ROCPROFSYS_CONFIG_FILE`.
- `json`: this is a hierarchical preset file. It does **not** load through
  `ROCPROFSYS_CONFIG_FILE` (the run fails with "missing the expected
  'rocprofiler-systems' root object"); load it with
  `rocprof-sys-run --preset=<file>.json -- <app>`.

When the same setting is given in more than one place, the order of priority is:
config file, then environment variable, then command-line parameter, each overriding
the one before. For example, with `ROCPROFSYS_SAMPLING_FREQ = 50` in the file,
`ROCPROFSYS_SAMPLING_FREQ=77` in the environment beats it, and
`rocprof-sys-run --sampling-freq=100 -- <app>` beats both.

## Using what you discover

Names found with the commands above are applied through these settings:

- **CPU counters** (`-H -c CPU`): set `ROCPROFSYS_PAPI_EVENTS`, `ROCPROFSYS_PROFILE=ON`
  **and** add `papi_array` (or `papi_vector`) to `ROCPROFSYS_TIMEMORY_COMPONENTS`, e.g.
  `wall_clock,papi_array`; results are written to `papi_array*.txt/json` (or
  `papi_vector*`). Without the component the run succeeds but writes no counter files. All
  events must come from one namespace — mixing `PAPI_*` presets with `perf::*`
  events only prints a "Failure to add named event" warning and drops the
  counters, the run still exits 0.
  - Host CPU counters read through Linux `perf_event` need `/proc/sys/kernel/perf_event_paranoid` <= 2.
    That limit does not apply to metrics read from other sources, such as the PAPI `net:::`
    network events, which read `/proc/net/dev`.
- **CPU overflow sampling**: sample on a hardware event instead of a timer.
  Set `ROCPROFSYS_USE_SAMPLING=ON`, `ROCPROFSYS_SAMPLING_OVERFLOW=ON`,
  `ROCPROFSYS_SAMPLING_OVERFLOW_EVENT=<event>` (list events with
  `rocprof-sys-avail -H -c CPU -r overflow`) **and** a large
  `ROCPROFSYS_SAMPLING_OVERFLOW_FREQ` (events per sample, e.g. `10000000`).
  Setting only the event does nothing (it falls back to CPU-time sampling), and
  leaving the interval at its default of 300 events aborted the run when tested.
  It also needs `perf_event_paranoid` <= 2.
- **GPU counters** (`-H -c GPU`): names are listed per device, e.g.
  `FETCH_SIZE:device=0`. Set `ROCPROFSYS_ROCM_EVENTS` for kernel-dispatch
  counters (writes `rocprof-device-<N>-<counter>.txt/json`), or
  `ROCPROFSYS_GPU_PERF_COUNTERS` for polled (PMC) sampling. A name without the
  `:device=N` suffix is collected on every device.
- **GPU metrics** (power, temperature, utilization): collected via
  AMD SMI. `ROCPROFSYS_AMD_SMI_METRICS` selects which metrics to enable.
  - By default, `busy,temp,power,mem_usage` are enabled.
  - The value `all` collects everything.
  - `ROCPROFSYS_USE_AMD_SMI=OFF` disables this backend entirely.
- **ROCm API tracing**: set `ROCPROFSYS_ROCM_DOMAINS` to a comma-separated list,
  e.g. `hip_runtime_api,kernel_dispatch,memory_copy`.
  - Copy names exactly from `rocprof-sys-avail -bd -r ROCM_DOMAINS`: one unknown
    name will fail produce a failure
  - `kfd_events` also needs `HSA_XNACK=1` and an XNACK-capable GPU; check with
    `rocminfo | grep -i xnack` (a `xnack-`/`xnack+` suffix on the GPU target means
    capable). On a GPU without XNACK it records nothing and prints nothing.

## Common Mistakes

| Mistake | Fix |
| --- | --- |
| Guessing a category name for `-c` (e.g. `settings::tracing`) | Run `rocprof-sys-avail --list-categories` first — category names don't always match the obvious English word (it's `settings::trace`) |
| Dumping the full `-S`/`-C`/`-H` table for a narrow question | Combine with `-r <regex>` or `-c <category>`/`-A` to filter before reporting |
| Confusing this skill with picking a profiling preset | Preset selection is `choosing-a-profiling-preset`; this skill is for exploring/fine-tuning individual options, including on top of a chosen preset |
| Typing a ROCm domain name from memory | An unknown `ROCPROFSYS_ROCM_DOMAINS` name silently disables the whole list; copy names from `rocprof-sys-avail -bd -r ROCM_DOMAINS` |
| Forgetting `-A`/`--available` | Without it, `-H`/`-C` list counters/components the current build or hardware doesn't actually support, which can overwhelm the answer |

`rocprof-sys-avail` is the source of truth for names and descriptions. For
topics beyond option discovery (unified memory profiling, causal profiling), see
the online docs:
<https://rocm.docs.amd.com/projects/rocprofiler-systems/en/develop/how-to/configuring-runtime-options.html>

© amd · MIT · amd/skills

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

Все скиллы по теме «ИИ и ML» →
profile-model modular Скилл profile-model для Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI и OpenCode профилирует модели на MAX — находит, какие ядра едят время и насколько загружен GPU. CX Codex +1 1 300установок cuda-profiling mohitmishra786 Скилл cuda-profiling для Claude Code — анализирует производительность CUDA-ядер с помощью Nsight Systems и Nsight Compute. Профилирует приложения: временная шкала системы, метрики отдельных ядер, диагностика узких мест. CX Codex +1 410установок workers-profiling cloudflare Скилл workers-profiling для анализа использования CPU и памяти в развёрнутых Cloudflare Workers и Durable Objects. Помогает найти узкие места в коде и предложить оптимизацию. CX Codex +1 30 100установок cx-profiling coralogix Запрашивает данные непрерывного профилирования в Coralogix через CLI cx profiling. Помогает расследовать скачки CPU и утечки памяти до конкретных функций. CX Codex +1 1 200установок rust-profiling mohitmishra786 Скилл rust-profiling для Claude Code и других агентов ведёт профилирование Rust-программ. Строит флеймграфы, анализирует размер бинарника, измеряет мономорфизации, запускает микробенчмарки Criterion. CX Codex +1 751установок profiling-performance spencerpauly Скилл profiling-performance запускает профилирование CPU во встроенном браузере через инструменты MCP. Он находит медленные функции и помогает устранить зависания интерфейса. CX Codex +1 452установок

Из того же набора18

Весь набор →
quark-torch-llm-ptq Скилл quark-torch-llm-ptq ведёт модель на PyTorch или Hugging Face через посттренировочное квантование в AMD Quark: анализ, план, манифест, запуск. CX Codex +1 965установок rocprofiler-pc-sampling Скилл rocprofiler-pc-sampling запускает профилирование приложений на AMD GPU через rocprofv3 с PC sampling и находит узкие места по коду и причины простоев вычислительных блоков. CX Codex +1 592установок flydsl-kernel-authoring Скилл flydsl-kernel-authoring для Claude Code и Cursor выступает справочником по написанию и проверке GPU-ядер FlyDSL на графических процессорах AMD. CX Codex +1 437установок flydsl-kernel-trace-analysis Скилл flydsl-kernel-trace-analysis для Claude Code собирает и разбирает трассы GPU-ядер, чтобы найти задержки исполнения. Запускается для профилирования команды или анализа уже готовой папки с трассой. CX Codex +1 436установок rocprofiler-systems-choosing-a-profiling-preset Скилл rocprofiler-systems-choosing-a-profiling-preset для Claude Code подбирает профиль запуска rocprofiler-systems под тип работы и цель измерения. Срабатывает на вопрос о выборе профиля или запуск без --preset. CX Codex +1 266установок rocprofiler-systems-instrumenting-binaries Скилл rocprofiler-systems-instrumenting-binaries для Claude Code настраивает инструментирование через rocprof-sys-instrument. Включается при выборе функций и модулей для трассировки или анализе пустого либо перегруженного трейса. CX Codex +1 266установок moat-cuda-to-rocm Скилл moat-cuda-to-rocm для Claude Code портирует проекты с CUDA на ROCm/HIP для графических ускорителей AMD. Агент подключает инструкции при планировании, реализации или ревью миграции. CX Codex +1 104установок amd-skills Плагин добавляет в Claude Code скиллы AMD для локального запуска изображений и аудио через Ryzen AI, развёртывания LLM на Instinct GPU с vLLM и анализа производительности GPU-ядер. ★ 510звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой