move annotations for expensive operations into library layer #1103
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: CI Ubuntu | |
on: | |
push: | |
branches: | |
- "**" | |
paths-ignore: | |
- "**/website/**" | |
pull_request: | |
branches: | |
- "**" | |
paths-ignore: | |
- "**/website/**" | |
jobs: | |
momentum: | |
name: cpp${{ matrix.simd == 'ON' && '-simd' || '' }}-${{ matrix.mode == '' && 'opt' || 'dev' }}-ubuntu | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
simd: ["ON", "OFF"] | |
mode: ["", "_dev"] | |
env: | |
MOMENTUM_ENABLE_SIMD: ${{ matrix.simd }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up pixi | |
uses: prefix-dev/[email protected] | |
with: | |
cache: true | |
- name: Build and test Momentum | |
run: | | |
MOMENTUM_BUILD_PYMOMENTUM=$MOMENTUM_BUILD_PYMOMENTUM \ | |
MOMENTUM_ENABLE_SIMD=$MOMENTUM_ENABLE_SIMD \ | |
pixi run test${{ matrix.mode }} | |
- name: Install Momentum and Build hello_world | |
run: | | |
MOMENTUM_BUILD_PYMOMENTUM=$MOMENTUM_BUILD_PYMOMENTUM \ | |
MOMENTUM_ENABLE_SIMD=$MOMENTUM_ENABLE_SIMD \ | |
pixi run install | |
pixi run cmake \ | |
-S momentum/examples/hello_world \ | |
-B momentum/examples/hello_world/build \ | |
-DCMAKE_BUILD_TYPE=Release | |
pixi run cmake --build momentum/examples/hello_world/build | |
pymomentum: | |
name: py-${{ matrix.pixi_env }}-ubuntu | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- pixi_env: "cpu" | |
- pixi_env: "gpu" | |
cuda_version: "12.6.2" | |
env: | |
FULL_CUDA_VERSION: ${{ matrix.cuda_version }} | |
steps: | |
- name: Maximize build space | |
if: ${{ contains(matrix.pixi_env, 'cuda') || contains(matrix.pixi_env, 'gpu') }} | |
uses: easimon/maximize-build-space@master | |
with: | |
root-reserve-mb: 32768 | |
remove-dotnet: true | |
remove-android: true | |
remove-haskell: true | |
remove-codeql: true | |
remove-docker-images: true | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install CUDA Toolkit | |
if: ${{ contains(matrix.pixi_env, 'cuda') || contains(matrix.pixi_env, 'gpu') }} | |
uses: Jimver/[email protected] | |
id: cuda-toolkit | |
with: | |
# Available versions: https://github.com/Jimver/cuda-toolkit/blob/v0.2.18/src/links/linux-links.ts | |
cuda: ${{ matrix.cuda_version }} | |
- name: Check CUDA Version | |
if: ${{ contains(matrix.pixi_env, 'cuda') || contains(matrix.pixi_env, 'gpu') }} | |
run: | | |
nvcc --version | |
- name: Set Conda environment variables | |
if: ${{ contains(matrix.pixi_env, 'cuda') || contains(matrix.pixi_env, 'gpu') }} | |
run: | | |
echo "CONDA_OVERRIDE_CUDA=$(echo $FULL_CUDA_VERSION | cut -d'.' -f1)" >> $GITHUB_ENV | |
- name: Set up pixi | |
uses: prefix-dev/[email protected] | |
with: | |
environments: ${{ matrix.pixi_env }} | |
cache: true | |
- name: Build PyMomentum | |
run: | | |
pixi run -e ${{ matrix.pixi_env }} test_py |