agentleFS
ROCmROCm/rocprofiler-systems-skills/skills/rocprofsys/SKILL.md

rocprofsys

Skill5 starsChanged 16 days agoMITView on GitHub

ROCm Systems Profiler (rocprofiler-systems) project workflows - configure, build, test, and development

  • Installs packages

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when:

    line 45
  2. Distinctive:

    When dependencies change or build is corrupted:

    line 108
  3. Distinctive:

    When user asks about rocprofsys, determine intent and route:

    line 125
  4. Distinctive:

    Check if current directory is inside rocprofiler-systems

    line 147
  5. Distinctive:

    Search common worktree locations

    line 148
  6. Distinctive:

    Ask user for project path

    line 149
  7. Distinctive:

    Ask user if needed

    line 249
  8. Very specific:

    Action: Check if configured → if not, invoke rocprofsys-configure → then invoke rocprofsys-build

    line 264
  9. Very specific:

    Action: Remove build directory → invoke rocprofsys-configure → invoke rocprofsys-build

    line 270
  10. Distinctive:

    No files are created by this dispatcher skill.

    line 282

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

ROCm Systems Profiler Workflows

Main entry point for working with the rocprofiler-systems project. Provides guidance on configuration, building, testing, and common development workflows.

Project Overview

rocprofiler-systems (formerly Omnitrace) is a comprehensive profiling and tracing tool for parallel applications (C, C++, Fortran, HIP, OpenCL, Python) on CPU and GPU.

Key characteristics:

  • C++17 codebase with CMake build system
  • Part of the rocm-systems monorepo (projects/rocprofiler-systems/)
  • Uses CMakePresets.json for standard configurations
  • Complex dependencies: Dyninst, Perfetto, TBB, Boost, elfutils
  • Supports dynamic instrumentation, sampling, tracing, causal profiling

Output Formats

rocprofiler-systems supports two main output types:

Output TypeEnvironment VariableDescription
PerfettoROCPROFSYS_TRACE=1Protobuf trace format (viewable in ui.perfetto.dev)
RocPDROCPROFSYS_USE_ROCPD=1SQLite database format for offline analysis

Perfetto Output Modes

Perfetto format has two implementations:

ModeEnvironment VariablesImplementationStatus
Standard (Cached)ROCPROFSYS_TRACE=1New caching implementation via cache_policyCurrent, recommended
LegacyROCPROFSYS_TRACE=1 + ROCPROFSYS_TRACE_LEGACY=trueOld direct-write implementation via perfetto_policyLegacy, has timing issues on short workloads

Key differences:

  • Standard: Uses trace caching, more robust, recommended for all use cases
  • Legacy: Direct Perfetto write, has known timing bug where counter tracks aren't captured for workloads <0.5 seconds

When to Use

Use this skill when:

  • User asks about rocprofiler-systems or rocprof-sys
  • User wants to configure, build, or work with the project
  • User needs guidance on project structure or workflows
  • User asks "how do I build rocprofsys?"

Project Structure

rocm-systems/                          # Monorepo root
└── projects/
    └── rocprofiler-systems/           # Project root
        ├── CMakeLists.txt
        ├── CMakePresets.json          # Standard build configs
        ├── build/                     # Build directories
        │   ├── ci/                    # CI build
        │   ├── debug/                 # Debug build
        │   ├── release/               # Release build
        │   └── debug-optimized/       # RelWithDebInfo build
        ├── source/                    # Source code
        ├── external/                  # Third-party deps
        ├── examples/                  # Example programs
        ├── tests/                     # Test suite
        ├── scripts/
        │   └── build-release.sh       # Release build script
        └── docs/                      # Documentation

Common Workflows

1. First-Time Setup

For new developers or clean environment:

1. Find project location (in monorepo)
2. Configure with a preset → use rocprofsys-configure
3. Build the project → use rocprofsys-build
4. Run tests

2. Development Build

For active development with debugging:

1. Configure with debug preset
2. Build incrementally
3. Run specific tests

3. Release Build

For packaging or performance testing:

1. Configure with release preset
2. Build with optimizations
3. Create packages

4. Clean Rebuild

When dependencies change or build is corrupted:

1. Remove build directory
2. Reconfigure from scratch
3. Full rebuild

Available Skills

SkillUse For
rocprofsys-configureConfigure CMake build with presets and options
rocprofsys-buildBuild, test, and install the project

Workflow Dispatcher

When user asks about rocprofsys, determine intent and route:

User RequestAction
"configure rocprofsys"Invoke rocprofsys-configure
"build rocprofsys"Check if configured, then invoke rocprofsys-build
"clean build rocprofsys"Remove build dir, configure, then build
"debug build"Configure with debug preset, then build
"release build"Configure with release preset, then build
"run tests"Build, then run ctest
"install rocprofsys"Build, then install to prefix

Finding the Project

Since the project may be in different locations (worktrees, different branches), always find it dynamically:

Common locations:

  • /home/amd/worktree/rocm-systems/*/projects/rocprofiler-systems
  • ~/rocm-systems/projects/rocprofiler-systems
  • Current directory (if already in project)

Detection strategy:

  1. Check if current directory is inside rocprofiler-systems
  2. Search common worktree locations
  3. Ask user for project path

CMake Presets

The project uses CMakePresets.json with these standard configurations:

PresetBuild TypeUse ForTestingInstall Prefix
ciReleaseCI buildsON/opt/rocprofiler-systems
debugDebugDevelopmentON/opt/rocprofiler-systems
debug-optimizedRelWithDebInfoDebug with perfON/opt/rocprofiler-systems
releaseReleaseProductionOFF/opt/rocprofiler-systems

Key CMake Options

OptionDefaultDescription
ROCPROFSYS_BUILD_DYNINSTOFFBuild Dyninst from source
ROCPROFSYS_BUILD_TBBOFFBuild TBB from source
ROCPROFSYS_BUILD_BOOSTOFFBuild Boost from source
ROCPROFSYS_BUILD_ELFUTILSOFFBuild elfutils from source
ROCPROFSYS_BUILD_TESTINGONEnable tests
ROCPROFSYS_USE_PYTHONONEnable Python support
ROCPROFSYS_USE_MPIOFFEnable full MPI support
ROCPROFSYS_USE_PAPIONEnable PAPI hardware counters

Common Environment Variables

Runtime Variables

VariableValuesDescription
ROCPROFSYS_TRACE0 or 1Enable Perfetto trace output
ROCPROFSYS_TRACE_LEGACYtrue or falseUse legacy Perfetto implementation
ROCPROFSYS_USE_ROCPD0 or 1Enable RocPD SQLite output
ROCPROFSYS_OUTPUT_PATH<directory>Output directory for traces
ROCPROFSYS_AMD_SMI_METRICSall, power, temp, etc.GPU metrics to collect
ROCPROFSYS_SAMPLING_AINICSall, noneEnable NIC/AINIC sampling
AMDSMI_FAKE_AINIC0 or 1Simulate AINIC devices for testing

Example Usage

# Standard Perfetto trace with GPU metrics
ROCPROFSYS_TRACE=1 \
ROCPROFSYS_AMD_SMI_METRICS="all" \
bin/rocprof-sys-run -- ./my-app

# Legacy Perfetto mode
ROCPROFSYS_TRACE=1 \
ROCPROFSYS_TRACE_LEGACY=true \
ROCPROFSYS_AMD_SMI_METRICS="all" \
bin/rocprof-sys-run -- ./my-app

# RocPD database output
ROCPROFSYS_USE_ROCPD=1 \
ROCPROFSYS_AMD_SMI_METRICS="all" \
bin/rocprof-sys-run -- ./my-app

# NIC/AINIC metrics with fake devices
AMDSMI_FAKE_AINIC=1 \
ROCPROFSYS_TRACE=1 \
ROCPROFSYS_SAMPLING_AINICS="all" \
bin/rocprof-sys-run -- ./my-app

Common Issues

IssueSolution
"Cannot find Dyninst"Configure with -DROCPROFSYS_BUILD_DYNINST=ON
"CMake version too old"Install CMake 3.21+ via pip: pip install cmake
"Out of memory during build"Reduce parallel jobs: cmake --build build -j4
"Tests failing"Build with debug preset, run specific test
"Wrong project path"Ensure in projects/rocprofiler-systems/ subdirectory
"No counter tracks in Perfetto"Ensure using standard mode (not legacy), check ROCPROFSYS_AMD_SMI_METRICS
"Legacy mode: missing counters"Workload too short (<0.5s), use standard mode or longer workload

Integration with Other Skills

After This SkillUse
Code changes madegit-commit to commit changes
Feature addedplanning-feature to plan implementation
Bug foundplanning-bugfix to plan fix
Ready to testtesting-testplan for test plan
Ready for PRgit-prepare-pull-request
Profiler crashes/errorsdebugging-rocprof-sys to debug profiler issues
Verify PMC metricsverify_pmc_metrics to validate GPU/SDMA/NIC output
AMD SMI API worklibrary-amd-smi for AMD SMI C++ API guidance

Process

  1. Determine user intent
    • What does the user want to do with rocprofsys?
    • Configure? Build? Test? Install? Debug?
  2. Find project location
    • Check current directory
    • Search common locations
    • Ask user if needed
  3. Route to appropriate skill
    • Configuration needs → rocprofsys-configure
    • Build needs → rocprofsys-build
    • Both → configure first, then build
  4. Provide context
    • Show current build status (if any)
    • Suggest next steps
    • Link to documentation if needed

Example Interactions

User: "Build rocprofsys" Action: Check if configured → if not, invoke rocprofsys-configure → then invoke rocprofsys-build

User: "Debug build of rocprofiler-systems" Action: Invoke rocprofsys-configure with debug preset → invoke rocprofsys-build

User: "Clean and rebuild rocprofsys" Action: Remove build directory → invoke rocprofsys-configure → invoke rocprofsys-build

User: "How do I configure rocprofsys?" Action: Invoke rocprofsys-configure skill

Output

This skill produces:

  • Guidance on which sub-skill to use
  • Project status information
  • Next steps recommendations

No files are created by this dispatcher skill.

Common Mistakes

MistakeFix
Trying to build without configuringAlways configure first
Using wrong project path (monorepo root vs project dir)Navigate to projects/rocprofiler-systems/
Not specifying presetUse a preset or set CMAKE_BUILD_TYPE
Assuming project is in fixed locationAlways find dynamically with git worktrees

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.