Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
7bc8a17
Bump actions/checkout from 4 to 5
dependabot[bot] Aug 12, 2025
3bfd459
Migrate to Enzyme easy_rule
wsmoses Oct 27, 2025
6e798c2
Merge pull request #29 from wsmoses/er
ChrisRackauckas Oct 28, 2025
9230903
Bump version from 1.1.3 to 1.2.0
ChrisRackauckas Oct 28, 2025
4d2acf5
Merge pull request #20 from SciML/dependabot/github_actions/actions/c…
ChrisRackauckas Nov 18, 2025
df34e2b
Add ignore rule for crate-ci/typos in Dependabot
ChrisRackauckas Nov 18, 2025
f2e989b
Bump actions/checkout from 5 to 6
dependabot[bot] Nov 24, 2025
94123ce
Merge pull request #32 from SciML/dependabot/github_actions/actions/c…
ChrisRackauckas Nov 25, 2025
84dc62a
Update dependabot.yml to add Julia ecosystem support
ChrisRackauckas-Claude Dec 2, 2025
e94526a
Remove CompatHelper.yml (replaced by Dependabot)
ChrisRackauckas-Claude Dec 2, 2025
415b9d1
Merge pull request #34 from ChrisRackauckas-Claude/migrate-to-dependabot
ChrisRackauckas Dec 2, 2025
0ae9f31
Fix CI: Exclude Enzyme tests from Julia pre
ChrisRackauckas Dec 29, 2025
b9b5c58
Merge pull request #36 from ChrisRackauckas-Claude/fix-ci-20251229
ChrisRackauckas Dec 29, 2025
8ddae21
Update Project.toml
ChrisRackauckas Dec 29, 2025
6b4efed
Fix minimum version bounds for Measurements and ReverseDiff
claude Jan 2, 2026
7b8322b
Merge branch 'main' into fix-min-versions-20260102-012843
ChrisRackauckas Jan 2, 2026
a569ca7
Merge pull request #38 from ChrisRackauckas-Claude/fix-min-versions-2…
ChrisRackauckas Jan 2, 2026
d20127c
Switch from JuliaFormatter to Runic.jl for code formatting
claude Jan 4, 2026
f6a68df
Merge pull request #39 from ChrisRackauckas-Claude/runic-formatting
ChrisRackauckas Jan 4, 2026
4c0d138
Bump actions/checkout from 4 to 6
dependabot[bot] Jan 5, 2026
19a650a
Merge pull request #40 from SciML/dependabot/github_actions/actions/c…
ChrisRackauckas Jan 5, 2026
959d537
Update Mooncake requirement 0.5
dependabot[bot] Jan 28, 2026
f0bb2b7
Merge pull request #41 from SciML/dependabot/julia/all-julia-packages…
ChrisRackauckas Jan 28, 2026
d4adedf
Update Project.toml
ChrisRackauckas Jan 28, 2026
b61416e
Bump codecov/codecov-action from 5 to 6
dependabot[bot] Apr 6, 2026
849af81
Merge pull request #43 from SciML/dependabot/github_actions/codecov/c…
oscardssmith Apr 6, 2026
d140144
Bump julia-actions/setup-julia from 2 to 3
dependabot[bot] Apr 20, 2026
72943b4
Merge pull request #44 from SciML/dependabot/github_actions/julia-act…
ChrisRackauckas Apr 20, 2026
f4edebd
CI: install Julia in FormatCheck workflow so runic-action can run
ChrisRackauckas May 9, 2026
ae30d2d
Merge pull request #45 from ChrisRackauckas-Claude/fix-formatcheck-ju…
ChrisRackauckas May 10, 2026
a14f5bd
Bump julia-actions/setup-julia from 2 to 3
dependabot[bot] May 12, 2026
fdea554
Merge pull request #46 from SciML/dependabot/github_actions/julia-act…
ChrisRackauckas May 12, 2026
7a37535
Remove enable-beta-ecosystems flag (Julia no longer beta in Dependabot)
ChrisRackauckas May 30, 2026
79670e2
Centralize CI to SciML reusable workflows
ChrisRackauckas Jun 3, 2026
a1f6370
Merge pull request #47 from ChrisRackauckas-Claude/centralize-ci
ChrisRackauckas Jun 3, 2026
1c3121c
ci: add standard centralized workflows (#48)
ChrisRackauckas-Claude Jun 7, 2026
30d6b9d
Drop allow-reresolve input from downgrade workflow(s) (#49)
ChrisRackauckas-Claude Jun 7, 2026
087407f
Canonical CI cleanup: TagBot thin-caller + downgrade-caller cleanup (…
ChrisRackauckas-Claude Jun 8, 2026
df74a77
Canonical CI: grouped-tests.yml + root test/test_groups.toml (#51)
ChrisRackauckas-Claude Jun 10, 2026
bfd80f5
Use SciMLTesting v1.2 folder-based run_tests (#54)
ChrisRackauckas-Claude Jun 14, 2026
396931b
Release v1.3.2 (#57)
ChrisRackauckas Jun 23, 2026
6028e01
QA: run_qa v1.6 form + ExplicitImports (#59)
ChrisRackauckas-Claude Jun 25, 2026
9209a42
Fix flaky Enzyme test_forward/test_reverse: StableRNG + accuracy-matc…
ChrisRackauckas-Claude Jun 26, 2026
b6bd454
Release v1.3.3 (#60)
ChrisRackauckas Jun 26, 2026
b773593
Raise Mooncake compat floor to 0.5.36 (fix Downgrade resolution)
ChrisRackauckas Jul 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .JuliaFormatter.toml

This file was deleted.

12 changes: 9 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
ignore:
- dependency-name: "crate-ci/typos"
update-types: ["version-update:semver-patch", "version-update:semver-minor"]
- package-ecosystem: "julia"
directories:
- "/"
schedule:
interval: "daily"
groups:
all-julia-packages:
patterns:
- "*"
16 changes: 0 additions & 16 deletions .github/workflows/CompatHelper.yml

This file was deleted.

9 changes: 9 additions & 0 deletions .github/workflows/DependabotAutoMerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: "Dependabot Auto-merge"
on: pull_request
permissions:
contents: write
pull-requests: write
jobs:
automerge:
uses: "SciML/.github/.github/workflows/dependabot-automerge.yml@v1"
secrets: "inherit"
21 changes: 4 additions & 17 deletions .github/workflows/Downgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,7 @@ on:
- 'docs/**'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
downgrade_mode: ['alldeps']
julia-version: ['1.10']
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
- uses: julia-actions/julia-downgrade-compat@v2
with:
skip: Pkg,TOML
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
with:
ALLOW_RERESOLVE: false
uses: "SciML/.github/.github/workflows/downgrade.yml@v1"
with:
julia-version: "lts"
secrets: "inherit"
53 changes: 9 additions & 44 deletions .github/workflows/Downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,10 @@ concurrency:
jobs:
test:
name: ${{ matrix.package.repo }}/${{ matrix.package.group }}/${{ matrix.julia-version }}
runs-on: ${{ matrix.os }}
env:
GROUP: ${{ matrix.package.group }}
strategy:
fail-fast: false
matrix:
julia-version: [1]
os: [ubuntu-latest]
julia-version: ["1"]
package:
- {user: SciML, repo: OrdinaryDiffEq.jl, group: InterfaceI}
- {user: SciML, repo: OrdinaryDiffEq.jl, group: InterfaceII}
Expand All @@ -31,42 +27,11 @@ jobs:
- {user: SciML, repo: OrdinaryDiffEq.jl, group: RegressionI}
- {user: SciML, repo: OrdinaryDiffEq.jl, group: RegressionII}
- {user: SciML, repo: SimpleDiffEq.jl, group: Core}

steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
arch: x64
- uses: julia-actions/julia-buildpkg@latest
- name: Clone Downstream
uses: actions/checkout@v4
with:
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
path: downstream
- name: Load this and run the downstream tests
shell: julia --color=yes --project=downstream {0}
run: |
using Pkg
try
# force it to use this PR's version of the package
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
Pkg.update()
Pkg.test(coverage=true) # resolver may fail with test time deps
catch err
err isa Pkg.Resolve.ResolverError || rethrow()
# If we can't resolve that means this is incompatible by SemVer and this is fine
# It means we marked this as a breaking change, so we don't need to worry about
# Mistakenly introducing a breaking change, as we have intentionally made one
@info "Not compatible with this release. No problem." exception=err
exit(0) # Exit immediately, as a success
end
env:
RETESTITEMS_NWORKERS: 4
RETESTITEMS_NWORKER_THREADS: 2
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
uses: "SciML/.github/.github/workflows/downstream.yml@v1"
with:
julia-version: "${{ matrix.julia-version }}"
julia-arch: "x64"
owner: "${{ matrix.package.user }}"
repo: "${{ matrix.package.repo }}"
group: "${{ matrix.package.group }}"
secrets: "inherit"
13 changes: 9 additions & 4 deletions .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
name: "Format Check"
name: format-check

on:
push:
branches:
- 'master'
- 'main'
- 'release-'
tags: '*'
pull_request:

jobs:
format-check:
name: "Format Check"
uses: "SciML/.github/.github/workflows/format-check.yml@v1"
runic:
uses: "SciML/.github/.github/workflows/runic.yml@v1"
with:
julia-version: "1"
runic-version: "1"
secrets: "inherit"
9 changes: 9 additions & 0 deletions .github/workflows/RunicSuggestions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: "Runic Suggestions"
on: pull_request
permissions:
contents: read
pull-requests: write
jobs:
runic-suggestions:
uses: "SciML/.github/.github/workflows/runic-suggestions-on-pr.yml@v1"
secrets: "inherit"
8 changes: 2 additions & 6 deletions .github/workflows/SpellCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,5 @@ on: [pull_request]
jobs:
typos-check:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/typos@v1.18.0
uses: "SciML/.github/.github/workflows/spellcheck.yml@v1"
secrets: "inherit"
16 changes: 5 additions & 11 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
name: TagBot
name: "TagBot"
on:
issue_comment:
types:
- created
types: [created]
workflow_dispatch:
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
tagbot:
uses: "SciML/.github/.github/workflows/tagbot.yml@v1"
secrets: "inherit"
15 changes: 1 addition & 14 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,5 @@ concurrency:

jobs:
tests:
name: "Tests"
strategy:
fail-fast: false
matrix:
version:
- "1"
- "lts"
- "pre"
group:
- Core
uses: "SciML/.github/.github/workflows/tests.yml@v1"
with:
julia-version: "${{ matrix.version }}"
group: "${{ matrix.group }}"
uses: "SciML/.github/.github/workflows/grouped-tests.yml@v1"
secrets: "inherit"
22 changes: 15 additions & 7 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "FastPower"
uuid = "a4df4552-cc26-4903-aec0-212e50a0e84b"
authors = ["Chris Rackauckas <accounts@chrisrackauckas.com>"]
version = "1.1.3"
version = "1.3.4"

[deps]

Expand All @@ -24,12 +24,17 @@ FastPowerReverseDiffExt = "ReverseDiff"
FastPowerTrackerExt = "Tracker"

[compat]
Enzyme = "0.13"
Enzyme = "0.13.89"
EnzymeTestUtils = "0.2"
ForwardDiff = "0.10, 1"
Measurements = "2"
Measurements = "2.5"
MonteCarloMeasurements = "1"
Mooncake = "0.4"
ReverseDiff = "1"
Mooncake = "0.5.36"
ReverseDiff = "1.14"
SafeTestsets = "0.1, 1"
SciMLTesting = "1"
StableRNGs = "1"
Test = "1"
Tracker = "0.2"
julia = "1.10"

Expand All @@ -39,8 +44,11 @@ EnzymeTestUtils = "12d8515a-0907-448a-8884-5fe00fdf1c5a"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"

[targets]
test = ["Test", "Enzyme", "EnzymeTestUtils", "ForwardDiff", "Mooncake", "ReverseDiff", "Tracker"]
test = ["Enzyme", "EnzymeTestUtils", "ForwardDiff", "Mooncake", "ReverseDiff", "SafeTestsets", "SciMLTesting", "StableRNGs", "Test", "Tracker"]
52 changes: 4 additions & 48 deletions ext/FastPowerEnzymeExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,53 +5,9 @@ import FastPower: fastpower
using Enzyme
using Enzyme.EnzymeRules: FwdConfig

function Enzyme.EnzymeRules.forward(config::FwdConfig,
func::Const{typeof(FastPower.fastpower)},
RT::Type{<:Union{Duplicated, DuplicatedNoNeed}},
_x::Union{Const, Duplicated}, _y::Union{Const, Duplicated})
x = _x.val
y = _y.val
ret = func.val(x, y)
T = typeof(ret)
if !(_x isa Const)
dxval = _x.dval * y * (fastpower(x, y - 1))
else
dxval = make_zero(_x.val)
end
if !(_y isa Const)
dyval = x isa Real && x<=0 ? Base.oftype(float(x), NaN) :
_y.dval*(fastpower(x, y))*log(x)
else
dyval = make_zero(_y.val)
end
if RT <: DuplicatedNoNeed
return convert(T, dxval + dyval)
else
return Duplicated(ret, convert(T, dxval + dyval))
end
end

function EnzymeRules.augmented_primal(config::Enzyme.EnzymeRules.RevConfigWidth{1},
func::Const{typeof(fastpower)}, ::Union{Type{<:Active}, Type{<:Const}},
x::Union{Const, Active}, y::Union{Const, Active})
if EnzymeRules.needs_primal(config)
primal = func.val(x.val, y.val)
else
primal = nothing
end
return EnzymeRules.AugmentedReturn(primal, nothing, nothing)
end

function EnzymeRules.reverse(config::Enzyme.EnzymeRules.RevConfigWidth{1},
func::Const{typeof(fastpower)}, dret, tape, _x::Union{Const, Active}, _y::Union{
Const, Active})
x = _x.val
y = _y.val
dxval = _x isa Const ? nothing : dret.val * y * (fastpower(x, y - 1))
dyval = _y isa Const ? nothing :
(x isa Real && x<=0 ? Base.oftype(float(x), NaN) :
dret.val * (fastpower(x, y)) * log(x))
return (dxval, dyval)
end
Enzyme.EnzymeRules.@easy_rule(
FastPower.fastpower(x, y),
(y * fastpower(x, y - 1), Ω * log(x))
)

end
8 changes: 5 additions & 3 deletions ext/FastPowerMonteCarloMeasurementsExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ module FastPowerMonteCarloMeasurementsExt
using FastPower
using MonteCarloMeasurements

@inline function FastPower.fastpower(x::MonteCarloMeasurements.AbstractParticles,
y::MonteCarloMeasurements.AbstractParticles)
x^y
@inline function FastPower.fastpower(
x::MonteCarloMeasurements.AbstractParticles,
y::MonteCarloMeasurements.AbstractParticles
)
return x^y
end

end
28 changes: 28 additions & 0 deletions test/Enzyme/enzyme_forward_tests.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using FastPower: fastpower
using Enzyme, EnzymeTestUtils
using StableRNGs
using Test

# `test_forward` compares the rule (which returns the *exact* `^` derivative) against finite
# differences of the *approximate* `fastpower` primal. Because `fastpower` routes through a
# Float32 `fastlog2` polynomial, the *slope* of its primal differs from the exact slope by
# ~1e-2 relative near x=1 (even where the primal value itself is exact), so the FD reference
# is off from the exact rule by that inherent approximation error rather than by any rule bug.
# The previous atol=1e-4, rtol=1e-3 sat below that gap, so whether the lane passed depended on
# the random tangents `test_forward` drew from the global RNG (it went red ~4% of the time).
#
# Fix: draw the tangents from a StableRNG (a fixed seed gives the *same* stream on every Julia
# version, unlike the global RNG / Xoshiro whose stream can change across versions) so the test
# is genuinely deterministic, and use atol=1e-3, rtol=1e-2 matched to `fastpower`'s documented
# accuracy envelope (see test/fast_pow_tests.jl). That tolerance is ~5x above the measured
# worst-case relative discrepancy in this grid (~2e-3) yet far below the O(1) relative error a
# genuinely wrong derivative rule would produce, so real regressions are still caught. Reverting
# to rtol=1e-3 is not possible without cherry-picking a lucky seed to hide the inherent gap.
rng = StableRNG(123)
@testset for RT in (Duplicated, DuplicatedNoNeed),
Tx in (Const, Duplicated),
Ty in (Const, Duplicated)
x = 1.0
y = 0.5
test_forward(fastpower, RT, (x, Tx), (y, Ty), rng = rng, atol = 1.0e-3, rtol = 1.0e-2)
end
15 changes: 15 additions & 0 deletions test/Enzyme/enzyme_reverse_tests.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using FastPower: fastpower
using Enzyme, EnzymeTestUtils
using StableRNGs
using Test

# See test/Enzyme/enzyme_forward_tests.jl: the finite-difference reference is taken on the
# approximate `fastpower` primal, so the tolerance must cover its inherent approximation error.
# Draw the cotangents from a StableRNG (stream is identical across Julia versions, so the test
# is deterministic) and match `fastpower`'s documented accuracy with atol=1e-3, rtol=1e-2.
rng = StableRNG(123)
@testset for RT in (Active,), Tx in (Active, Const), Ty in (Active, Const)
x = 1.0
y = 0.5
test_reverse(fastpower, RT, (x, Tx), (y, Ty), rng = rng, atol = 1.0e-3, rtol = 1.0e-2)
end
6 changes: 6 additions & 0 deletions test/fast_log2_tests.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using FastPower: fastlog2
using Test

for x in 0.001:0.001:1.2 # (0, 1+something] is the domain which a controller uses
@test log2(x) ≈ fastlog2(Float32(x)) atol = 1.0e-3
end
Loading
Loading