Skip to content

fix: speed up Mooncake reverse mode with selective zeroing #2356

fix: speed up Mooncake reverse mode with selective zeroing

fix: speed up Mooncake reverse mode with selective zeroing #2356

Workflow file for this run

name: Test
on:
push:
branches:
- main
tags: ['*']
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
workflow_dispatch:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test-DI:
name: ${{ matrix.version }} - DI (${{ matrix.group }})
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skipci') }}
timeout-minutes: 120
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
actions: write
contents: read
strategy:
fail-fast: true # TODO: toggle
matrix:
version:
# - '1.10'
- '1.11'
- '1.12'
group:
- Core/Internals
# - Back/DifferentiateWith
# - Core/SimpleFiniteDiff
# - Back/SparsityDetector
# - Core/ZeroBackends
# - Back/ChainRules
# - Back/Diffractor
# - Back/Enzyme
# - Back/FastDifferentiation
# - Back/FiniteDiff
# - Back/FiniteDifferences
# - Back/ForwardDiff
# - Back/GTPSA
- Back/Mooncake
# - Back/PolyesterForwardDiff
# - Back/ReverseDiff
# - Back/Symbolics
# - Back/Tracker
# - Back/Zygote
skip_lts:
- ${{ github.event.pull_request.draft }}
skip_pre:
- ${{ github.event.pull_request.draft }}
exclude:
- skip_lts: true
version: '1.10'
- skip_pre: true
version: '1.12'
- version: '1.11'
group: Back/ChainRules
- version: '1.12'
group: Back/Enzyme
- version: '1.12'
group: Back/DifferentiateWith
env:
JULIA_DI_TEST_GROUP: ${{ matrix.group }}
JULIA_DI_PR_DRAFT: ${{ github.event.pull_request.draft }}
steps:
- uses: actions/checkout@v5
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: x64
- uses: julia-actions/cache@v2
- name: Install dependencies & run tests
run: julia --color=yes -e '
using Pkg;
Pkg.Registry.update();
Pkg.activate("./DifferentiationInterface/test");
if VERSION < v"1.11";
Pkg.rm("DifferentiationInterfaceTest");
Pkg.resolve();
else;
Pkg.develop(; path="./DifferentiationInterfaceTest");
end;
Pkg.activate("./DifferentiationInterface");
test_kwargs = (; allow_reresolve=false, coverage=true);
if ENV["JULIA_DI_PR_DRAFT"] == "true";
Pkg.test("DifferentiationInterface"; julia_args=["-O1"], test_kwargs...);
else;
Pkg.test("DifferentiationInterface"; test_kwargs...);
end;'
- uses: julia-actions/julia-processcoverage@v1
with:
directories: ./DifferentiationInterface/src,./DifferentiationInterface/ext,./DifferentiationInterface/test
- uses: codecov/codecov-action@v5
with:
files: lcov.info
flags: DI
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
# test-DIT:
# name: ${{ matrix.version }} - DIT (${{ matrix.group }})
# runs-on: ubuntu-latest
# if: ${{ !contains(github.event.pull_request.labels.*.name, 'skipci') }}
# timeout-minutes: 60
# permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
# actions: write
# contents: read
# strategy:
# fail-fast: true
# matrix:
# version:
# - '1.10'
# - '1.11'
# - '1.12'
# group:
# - Formalities
# - Zero
# - Standard
# - Weird
# skip_lts:
# - ${{ github.event.pull_request.draft }}
# skip_pre:
# - ${{ github.event.pull_request.draft }}
# exclude:
# - skip_lts: true
# version: '1.10'
# - skip_pre: true
# version: '1.12'
# env:
# JULIA_DIT_TEST_GROUP: ${{ matrix.group }}
# JULIA_DI_PR_DRAFT: ${{ github.event.pull_request.draft }}
# steps:
# - uses: actions/checkout@v5
# - uses: julia-actions/setup-julia@v2
# with:
# version: ${{ matrix.version }}
# arch: x64
# - uses: julia-actions/cache@v2
# - name: Install dependencies & run tests
# run: julia --project=./DifferentiationInterfaceTest --color=yes -e '
# using Pkg;
# Pkg.Registry.update();
# Pkg.develop(path="./DifferentiationInterface");
# if ENV["JULIA_DI_PR_DRAFT"] == "true";
# Pkg.test("DifferentiationInterfaceTest"; allow_reresolve=false, coverage=true, julia_args=["-O1"]);
# else;
# Pkg.test("DifferentiationInterfaceTest"; allow_reresolve=false, coverage=true);
# end;'
# - uses: julia-actions/julia-processcoverage@v1
# with:
# directories: ./DifferentiationInterfaceTest/src,./DifferentiationInterfaceTest/ext,./DifferentiationInterfaceTest/test
# - uses: codecov/codecov-action@v5
# with:
# files: lcov.info
# flags: DIT
# token: ${{ secrets.CODECOV_TOKEN }}
# fail_ci_if_error: false