framework-mark #2: graph_dividend benchmark #28
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| # Run CI on pull requests targeting any base branch, not just main. | |
| # This is necessary for stacked PR workflows where a PR's base is | |
| # another feature branch (e.g. an umbrella branch or a previous PR | |
| # in a stack); without this, only the final umbrella -> main PR | |
| # would get CI coverage. | |
| pull_request: | |
| jobs: | |
| benchmark-khronos-mivisionx: | |
| runs-on: ubuntu-latest | |
| name: Khronos & MIVisionX - Build, Benchmark & Compare | |
| 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 | |
| # --- Khronos Sample Implementation --- | |
| - name: Build Khronos OpenVX sample | |
| run: | | |
| git clone --recursive --depth 1 https://github.com/KhronosGroup/OpenVX-sample-impl.git /tmp/openvx-khronos | |
| cd /tmp/openvx-khronos | |
| python Build.py --os=Linux --arch=64 --conf=Release | |
| - name: Find Khronos libraries | |
| id: khronos | |
| run: | | |
| LIB_DIR=$(dirname $(find /tmp/openvx-khronos -name "libopenvx.so" -not -path "*/build/*" | head -1)) | |
| echo "lib_dir=$LIB_DIR" >> "$GITHUB_OUTPUT" | |
| echo "Found Khronos libraries in: $LIB_DIR" | |
| ls -la "$LIB_DIR"/libopenvx* "$LIB_DIR"/libvxu* 2>/dev/null || true | |
| - name: Build openvx-mark (Khronos) | |
| run: | | |
| mkdir build-khronos && cd build-khronos | |
| cmake -DOPENVX_INCLUDES=/tmp/openvx-khronos/api-docs/include \ | |
| -DOPENVX_LIB_DIR=${{ steps.khronos.outputs.lib_dir }} .. | |
| cmake --build . -j$(nproc) | |
| - name: Run benchmark (Khronos) | |
| run: | | |
| cd build-khronos | |
| export LD_LIBRARY_PATH=${{ steps.khronos.outputs.lib_dir }}:$LD_LIBRARY_PATH | |
| ./openvx-mark --resolution VGA --iterations 10 --warmup 3 | |
| # --- MIVisionX (AMD OpenVX) --- | |
| - name: Build MIVisionX (CPU backend) | |
| run: | | |
| git clone --depth 1 --branch develop https://github.com/ROCm/MIVisionX.git /tmp/openvx-mivisionx | |
| cd /tmp/openvx-mivisionx && mkdir build && cd build | |
| cmake -DBACKEND=CPU -DNEURAL_NET=OFF -DLOOM=OFF -DMIGRAPHX=OFF \ | |
| -DCMAKE_INSTALL_PREFIX=/tmp/openvx-mivisionx/install .. | |
| make -j$(nproc) | |
| make install | |
| - name: Find MIVisionX libraries | |
| id: mivisionx | |
| run: | | |
| LIB_DIR=$(dirname $(find /tmp/openvx-mivisionx -name "libopenvx.so" -not -path "*/build/*" | head -1)) | |
| echo "lib_dir=$LIB_DIR" >> "$GITHUB_OUTPUT" | |
| echo "Found MIVisionX libraries in: $LIB_DIR" | |
| ls -la "$LIB_DIR"/libopenvx* "$LIB_DIR"/libvxu* 2>/dev/null || true | |
| - name: Build openvx-mark (MIVisionX) | |
| run: | | |
| mkdir build-mivisionx && cd build-mivisionx | |
| cmake -DOPENVX_INCLUDES=/tmp/openvx-mivisionx/install/include/mivisionx \ | |
| -DOPENVX_LIB_DIR=${{ steps.mivisionx.outputs.lib_dir }} .. | |
| cmake --build . -j$(nproc) | |
| - name: Run benchmark (MIVisionX) | |
| run: | | |
| cd build-mivisionx | |
| export LD_LIBRARY_PATH=${{ steps.mivisionx.outputs.lib_dir }}:$LD_LIBRARY_PATH | |
| ./openvx-mark --resolution VGA --iterations 10 --warmup 3 | |
| # --- Compare Results --- | |
| - name: Compare benchmark results | |
| run: | | |
| KHRONOS=build-khronos/benchmark_results/benchmark_results.json | |
| MIVISIONX=build-mivisionx/benchmark_results/benchmark_results.json | |
| if [ ! -f "$KHRONOS" ] || [ ! -f "$MIVISIONX" ]; then | |
| echo "Skipping comparison — one or both benchmark results missing" | |
| exit 0 | |
| fi | |
| python3 scripts/compare_reports.py "$KHRONOS" "$MIVISIONX" \ | |
| --output comparison | |
| - name: Post comparison to job summary | |
| if: always() | |
| run: | | |
| if [ -f comparison.md ]; then | |
| cat comparison.md >> "$GITHUB_STEP_SUMMARY" | |
| fi | |
| - name: Upload Khronos results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-results-khronos-sample | |
| path: build-khronos/benchmark_results/ | |
| if-no-files-found: ignore | |
| - name: Upload MIVisionX results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-results-mivisionx-cpu | |
| path: build-mivisionx/benchmark_results/ | |
| if-no-files-found: ignore | |
| - name: Upload comparison report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-comparison-khronos-mivisionx | |
| path: comparison.* | |
| if-no-files-found: ignore |