Compiler - Distributed Build and Test (CPU) #34
Workflow file for this run
This file contains 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: Compiler - Distributed Build and Test (CPU) | |
on: | |
workflow_dispatch: | |
inputs: | |
instance_id: | |
description: 'Instance ID' | |
type: string | |
instance_image_id: | |
description: 'Instance AMI ID' | |
type: string | |
instance_type: | |
description: 'Instance product type' | |
type: string | |
runner_name: | |
description: 'Action runner name' | |
type: string | |
request_id: | |
description: 'Slab request ID' | |
type: string | |
matrix_item: | |
description: 'Build matrix item' | |
type: string | |
env: | |
DOCKER_IMAGE_TEST: ghcr.io/zama-ai/concrete-compiler | |
GLIB_VER: 2_28 | |
jobs: | |
BuildAndTest: | |
name: Build and test compiler on Slurm cluster in EC2 | |
runs-on: distributed-ci | |
if: ${{ !cancelled() }} | |
steps: | |
- name: Instance configuration used | |
run: | | |
echo "ID: ${{ inputs.instance_id }}" | |
echo "AMI: ${{ inputs.instance_image_id }}" | |
echo "Type: ${{ inputs.instance_type }}" | |
echo "Request ID: ${{ inputs.request_id }}" | |
echo "Matrix item: ${{ inputs.matrix_item }}" | |
- name: Fetch repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
token: ${{ secrets.CONCRETE_ACTIONS_TOKEN }} | |
- name: Set up home | |
# "Install rust" step require root user to have a HOME directory which is not set. | |
run: | | |
echo "HOME=/shared" >> "${GITHUB_ENV}" | |
- name: Export specific variables (CPU) | |
if: ${{ !startswith(inputs.instance_type, 'p3.') }} | |
run: | | |
echo "CUDA_SUPPORT=OFF" >> "${GITHUB_ENV}" | |
echo "DATAFLOW_EXECUTION_ENABLED=ON" >> "${GITHUB_ENV}" | |
- name: Setup rust toolchain for concrete-cpu | |
uses: ./.github/workflows/setup_rust_toolchain_for_concrete_cpu | |
- name: Build compiler benchmarks | |
run: | | |
set -e | |
git config --global --add safe.directory '*' | |
cd compilers/concrete-compiler/compiler | |
rm -rf /shared/build | |
make HPX_DIR=/shared/hpx install-hpx-from-source | |
make HPX_DIR=/shared/hpx BUILD_DIR=/shared/build DATAFLOW_EXECUTION_ENABLED=ON BINDINGS_PYTHON_ENABLED=OFF CUDA_SUPPORT=${{ env.CUDA_SUPPORT }} build-end-to-end-dataflow-tests | |
- name: Run end-to-end benchmarks | |
run: | | |
set -e | |
cd compilers/concrete-compiler/compiler | |
make BUILD_DIR=/shared/build run-end-to-end-distributed-tests | |
- name: Analyze logs | |
run: | | |
cd build/gtest-parallel-logs/passed | |
ls -1 | xargs grep -H "WARNING RETRY" | sed -e "s/.log.*//g" | uniq -c | sed -re "s/ *([0-9]*) (.*)/::warning ::Test \2 retried \1 times/g" | cat |