rocprofiler-systems-discovering-profiling-options
About rocprofiler-systems-discovering-profiling-options
This skill maps questions about rocprofiler-systems profiling options to commands that reveal the relevant settings, counters, APIs, or CLI flags. It helps users narrow results and save discovered configuration for later runs.
Key features
- 01Maps questions to discovery commands
- 02Lists settings and environment variables
- 03Finds hardware counters and components
- 04Filters ROCm API domains and operations
- 05Generates reusable configuration files
Use cases
- 01Find GPU counters available on a system
- 02Inspect traceable ROCm APIs
- 03Explore options for a profiling topic
- 04Save settings for later runs
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ amd/ skills --skill rocprofiler-systems-discovering-profiling-optionsAfter installing, type/rocprofiler-systems-discovering-profiling-optionsin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
.federated.jsonskill-card.mdevals/evals.jsonmachine.ymlDetails
From the project READMEDiscovering 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
- Identify which axis the question is about: settings/env-vars, Timemory components, hardware counters, ROCm API domains, GPU metrics, or CLI flags.
- Pick the matching row from the table above.
- 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>/-Ato narrow first. - 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:
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) andxml: load withROCPROFSYS_CONFIG_FILE.json: this is a hierarchical preset file. It does not load throughROCPROFSYS_CONFIG_FILE(the run fails with "missing the expected 'rocprofiler-systems' root object"); load it withrocprof-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): setROCPROFSYS_PAPI_EVENTS,ROCPROFSYS_PROFILE=ONand addpapi_array(orpapi_vector) toROCPROFSYS_TIMEMORY_COMPONENTS, e.g.wall_clock,papi_array; results are written topapi_array*.txt/json(orpapi_vector*). Without the component the run succeeds but writes no counter files. All events must come from one namespace — mixingPAPI_*presets withperf::*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_eventneed/proc/sys/kernel/perf_event_paranoid<= 2. That limit does not apply to metrics read from other sources, such as the PAPInet:::network events, which read/proc/net/dev.
- Host CPU counters read through Linux
- 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 withrocprof-sys-avail -H -c CPU -r overflow) and a largeROCPROFSYS_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 needsperf_event_paranoid<= 2. - GPU counters (
-H -c GPU): names are listed per device, e.g.FETCH_SIZE:device=0. SetROCPROFSYS_ROCM_EVENTSfor kernel-dispatch counters (writesrocprof-device-<N>-<counter>.txt/json), orROCPROFSYS_GPU_PERF_COUNTERSfor polled (PMC) sampling. A name without the:device=Nsuffix is collected on every device. - GPU metrics (power, temperature, utilization): collected via
AMD SMI.
ROCPROFSYS_AMD_SMI_METRICSselects which metrics to enable.- By default,
busy,temp,power,mem_usageare enabled. - The value
allcollects everything. ROCPROFSYS_USE_AMD_SMI=OFFdisables this backend entirely.
- By default,
- ROCm API tracing: set
ROCPROFSYS_ROCM_DOMAINSto 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_eventsalso needsHSA_XNACK=1and an XNACK-capable GPU; check withrocminfo | grep -i xnack(axnack-/xnack+suffix on the GPU target means capable). On a GPU without XNACK it records nothing and prints nothing.
- Copy names exactly from
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