feat(gpu): implement scalar eq/ne #217
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
# Compile and test Concrete-cuda on an AWS instance | |
name: Concrete Cuda - Full tests | |
env: | |
CARGO_TERM_COLOR: always | |
ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
RUSTFLAGS: "-C target-cpu=native" | |
RUST_BACKTRACE: "full" | |
on: | |
# Allows you to run this workflow manually from the Actions tab as an alternative. | |
workflow_dispatch: | |
pull_request: | |
jobs: | |
setup-ec2: | |
name: Setup EC2 instance (cuda-tests) | |
runs-on: ubuntu-latest | |
outputs: | |
runner-name: ${{ steps.start-instance.outputs.label }} | |
instance-id: ${{ steps.start-instance.outputs.ec2-instance-id }} | |
steps: | |
- name: Start instance | |
id: start-instance | |
uses: zama-ai/slab-github-runner@ab65ad70bb9f9e9251e4915ea5612bcad23cd9b1 | |
with: | |
mode: start | |
github-token: ${{ secrets.SLAB_ACTION_TOKEN }} | |
slab-url: ${{ secrets.SLAB_BASE_URL }} | |
job-secret: ${{ secrets.JOB_SECRET }} | |
profile: gpu-test | |
cuda-tests-linux: | |
name: CUDA tests | |
needs: setup-ec2 | |
concurrency: | |
group: ${{ github.workflow }}_${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
runs-on: ${{ needs.setup-ec2.outputs.runner-name }} | |
strategy: | |
fail-fast: false | |
# explicit include-based build matrix, of known valid options | |
matrix: | |
include: | |
- os: ubuntu-22.04 | |
cuda: "12.2" | |
gcc: 9 | |
env: | |
CUDA_PATH: /usr/local/cuda-${{ matrix.cuda }} | |
steps: | |
- name: Checkout tfhe-rs | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: Set up home | |
run: | | |
echo "HOME=/home/ubuntu" >> "${GITHUB_ENV}" | |
- name: Install latest stable | |
uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 | |
with: | |
toolchain: stable | |
- name: Export CUDA variables | |
if: ${{ !cancelled() }} | |
run: | | |
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}" | |
echo "CUDACXX=/usr/local/cuda-${{ matrix.cuda }}/bin/nvcc" >> "${GITHUB_ENV}" | |
# Specify the correct host compilers | |
- name: Export gcc and g++ variables | |
if: ${{ !cancelled() }} | |
run: | | |
echo "CC=/usr/bin/gcc-${{ matrix.gcc }}" >> "${GITHUB_ENV}" | |
echo "CXX=/usr/bin/g++-${{ matrix.gcc }}" >> "${GITHUB_ENV}" | |
echo "CUDAHOSTCXX=/usr/bin/g++-${{ matrix.gcc }}" >> "${GITHUB_ENV}" | |
echo "HOME=/home/ubuntu" >> "${GITHUB_ENV}" | |
- name: Run fmt checks | |
run: | | |
make check_fmt_gpu | |
- name: Run clippy checks | |
run: | | |
make clippy_gpu | |
- name: Run all tests | |
run: | | |
make test_gpu | |
- name: Run user docs tests | |
run: | | |
make test_user_doc_gpu | |
- name: Slack Notification | |
if: ${{ always() }} | |
continue-on-error: true | |
uses: rtCamp/action-slack-notify@b24d75fe0e728a4bf9fc42ee217caa686d141ee8 | |
env: | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }} | |
SLACK_ICON: https://pbs.twimg.com/profile_images/1274014582265298945/OjBKP9kn_400x400.png | |
SLACK_MESSAGE: "CUDA AWS tests finished with status: ${{ job.status }}. (${{ env.ACTION_RUN_URL }})" | |
SLACK_USERNAME: ${{ secrets.BOT_USERNAME }} | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
teardown-ec2: | |
name: Teardown EC2 instance (cuda-tests) | |
if: ${{ always() }} | |
needs: [ setup-ec2, cuda-tests-linux ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Stop instance | |
id: stop-instance | |
uses: zama-ai/slab-github-runner@ab65ad70bb9f9e9251e4915ea5612bcad23cd9b1 | |
with: | |
mode: stop | |
github-token: ${{ secrets.SLAB_ACTION_TOKEN }} | |
slab-url: ${{ secrets.SLAB_BASE_URL }} | |
job-secret: ${{ secrets.JOB_SECRET }} | |
profile: gpu-test | |
label: ${{ needs.setup-ec2.outputs.runner-name }} |