Skip to content

fix(optimizer): fix leveled noise propagation #3907

fix(optimizer): fix leveled noise propagation

fix(optimizer): fix leveled noise propagation #3907

Workflow file for this run

# This job is the main jobs will dispatch build and test for every modules of our mono repo.
name: Main
on:
pull_request:
push:
branches:
- 'main'
- 'release/*'
- 'force-docker-images'
- 'private_release/*'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
schedule:
# Nightly Release @ 3AM after each work day
- cron: "0 3 * * 2-6"
jobs:
# This jobs outputs for each modules of our mono-repo if it changed,
# in order to launch jobs only for the changed modules
file-change:
if: ${{ github.event_name != 'schedule' }}
runs-on: ubuntu-latest
outputs:
compiler: ${{ steps.compiler.outputs.any_changed }}
optimizer: ${{ steps.optimizer.outputs.any_changed }}
concrete-cpu: ${{ steps.concrete-cpu.outputs.any_changed }}
concrete-cpu-api: ${{ steps.concrete-cpu-api.outputs.any_changed }}
concrete-cuda-api: ${{ steps.concrete-cuda-api.outputs.any_changed }}
concrete-python: ${{ steps.concrete-python.outputs.any_changed }}
concrete-compiler-cpu-workflow: ${{ steps.concrete-compiler-cpu-workflow.outputs.any_changed }}
concrete-compiler-gpu-workflow: ${{ steps.concrete-compiler-gpu-workflow.outputs.any_changed }}
concrete-compiler-format-and-linting-workflow: ${{ steps.concrete-compiler-format-and-linting-workflow.outputs.any_changed }}
concrete-compiler-macos-workflow: ${{ steps.concrete-compiler-macos-workflow.outputs.any_changed }}
concrete-compiler-docker-images-workflow: ${{ steps.concrete-compiler-docker-images-workflow.outputs.any_changed }}
concrete-cpu-workflow: ${{ steps.concrete-cpu-workflow.outputs.any_changed }}
concrete-python-workflow: ${{ steps.concrete-python-workflow.outputs.any_changed }}
concrete-optimizer-workflow: ${{ steps.concrete-optimizer-workflow.outputs.any_changed }}
push-main: ${{ steps.github.outputs.push-main }}
steps:
- name: Checkout the repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
token: ${{ secrets.CONCRETE_ACTIONS_TOKEN }}
- name: Get changed files in the concrete-compiler directory
id: compiler
uses: tj-actions/changed-files@cc733854b1f224978ef800d29e4709d5ee2883e4
with:
files: ./compilers/concrete-compiler/**
- name: Get changed files for concrete-optimizer
id: optimizer
uses: tj-actions/changed-files@cc733854b1f224978ef800d29e4709d5ee2883e4
with:
files: |
./compilers/concrete-optimizer/**
./.github/workflows/optimizer.yml
- name: Get changed files in the concrete-cpu directory
id: concrete-cpu
uses: tj-actions/changed-files@cc733854b1f224978ef800d29e4709d5ee2883e4
with:
files: ./backends/concrete-cpu/implementation/**
- name: Get changed files in the concrete-python directory
id: concrete-python
uses: tj-actions/changed-files@cc733854b1f224978ef800d29e4709d5ee2883e4
with:
files: ./frontends/concrete-python/**
- name: Check if compiler_build_and_test_cpu workflow has changed
id: concrete-compiler-cpu-workflow
uses: tj-actions/changed-files@cc733854b1f224978ef800d29e4709d5ee2883e4
with:
files: ./.github/workflows/compiler_build_and_test_cpu.yml
- name: Check if compiler_build_and_test_gpu workflow has changed
id: concrete-compiler-gpu-workflow
uses: tj-actions/changed-files@cc733854b1f224978ef800d29e4709d5ee2883e4
with:
files: ./.github/workflows/compiler_build_and_test_gpu.yml
- name: Check if compiler_format_and_linting.yml workflow has changed
id: concrete-compiler-format-and-linting-workflow
uses: tj-actions/changed-files@cc733854b1f224978ef800d29e4709d5ee2883e4
with:
files: ./.github/workflows/compiler_format_and_linting.yml
- name: Check if compiler_macos_build_and_test workflow has changed
id: concrete-compiler-macos-workflow
uses: tj-actions/changed-files@cc733854b1f224978ef800d29e4709d5ee2883e4
with:
files: ./.github/workflows/compiler_macos_build_and_test.yml
- name: Check if compiler_publish_docker_images workflow has changed
id: concrete-compiler-docker-images-workflow
uses: tj-actions/changed-files@cc733854b1f224978ef800d29e4709d5ee2883e4
with:
files: |
./.github/workflows/compiler_publish_docker_images.yml
./docker/**
- name: Check if concrete_cpu_test workflow has changed
id: concrete-cpu-workflow
uses: tj-actions/changed-files@cc733854b1f224978ef800d29e4709d5ee2883e4
with:
files: ./.github/workflows/concrete_cpu_test.yml
- name: Check if concrete_python_checks workflow has changed
id: concrete-python-workflow
uses: tj-actions/changed-files@cc733854b1f224978ef800d29e4709d5ee2883e4
with:
files: ./.github/workflows/concrete_python_checks.yml
- name: Check if optimizer workflow has changed
id: concrete-optimizer-workflow
uses: tj-actions/changed-files@cc733854b1f224978ef800d29e4709d5ee2883e4
with:
files: ./.github/workflows/optimizer.yml
- name: Get changed files in the concrete-cpu directory
id: concrete-cpu-api
uses: tj-actions/changed-files@cc733854b1f224978ef800d29e4709d5ee2883e4
with:
files: ./backends/concrete-cpu/implementation/include/**
- name: Get changed files in the concrete-cuda directory
id: concrete-cuda-api
uses: tj-actions/changed-files@cc733854b1f224978ef800d29e4709d5ee2883e4
with:
files: ./backends/concrete-cuda/implementation/include/**
- name: Set some github event outputs
id: github
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release'))
run: echo "push-main=true" >> "$GITHUB_OUTPUT"
#################################################
# Compiler jobs #################################
compiler-compliance:
needs: file-change
if: needs.file-change.outputs.compiler == 'true' || needs.file-change.outputs.concrete-compiler-format-and-linting-workflow == 'true' || needs.file-change.outputs.push-main == 'true'
uses: ./.github/workflows/compiler_format_and_linting.yml
compiler-cpu-build:
needs: file-change
if: needs.file-change.outputs.compiler == 'true' || needs.file-change.outputs.concrete-cpu-api == 'true'|| needs.file-change.outputs.concrete-compiler-cpu-workflow == 'true' || needs.file-change.outputs.push-main == 'true'
uses: ./.github/workflows/start_slab.yml
secrets: inherit
with:
command: compiler-cpu-build
compiler-cpu-build-distributed:
needs: file-change
if: needs.file-change.outputs.compiler == 'true' || needs.file-change.outputs.concrete-cpu-api == 'true'|| needs.file-change.outputs.concrete-compiler-cpu-workflow == 'true' || needs.file-change.outputs.push-main == 'true'
uses: ./.github/workflows/start_slab.yml
secrets: inherit
with:
command: compiler-cpu-build-distributed
compiler-gpu-build:
needs: file-change
if: needs.file-change.outputs.compiler == 'true' || needs.file-change.outputs.concrete-cuda-api == 'true' || needs.file-change.outputs.concrete-compiler-gpu-workflow == 'true' || needs.file-change.outputs.push-main == 'true'
uses: ./.github/workflows/start_slab.yml
secrets: inherit
with:
command: compiler-gpu-build
compiler-macos-tests:
needs: file-change
if: needs.file-change.outputs.compiler == 'true' || needs.file-change.outputs.concrete-compiler-macos-workflow == 'true' || needs.file-change.outputs.push-main == 'true'
uses: ./.github/workflows/compiler_macos_build_and_test.yml
secrets: inherit
compiler-publish-docker-images:
needs: file-change
if: (needs.file-change.outputs.compiler == 'true' || needs.file-change.outputs.concrete-compiler-docker-images-workflow == 'true') && (needs.file-change.outputs.push-main == 'true' || contains(github.ref, 'refs/heads/force-docker-images'))
uses: ./.github/workflows/start_slab.yml
secrets: inherit
with:
command: compiler-publish-docker-images
compiler-cpu-benchmark:
needs: file-change
if: needs.file-change.outputs.push-main == 'true'
uses: ./.github/workflows/start_slab.yml
secrets: inherit
with:
command: compiler-cpu-benchmark
# compiler-gpu-benchmark:
# needs: file-change
# if: needs.file-change.outputs.push-main == 'true'
# uses: ./.github/workflows/start_slab.yml
# secrets: inherit
# with:
# command: compiler-gpu-benchmark
#################################################
# Optimizer jobs ################################
optimizer:
needs: file-change
if: |
needs.file-change.outputs.parameters-curves == 'true' ||
needs.file-change.outputs.concrete-cpu == 'true' ||
needs.file-change.outputs.optimizer == 'true'||
needs.file-change.outputs.push-main
uses: ./.github/workflows/optimizer.yml
secrets: inherit
#################################################
# ConcreteCPU jobs ##############################
concrete-cpu:
needs: file-change
if: needs.file-change.outputs.concrete-cpu == 'true' || needs.file-change.outputs.concrete-cpu-workflow == 'true' || needs.file-change.outputs.push-main
uses: ./.github/workflows/concrete_cpu_test.yml
secrets: inherit
#################################################
# Concrete Python jobs ##########################
concrete-python:
needs: file-change
if: needs.file-change.outputs.concrete-python == 'true' || needs.file-change.outputs.concrete-python-workflow == 'true' || needs.file-change.outputs.push-main
uses: ./.github/workflows/concrete_python_checks.yml
secrets: inherit
concrete-python-tests-linux:
needs: file-change
if: needs.file-change.outputs.concrete-python == 'true' || needs.file-change.outputs.push-main
uses: ./.github/workflows/start_slab.yml
secrets: inherit
with:
command: concrete-python-tests-linux
concrete-python-tests-linux-gpu:
needs: file-change
if: needs.file-change.outputs.concrete-python == 'true' && needs.file-change.outputs.push-main
uses: ./.github/workflows/start_slab.yml
secrets: inherit
with:
command: concrete-python-tests-linux-gpu
concrete-python-tests-macos:
needs: file-change
if: needs.file-change.outputs.concrete-python == 'true' || needs.file-change.outputs.push-main
uses: ./.github/workflows/concrete_python_test_macos.yml
secrets: inherit
#################################################
# Concrete-ML tests #############################
concrete-ml-tests-linux:
needs: file-change
if: needs.file-change.outputs.concrete-python == 'true' || needs.file-change.outputs.push-main
uses: ./.github/workflows/start_slab.yml
secrets: inherit
with:
command: ml-test
#################################################
# Release jobs #################################
concrete-python-nightly-release:
if: ${{ github.event_name == 'schedule' }}
uses: ./.github/workflows/start_slab.yml
secrets: inherit
with:
command: concrete-python-release
user_inputs: 'nightly'
concrete-python-nightly-release-gpu:
if: ${{ github.event_name == 'schedule' }}
uses: ./.github/workflows/start_slab.yml
secrets: inherit
with:
command: concrete-python-release-gpu
user_inputs: 'nightly'
concrete-python-public-release:
# needs: [compiler-cpu-build, compiler-macos-tests, compiler-publish-docker-images, concrete-python-tests-linux, concrete-python-tests-macos]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: ./.github/workflows/start_slab.yml
secrets: inherit
with:
command: concrete-python-release
user_inputs: 'public'
concrete-python-public-release-gpu:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: ./.github/workflows/start_slab.yml
secrets: inherit
with:
command: concrete-python-release-gpu
user_inputs: 'public'
concrete-python-private-release:
if: github.event_name == 'push' && contains(github.ref, 'refs/heads/private_release/')
uses: ./.github/workflows/start_slab.yml
secrets: inherit
with:
command: concrete-python-release
user_inputs: 'private'