mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
chore(benchmarks): Refactor the benchmark tools
This commit is contained in:
33
.github/workflows/benchmark.yml
vendored
33
.github/workflows/benchmark.yml
vendored
@@ -112,17 +112,20 @@ jobs:
|
||||
run: |
|
||||
echo "HOME=/home/ubuntu" >> "${GITHUB_ENV}"
|
||||
|
||||
- name: Export CUDA variables
|
||||
- name: Export specific variables (CPU)
|
||||
if: ${{ inputs.backend == 'cpu' }}
|
||||
run: |
|
||||
echo "CUDA_SUPPORT=OFF" >> "${GITHUB_ENV}"
|
||||
echo "BENCHMARK_TARGET=run-cpu-benchmarks" >> "${GITHUB_ENV}"
|
||||
|
||||
- name: Export specific variables (GPU)
|
||||
if: ${{ inputs.backend == 'gpu' }}
|
||||
run: |
|
||||
echo "CUDA_SUPPORT=ON" >> "${GITHUB_ENV}"
|
||||
echo "BENCHMARK_TARGET=run-gpu-benchmarks" >> "${GITHUB_ENV}"
|
||||
echo "CUDA_PATH=$CUDA_PATH" >> "${GITHUB_ENV}"
|
||||
echo "$CUDA_PATH/bin" >> "${GITHUB_PATH}"
|
||||
echo "LD_LIBRARY_PATH=$CUDA_PATH/lib:$LD_LIBRARY_PATH" >> "${GITHUB_ENV}"
|
||||
|
||||
# Specify the correct host compilers
|
||||
- name: Export gcc and g++ variables
|
||||
if: ${{ inputs.backend == 'gpu' }}
|
||||
run: |
|
||||
echo "CC=/usr/bin/gcc-${{ env.GCC_VERSION }}" >> "${GITHUB_ENV}"
|
||||
echo "CXX=/usr/bin/g++-${{ env.GCC_VERSION }}" >> "${GITHUB_ENV}"
|
||||
echo "CUDAHOSTCXX=/usr/bin/g++-${{ env.GCC_VERSION }}" >> "${GITHUB_ENV}"
|
||||
@@ -134,19 +137,11 @@ jobs:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
- name: Build compiler and end-to-end benchmarks (CPU)
|
||||
if: ${{ inputs.backend == 'cpu' }}
|
||||
- name: Build compiler benchmarks
|
||||
run: |
|
||||
set -e
|
||||
cd compiler
|
||||
make BINDINGS_PYTHON_ENABLED=OFF build-benchmarks generate-cpu-benchmarks
|
||||
|
||||
- name: Build compiler and end-to-end benchmarks (GPU)
|
||||
if: ${{ inputs.backend == 'gpu' }}
|
||||
run: |
|
||||
set -e
|
||||
cd compiler
|
||||
make BINDINGS_PYTHON_ENABLED=OFF CUDA_SUPPORT=ON build-benchmarks generate-gpu-benchmarks
|
||||
make BINDINGS_PYTHON_ENABLED=OFF CUDA_SUPPORT=${{ env.CUDA_SUPPORT }} build-benchmarks
|
||||
|
||||
- name: Download KeySetCache
|
||||
if: ${{ !contains(github.head_ref, 'newkeysetcache') }}
|
||||
@@ -155,15 +150,11 @@ jobs:
|
||||
cd compiler
|
||||
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} make keysetcache_ci_populated
|
||||
|
||||
- name: Mark KeySetCache
|
||||
run: |
|
||||
touch keysetcache.timestamp
|
||||
|
||||
- name: Run end-to-end benchmarks
|
||||
run: |
|
||||
set -e
|
||||
cd compiler
|
||||
make BINDINGS_PYTHON_ENABLED=OFF run-benchmarks
|
||||
make ${{ env.BENCHMARK_TARGET }}
|
||||
|
||||
- name: Upload raw results artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
|
||||
Reference in New Issue
Block a user