rocprofsys
Skill5 starsChanged 16 days agoMITView on GitHub
ROCm Systems Profiler (rocprofiler-systems) project workflows - configure, build, test, and development
- Installs packages
In this repository50 other files it gives its agents.
- analyze-pr-commentsSkill
- architecture-analyzeSkill
- architecture-tradeoffSkill
- askSkill
- code-smellsSkill
- debugging-rocprof-sysSkill
- exploration-explore-codeSkill
- git-commitSkill
- git-gh-clientSkill
- git-prepare-pull-requestSkill
- git-pull-request-statusSkill
- gitSkill
- grill-meSkill
- library-amd-smiSkill
- notify-meSkill
- planning-architectureSkill
- planning-baseSkill
- planning-bugfixSkill
- planning-docsSkill
- planning-featureSkill
- planning-refactorSkill
- programming-cmake-best-practicesSkill
- programming-cpp-constexprSkill
- programming-cpp-design-patternsSkill
- programming-cpp-naming-rulesSkill
- programming-cpp-policy-based-diSkill
- programming-cppSkill
- programming-cpp-stl-algorithmsSkill
- programming-pythonSkill
- pr-review-interactiveSkill
- pr-reviewSkill
- radisha-create-skillSkill
- radisha-helpSkill
- radisha-improve-skillSkill
- radisha-skillsSkill
- radisha-updateSkill
- refactoring-techniquesSkill
- review-architectureSkill
- rocprofsys-buildSkill
- rocprofsys-configureSkill
- static-analysisSkill
- testing-gtest-gmockSkill
- testing-pytestSkill
- testing-testplanSkill
- therock-build-to-commitSkill
- therock-commit-in-buildSkill
- therock-first-build-with-commitSkill
- update-pr-descriptionSkill
- verify-pmc-metricsSkill
- watchSkill
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
- Distinctive: line 45
Use this skill when:
- Distinctive: line 108
When dependencies change or build is corrupted:
- Distinctive: line 125
When user asks about rocprofsys, determine intent and route:
- Distinctive: line 147
Check if current directory is inside rocprofiler-systems
- Distinctive: line 148
Search common worktree locations
- Distinctive: line 149
Ask user for project path
- Distinctive: line 249
Ask user if needed
- Very specific: line 264
Action: Check if configured → if not, invoke rocprofsys-configure → then invoke rocprofsys-build
- Very specific: line 270
Action: Remove build directory → invoke rocprofsys-configure → invoke rocprofsys-build
- Distinctive: line 282
No files are created by this dispatcher skill.
≈ “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.
Files
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 Type | Environment Variable | Description |
| Perfetto | ROCPROFSYS_TRACE=1 | Protobuf trace format (viewable in ui.perfetto.dev) |
| RocPD | ROCPROFSYS_USE_ROCPD=1 | SQLite database format for offline analysis |
Perfetto Output Modes
Perfetto format has two implementations:
| Mode | Environment Variables | Implementation | Status |
| Standard (Cached) | ROCPROFSYS_TRACE=1 | New caching implementation via cache_policy | Current, recommended |
| Legacy | ROCPROFSYS_TRACE=1 + ROCPROFSYS_TRACE_LEGACY=true | Old direct-write implementation via perfetto_policy | Legacy, 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/ # DocumentationCommon 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 tests2. Development Build
For active development with debugging:
1. Configure with debug preset
2. Build incrementally
3. Run specific tests3. Release Build
For packaging or performance testing:
1. Configure with release preset
2. Build with optimizations
3. Create packages4. Clean Rebuild
When dependencies change or build is corrupted:
1. Remove build directory
2. Reconfigure from scratch
3. Full rebuildAvailable Skills
| Skill | Use For |
rocprofsys-configure | Configure CMake build with presets and options |
rocprofsys-build | Build, test, and install the project |
Workflow Dispatcher
When user asks about rocprofsys, determine intent and route:
| User Request | Action |
| "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:
- Check if current directory is inside rocprofiler-systems
- Search common worktree locations
- Ask user for project path
CMake Presets
The project uses CMakePresets.json with these standard configurations:
| Preset | Build Type | Use For | Testing | Install Prefix |
ci | Release | CI builds | ON | /opt/rocprofiler-systems |
debug | Debug | Development | ON | /opt/rocprofiler-systems |
debug-optimized | RelWithDebInfo | Debug with perf | ON | /opt/rocprofiler-systems |
release | Release | Production | OFF | /opt/rocprofiler-systems |
Key CMake Options
| Option | Default | Description |
ROCPROFSYS_BUILD_DYNINST | OFF | Build Dyninst from source |
ROCPROFSYS_BUILD_TBB | OFF | Build TBB from source |
ROCPROFSYS_BUILD_BOOST | OFF | Build Boost from source |
ROCPROFSYS_BUILD_ELFUTILS | OFF | Build elfutils from source |
ROCPROFSYS_BUILD_TESTING | ON | Enable tests |
ROCPROFSYS_USE_PYTHON | ON | Enable Python support |
ROCPROFSYS_USE_MPI | OFF | Enable full MPI support |
ROCPROFSYS_USE_PAPI | ON | Enable PAPI hardware counters |
Common Environment Variables
Runtime Variables
| Variable | Values | Description |
ROCPROFSYS_TRACE | 0 or 1 | Enable Perfetto trace output |
ROCPROFSYS_TRACE_LEGACY | true or false | Use legacy Perfetto implementation |
ROCPROFSYS_USE_ROCPD | 0 or 1 | Enable RocPD SQLite output |
ROCPROFSYS_OUTPUT_PATH | <directory> | Output directory for traces |
ROCPROFSYS_AMD_SMI_METRICS | all, power, temp, etc. | GPU metrics to collect |
ROCPROFSYS_SAMPLING_AINICS | all, none | Enable NIC/AINIC sampling |
AMDSMI_FAKE_AINIC | 0 or 1 | Simulate 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-appCommon Issues
| Issue | Solution |
| "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 Skill | Use |
| Code changes made | git-commit to commit changes |
| Feature added | planning-feature to plan implementation |
| Bug found | planning-bugfix to plan fix |
| Ready to test | testing-testplan for test plan |
| Ready for PR | git-prepare-pull-request |
| Profiler crashes/errors | debugging-rocprof-sys to debug profiler issues |
| Verify PMC metrics | verify_pmc_metrics to validate GPU/SDMA/NIC output |
| AMD SMI API work | library-amd-smi for AMD SMI C++ API guidance |
Process
- Determine user intent
- What does the user want to do with rocprofsys?
- Configure? Build? Test? Install? Debug?
- Find project location
- Check current directory
- Search common locations
- Ask user if needed
- Route to appropriate skill
- Configuration needs →
rocprofsys-configure - Build needs →
rocprofsys-build - Both → configure first, then build
- Configuration needs →
- 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
| Mistake | Fix |
| Trying to build without configuring | Always configure first |
| Using wrong project path (monorepo root vs project dir) | Navigate to projects/rocprofiler-systems/ |
| Not specifying preset | Use a preset or set CMAKE_BUILD_TYPE |
| Assuming project is in fixed location | Always find dynamically with git worktrees |
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
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.

