소스 정보
- 저장소
- ROCm/rocprofiler-systems-skills
- 최근 소스 활동
- 2026년 3월 16일 11:36
- 감지된 SKILL.md 언어
- 영어
- 스타
- 4
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
SOC 직업 분류 기준
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/ROCm/rocprofiler-systems-skills --skill rocprofsys-build명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
Given a TheRock nightly build (URL or run-id), return the rocm-systems pin_sha used in that build
Check whether a given rocm-systems commit is included in a specific TheRock nightly build
Find the first TheRock nightly build that includes a given rocm-systems commit
| name | rocprofsys-build |
| description | Build, test, and install rocprofiler-systems after configuration |
Builds the rocprofiler-systems project after configuration, optionally runs tests and installs.
Use this skill when:
Before using this skill:
rocprofsys-configure first)Check if configured:
# Look for CMakeCache.txt in build directory
if [ -f build/debug/CMakeCache.txt ]; then
echo "Configured with debug preset"
elif [ -f build/release/CMakeCache.txt ]; then
echo "Configured with release preset"
else
echo "Not configured - run rocprofsys-configure first"
fi
Find project directory
rocprofsys-configureprojects/rocprofiler-systems/Find build directory
build/debug, build/release, etc.Validate build is configured
CMakeCache.txtbuild.ninja or Makefile)rocprofsys-configure firstReport to user:
Ask user what they want to build:
Use AskUserQuestion:
header: "Build Scope"
question: "What do you want to build?"
options:
- label: "Full build (Recommended)"
description: "Build all targets"
- label: "Specific target"
description: "Build a specific library or executable"
- label: "Build and test"
description: "Build everything and run tests"
- label: "Build and install"
description: "Build, test, and install to prefix"
Building rocprofsys can be memory-intensive. Determine parallel job count:
Strategy:
# Check system memory (GB)
TOTAL_MEM=$(free -g | awk '/^Mem:/{print $2}')
# Check CPU cores
TOTAL_CORES=$(nproc)
# Heuristic: ~4GB per parallel job for rocprofsys
SAFE_JOBS=$((TOTAL_MEM / 4))
MAX_JOBS=$((SAFE_JOBS > TOTAL_CORES ? TOTAL_CORES : SAFE_JOBS))
# Suggest to user
echo "Recommended: -j${MAX_JOBS}"
Use AskUserQuestion:
header: "Parallel Jobs"
question: "How many parallel build jobs?"
options:
- label: "Auto (Recommended: -j8)"
description: "Based on system memory and cores"
- label: "Conservative (-j4)"
description: "Safer for systems with limited memory"
- label: "Maximum (-j$(nproc))"
description: "Use all CPU cores (may run out of memory)"
- label: "Custom"
description: "Specify job count manually"
Build command:
cmake --build <build-dir> -j <jobs> [--target <target>]
Examples:
# Full build with 8 jobs
cmake --build build/debug -j8
# Build specific target
cmake --build build/debug -j8 --target rocprof-sys-run
# Verbose output (for debugging build issues)
cmake --build build/debug -j8 --verbose
# Clean and rebuild
cmake --build build/debug -j8 --clean-first
Show build progress:
[123/456] Building CXX object...-j for parallel buildMonitor for issues:
If build fails, diagnose and help user:
Common build errors:
| Error Type | Symptoms | Solution |
|---|---|---|
| Out of memory | c++: fatal error: Killed | Reduce parallel jobs: -j2 or -j4 |
| Missing headers | fatal error: xyz.h: No such file | Missing dependency, reconfigure with BUILD_<DEP>=ON |
| Linker errors | undefined reference to | Dependency issue, rebuild dependencies |
| Template errors | Long C++ template errors | Usually code issue, read error carefully |
| External dependency failure | Error in external/dyninst/ | Clean build, try again, or use system package |
Steps to diagnose:
If build fails repeatedly:
If user selected "Build and test" or explicitly wants to run tests:
# Run all tests
cd <build-dir>
ctest --output-on-failure
# Run tests in parallel
ctest -j8 --output-on-failure
# Run specific test
ctest -R <test-name> --output-on-failure
# Verbose test output
ctest -V
Monitor test results:
Report to user:
If user selected "Build and install":
# Install to prefix (may need sudo)
cmake --install <build-dir>
# Install to custom prefix
cmake --install <build-dir> --prefix /custom/path
# Install specific component
cmake --install <build-dir> --component <component>
Check install prefix:
/opt/rocprofiler-systems (usually needs sudo)-DCMAKE_INSTALL_PREFIX=...Verify installation:
# Check installed binaries
ls <install-prefix>/bin/rocprof-sys-*
# Check installed libraries
ls <install-prefix>/lib/librocprof-sys*
# Check setup script
cat <install-prefix>/share/rocprofiler-systems/setup-env.sh
Setup environment:
# Option 1: Source setup script
source /opt/rocprofiler-systems/share/rocprofiler-systems/setup-env.sh
# Option 2: Manual
export PATH=/opt/rocprofiler-systems/bin:$PATH
export LD_LIBRARY_PATH=/opt/rocprofiler-systems/lib:$LD_LIBRARY_PATH
On success:
On failure:
cd /path/to/projects/rocprofiler-systems
cmake --build build/debug -j8
cd /path/to/projects/rocprofiler-systems
cmake --build build/debug -j8
cd build/debug
ctest --output-on-failure
cd /path/to/projects/rocprofiler-systems
cmake --build build/release -j8
sudo cmake --install build/release
cd /path/to/projects/rocprofiler-systems
cmake --build build/debug -j8
# Only rebuilds changed files
cd /path/to/projects/rocprofiler-systems
cmake --build build/debug -j8 --clean-first
cd /path/to/projects/rocprofiler-systems
cmake --build build/debug -j8 --target rocprof-sys-run
This skill produces:
Build artifacts:
projects/rocprofiler-systems/
└── build/
└── debug/ # Or release, etc.
├── source/
│ ├── bin/
│ │ └── rocprof-sys-run/
│ │ └── rocprof-sys-run # Executable
│ └── lib/
│ └── rocprof-sys/
│ └── librocprof-sys.so # Library
└── ...
Test results:
build/debug/Testing/Installation (if installed):
/opt/rocprofiler-systems/
├── bin/
│ ├── rocprof-sys-run
│ ├── rocprof-sys-instrument
│ └── ...
├── lib/
│ ├── librocprof-sys.so
│ └── ...
├── include/
│ └── rocprofiler-systems/
└── share/
└── rocprofiler-systems/
└── setup-env.sh
| Mistake | Fix |
|---|---|
| Building without configuring | Run rocprofsys-configure first |
| Too many parallel jobs | Reduce to -j4 or -j2 if out of memory |
| Building in wrong directory | Must be in project root, build dir is specified with -B or --build |
| Not running tests | Always run tests after build, especially for changes |
| Installing without sudo | Use sudo cmake --install if prefix is /opt |
| Not checking test results | Review failed tests before proceeding |
| Ignoring build warnings | Some warnings indicate real issues |
Cause: Not in configured build directory or wrong command
Solution:
# Use cmake --build, not make directly
cmake --build build/debug
Cause: Out of memory
Solution:
# Reduce parallel jobs
cmake --build build/debug -j2
# Or add swap space
Cause: Build directory not configured
Solution:
# Run configure first
cmake --preset debug
# Then build
cmake --build build/debug
Steps:
ctest -R <test-name> -Vcat build/debug/Testing/Temporary/LastTest.log./build/debug/tests/<test-binary>Solution:
# Use sudo for system paths
sudo cmake --install build/release
# Or configure with user prefix
cmake -B build/release -DCMAKE_INSTALL_PREFIX=$HOME/rocprofsys
cmake --install build/release # No sudo needed
| After Build | Use |
|---|---|
| Build successful | Test the installation, run examples |
| Build failed | Review errors, reconfigure if needed |
| Tests failed | Debug failed tests, fix code |
| Ready to commit | git-commit to commit changes |
| Ready for PR | git-prepare-pull-request |
Common targets:
all (default) - Build everythingrocprof-sys-run - Main profiler executablerocprof-sys-instrument - Binary instrumentation toolrocprof-sys-avail - Available metrics tooltests - Build all tests (without running)To see all targets:
cmake --build build/debug --target help