Skip to content

[Rocprofiler-compute] Multi-rank profiling #2475

[Rocprofiler-compute] Multi-rank profiling

[Rocprofiler-compute] Multi-rank profiling #2475

name: rocprofiler-compute tarball
on:
push:
branches:
- develop
paths:
- '.github/workflows/rocprofiler-compute-tarball.yml'
- 'projects/rocprofiler-compute/**'
- '!**/*.md'
- '!**/*.rtf'
- '!**/*.rst'
- '!**/.markdownlint-ci2.yaml'
- '!**/.readthedocs.yaml'
- '!**/.spellcheck.local.yaml'
- '!**/.wordlist.txt'
- '!projects/rocprofiler-compute/docs/**'
- '!projects/rocprofiler-compute/docker/**'
pull_request:
paths:
- '.github/workflows/rocprofiler-compute-tarball.yml'
- 'projects/rocprofiler-compute/**'
- '!**/*.md'
- '!**/*.rtf'
- '!**/*.rst'
- '!**/.markdownlint-ci2.yaml'
- '!**/.readthedocs.yaml'
- '!**/.spellcheck.local.yaml'
- '!**/.wordlist.txt'
- '!projects/rocprofiler-compute/docs/**'
- '!projects/rocprofiler-compute/docker/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
ROCM_VERSION: "7.1.0"
jobs:
distbuild:
runs-on: ubuntu-latest
container:
image: dgaliffiamd/rocprofiler-systems:ci-base-ubuntu-24.04
name: Create distribution tarball
env:
INSTALL_DIR: /tmp/foo1
steps:
- name: Set git sha mode
id: sha-mode
run: |
if [ "$EVENT" == 'pull_request' ]; then
echo "sha=${{github.event.pull_request.head.sha}}" >> $GITHUB_OUTPUT
else
echo "sha=$GITHUB_SHA" >> $GITHUB_OUTPUT
fi
- name: Checkout code
uses: actions/checkout@v4
with:
sparse-checkout: projects/rocprofiler-compute
ref: ${{ steps.sha-mode.sha }}
- name: Install ROCm Dependencies
shell: bash
run: |
ROCM_MAJOR=$(echo ${{ env.ROCM_VERSION }} | sed 's/\./ /g' | awk '{print $1}')
ROCM_MINOR=$(echo ${{ env.ROCM_VERSION }} | sed 's/\./ /g' | awk '{print $2}')
ROCM_VERSN=$(( (${ROCM_MAJOR}*10000)+(${ROCM_MINOR}*100) ))
wget -N -P /tmp/ https://repo.radeon.com/amdgpu-install/${ROCM_MAJOR}.${ROCM_MINOR}/ubuntu/noble/amdgpu-install_${ROCM_MAJOR}.${ROCM_MINOR}.${ROCM_VERSN}-1_all.deb
apt-get install -y /tmp/amdgpu-install_${ROCM_MAJOR}.${ROCM_MINOR}.${ROCM_VERSN}-1_all.deb
apt-get update
apt install -y rocm-dev
echo "✅ ROCm Dependencies Installed!"
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Python dependency installs
working-directory: projects/rocprofiler-compute
run: python3 -m pip install -t${INSTALL_DIR}/python-libs -r requirements.txt
- name: Configure
working-directory: projects/rocprofiler-compute
run: |
mkdir build
cd build
cmake -DPYTHON_DEPS=${INSTALL_DIR}/python-libs ..
- name: Release tarball
working-directory: projects/rocprofiler-compute
run: |
cd build
make package_source
- name: Archive tarball
uses: actions/upload-artifact@v4
with:
name: tarball-testing
path: projects/rocprofiler-compute/build/rocprofiler-compute-*.tar.gz
retention-days: 3
disttest:
runs-on: ubuntu-latest
container:
image: dgaliffiamd/rocprofiler-systems:ci-base-ubuntu-24.04
needs: [distbuild]
name: Tarball tests
env:
INSTALL_DIR: /tmp/foo2
steps:
- name: Access tarball
uses: actions/download-artifact@v4
with:
name: tarball-testing
- name: Expand
run: tar xfz rocprofiler-compute-*.tar.gz; rm rocprofiler-compute-*.tar.gz
- name: Install ROCm Dependencies
shell: bash
run: |
ROCM_MAJOR=$(echo ${{ env.ROCM_VERSION }} | sed 's/\./ /g' | awk '{print $1}')
ROCM_MINOR=$(echo ${{ env.ROCM_VERSION }} | sed 's/\./ /g' | awk '{print $2}')
ROCM_VERSN=$(( (${ROCM_MAJOR}*10000)+(${ROCM_MINOR}*100) ))
wget -N -P /tmp/ https://repo.radeon.com/amdgpu-install/${ROCM_MAJOR}.${ROCM_MINOR}/ubuntu/noble/amdgpu-install_${ROCM_MAJOR}.${ROCM_MINOR}.${ROCM_VERSN}-1_all.deb
apt-get install -y /tmp/amdgpu-install_${ROCM_MAJOR}.${ROCM_MINOR}.${ROCM_VERSN}-1_all.deb
apt-get update
apt install -y rocm-dev
echo "✅ ROCm Dependencies Installed!"
- name: Python dependency installs
run: |
cd rocprofiler-compute-*
python3 -m pip install -t${INSTALL_DIR}/python-libs -r requirements.txt
- name: Configure
run: |
cd rocprofiler-compute-*
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}/rocprofiler-compute \
-DPYTHON_DEPS=${INSTALL_DIR}/python-libs ..
- name: Install
run: |
cd rocprofiler-compute-*
cd build
make install
- name: Verify expected paths
run: |
# find $INSTALL_DIR
test -d $INSTALL_DIR/rocprofiler-compute
test -x $INSTALL_DIR/rocprofiler-compute/bin/rocprof-compute
test -s $INSTALL_DIR/rocprofiler-compute/libexec/rocprofiler-compute/VERSION
test -s $INSTALL_DIR/rocprofiler-compute/libexec/rocprofiler-compute/VERSION.sha
test -d $INSTALL_DIR/rocprofiler-compute/libexec/rocprofiler-compute/rocprof_compute_analyze
test -d $INSTALL_DIR/rocprofiler-compute/libexec/rocprofiler-compute/rocprof_compute_profile
test -d $INSTALL_DIR/rocprofiler-compute/libexec/rocprofiler-compute/rocprof_compute_soc
test -d $INSTALL_DIR/rocprofiler-compute/libexec/rocprofiler-compute/utils
test -s $INSTALL_DIR/rocprofiler-compute/share/rocprofiler-compute/sample/vcopy.cpp
test -d $INSTALL_DIR/rocprofiler-compute/share/rocprofiler-compute/modulefiles
test -s $INSTALL_DIR/rocprofiler-compute/share/doc/rocprofiler-compute/LICENSE.md
- name: Query version (setting PYTHONPATH by hand)
run: |
export PYTHONPATH=${INSTALL_DIR}/python-libs:$PYTHONPATH
$INSTALL_DIR/rocprofiler-compute/bin/rocprof-compute --version
- name: Install Lmod
run: sudo apt-get install -y lmod
- name: Access rocprofiler-compute using modulefile
run: |
. /etc/profile.d/lmod.sh
module use $INSTALL_DIR/rocprofiler-compute/share/rocprofiler-compute/modulefiles
module load rocprofiler-compute
module list
rocprof-compute --version