Skip to content

Add benchmark versioning and MIVisionX CPU CI job #6

Add benchmark versioning and MIVisionX CPU CI job

Add benchmark versioning and MIVisionX CPU CI job #6

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: khronos-sample
build_openvx: |
git clone --recursive --depth 1 https://github.com/KhronosGroup/OpenVX-sample-impl.git /tmp/openvx
cd /tmp/openvx
python Build.py --os=Linux --arch=64 --conf=Release
openvx_includes: /tmp/openvx/api-docs/include
find_libs: true
- name: mivisionx-cpu
build_openvx: |
git clone --depth 1 https://github.com/ROCm/MIVisionX.git /tmp/openvx
cd /tmp/openvx && mkdir build && cd build
cmake -DBACKEND=CPU -DNEURAL_NET=OFF -DLOOM=OFF -DMIGRAPHX=OFF \
-DCMAKE_INSTALL_PREFIX=/tmp/openvx/install ..
make -j$(nproc)
make install
openvx_includes: /tmp/openvx/install/include/mivisionx
find_libs: true
name: ${{ matrix.name }}
steps:
- name: Checkout openvx-mark
uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y cmake build-essential
- name: Build OpenVX implementation
run: ${{ matrix.build_openvx }}
- name: Find OpenVX libraries
id: openvx
run: |
LIB_DIR=$(dirname $(find /tmp/openvx -name "libopenvx.so" -not -path "*/build/*" | head -1))
echo "lib_dir=$LIB_DIR" >> "$GITHUB_OUTPUT"
echo "Found OpenVX libraries in: $LIB_DIR"
ls -la "$LIB_DIR"/libopenvx* "$LIB_DIR"/libvxu* 2>/dev/null || true
- name: Build openvx-mark
run: |
mkdir build && cd build
cmake -DOPENVX_INCLUDES=${{ matrix.openvx_includes }} \
-DOPENVX_LIB_DIR=${{ steps.openvx.outputs.lib_dir }} ..
cmake --build . -j$(nproc)
- name: Run openvx-mark
run: |
cd build
export LD_LIBRARY_PATH=${{ steps.openvx.outputs.lib_dir }}:$LD_LIBRARY_PATH
./openvx-mark --resolution VGA --iterations 10 --warmup 3
- name: Upload benchmark results
if: always()
uses: actions/upload-artifact@v4
with:
name: benchmark-results-${{ matrix.name }}
path: build/benchmark_results/
if-no-files-found: ignore