# Run all integer benchmarks on a permanent HPU instance and return parsed results to Slab CI bot. name: Hpu Integer Benchmarks on: workflow_dispatch: env: CARGO_TERM_COLOR: always RESULTS_FILENAME: parsed_benchmark_results_${{ github.sha }}.json ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} RUST_BACKTRACE: "full" RUST_MIN_STACK: "8388608" permissions: {} jobs: integer-benchmarks-hpu: name: Execute integer & erc20 benchmarks for HPU backend runs-on: v80-desktop concurrency: group: ${{ github.workflow }}_${{ github.ref }} cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} timeout-minutes: 1440 # 24 hours steps: # Needed as long as hw_regmap repository is private - name: Configure SSH uses: webfactory/ssh-agent@a6f90b1f127823b31d4d4a8d96047790581349bd # v0.9.1 with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - name: Checkout tfhe-rs repo with tags uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 persist-credentials: 'false' token: ${{ secrets.REPO_CHECKOUT_TOKEN }} - name: Get benchmark details run: | { echo "BENCH_DATE=$(date --iso-8601=seconds)"; echo "COMMIT_DATE=$(git --no-pager show -s --format=%cd --date=iso8601-strict ${{ github.sha }})"; echo "COMMIT_HASH=$(git describe --tags --dirty)"; } >> "${GITHUB_ENV}" - name: Install rust uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203 with: toolchain: nightly - name: Checkout Slab repo uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: repository: zama-ai/slab path: slab persist-credentials: 'false' token: ${{ secrets.REPO_CHECKOUT_TOKEN }} - name: Run benchmarks run: | make bench_integer_hpu make bench_hlapi_erc20_hpu - name: Parse results run: | python3 ./ci/benchmark_parser.py target/criterion "${RESULTS_FILENAME}" \ --database tfhe_rs \ --hardware "hpu_x1" \ --backend hpu \ --project-version "${COMMIT_HASH}" \ --branch "${REF_NAME}" \ --commit-date "${COMMIT_DATE}" \ --bench-date "${BENCH_DATE}" \ --walk-subdirs env: REF_NAME: ${{ github.ref_name }} - name: Upload parsed results artifact uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 with: name: ${{ github.sha }}_integer_benchmarks path: ${{ env.RESULTS_FILENAME }} - name: Send data to Slab shell: bash run: | python3 slab/scripts/data_sender.py "${RESULTS_FILENAME}" "${{ secrets.JOB_SECRET }}" \ --slab-url "${{ secrets.SLAB_URL }}"