Skip to content

Update Mooncake requirement from 0.4.196 to 0.4.196, 0.5#303

Merged
FriesischScott merged 1 commit intomasterfrom
dependabot/julia/Mooncake-0.4.196-and-0.5
Apr 17, 2026
Merged

Update Mooncake requirement from 0.4.196 to 0.4.196, 0.5#303
FriesischScott merged 1 commit intomasterfrom
dependabot/julia/Mooncake-0.4.196-and-0.5

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github Apr 1, 2026

Updates the requirements on Mooncake to permit the latest version.

Release notes

Sourced from Mooncake's releases.

v0.5.24

Mooncake v0.5.24

Diff since v0.5.23

Merged pull requests:

  • Add AD rules for det/logdet/logabsdet on Symmetric matrices (fixes #819) (#1055) (@​yebai)
  • fix getrs! Core.Box instability + perf bounds (#1058) (@​yebai)
  • batched_matmul_fallback handling for NNlib.Batched Transpose, Adjoint (#1067) (@​AstitvaAggarwal)
  • Fix primal_ir to work with non-differentiable code (#1068) (@​yebai)
  • Show source location of failing method in MooncakeRuleCompilationError (#1069) (@​yebai)
  • Fix DI second-order test to only run intended variant per CI job (#1070) (@​yebai)
  • fix(ndual): branchless min/max/clamp/flipsign/copysign; cache tanh; optimize Complex sqrt (#1071) (@​yebai)
  • fix(cuda): free NDual arrays in sum(f,x) rrules; factor pullback helper; fix allocs (#1072) (@​yebai)
  • Extract repeated BLAS guard blocks into helpers; pre-compute cumprod inv (#1073) (@​yebai)
  • Fix three minor issues in GPU mutation rules (PR 1064 follow-up) (#1074) (@​yebai)
  • Use _model_name in Lux testset titles (PR 1065 follow-up) (#1075) (@​yebai)
  • Add batch-size-1 broadcast test coverage for batched_matmul_fallback (#1076) (@​yebai)
  • fix(@​zero_derivative): support parametric Vararg{T} and Vararg{T,N} (#1078) (@​yebai)
  • feat: add Mooncake.stop_gradient to block gradient flow (#1079) (@​yebai)
  • LuxLib fix followup (#1080) (@​AstitvaAggarwal)
  • fix(1.10): guard DebugRRule invalid CoDual specializations (#1085) (@​yebai)
  • Move world-age DI test and remove second-order ext suite (#1088) (@​yebai)
  • refactor: simplify count_allocs using @​generated (#1093) (@​yebai)
  • refactor: replace Tcount_allocs barrier with inlinable __count_allocs (#1094) (@​yebai)

Closed issues:

  • GPU Rules and tests (#278)
  • Integration Benchmarks (#520)
  • Handling recursive types automatically (#602)
  • Source location in rrule!! stack traces (#649)
  • Mooncake.primal_ir errors if primal code contains non-differentiable code (#668)
  • Implement all benchmarking cases for gradben.ch (#795)
  • Missing rrule for logdet of symmetric matrices (#819)
  • more informative error message for Vararg in @zero_derivative. (#923)
  • customised tangent types and testing for ROCArray (#924)
  • Inconsistent gradients for forward and reverse mode (#992)
  • Reduce use of community CI resources (#1086)
Changelog

Sourced from Mooncake's changelog.

0.5.24

Add stop_gradient(x) to block gradient propagation, analogous to tf.stop_gradient in TensorFlow and jax.lax.stop_gradient in JAX.

julia> using Mooncake
julia> f(x) = x[1] * Mooncake.stop_gradient(x)[2]
f (generic function with 1 method)
julia> cache = Mooncake.prepare_gradient_cache(f, [3.0, 4.0]);
julia> , (, g) = Mooncake.value_and_gradient!!(cache, f, [3.0, 4.0]);
julia> g  # g[2] == 0.0: gradient through x[2] inside stop_gradient is blocked
2-element Vector{Float64}:
4.0
0.0

0.5.23

CUDA extension

Differentiation support for standard Julia/CUDA operations, focusing on:

Linear algebra — BLAS matrix–vector products, dot, norm, and reductions (sum, prod, cumsum, cumprod, mapreduce) are supported, including complex inputs. Vector indexing is also supported for CUDA arrays. Scalar indexing is not supported by design.

# matrix multiply
f = (A, B) -> sum(A * B)
A, B = CUDA.randn(Float32, 4, 4), CUDA.randn(Float32, 4, 4)
cache = prepare_gradient_cache(f, A, B)
_, (_, ∂A, ∂B) = value_and_gradient!!(cache, f, A, B)
matrix-vector multiply
f = (A, x) -> sum(A * x)
A, x = CUDA.randn(Float32, 4, 4), CUDA.randn(Float32, 4)
cache = prepare_gradient_cache(f, A, x)
, (, ∂A, ∂x) = value_and_gradient!!(cache, f, A, x)
norm², dot, mean — same pattern
f = x -> norm(x)^2
f = (x, y) -> dot(x, y)
f = x -> mapreduce(abs2, +, x) / length(x)
complex inputs work too
f = A -> real(sum(A * adjoint(A)))

Broadcasting — CUDA.jl compiles a specialised GPU kernel for each broadcast expression at runtime via cufunction. From Mooncake's perspective, this kernel appears as a foreigncall — opaque LLVM or PTX code that cannot be traced. To differentiate through it, Mooncake exploits CUDA.jl's support for user-defined GPU-compatible types: NDual dual numbers are registered as valid GPU element types, so the same cufunction machinery re-compiles the kernel for dual-number inputs. Derivatives are carried alongside primal values in a single GPU pass — no separate AD kernel is required, and any broadcastable function is automatically differentiable. This is the same strategy as Zygote's broadcast_forward:

... (truncated)

Commits
  • 751e2a9 Bump version from 0.5.23 to 0.5.24
  • 0aa4922 Update HISTORY.md for version 0.5.24
  • 03f54ff feat: add Mooncake.stop_gradient to block gradient flow (#1079)
  • 3506504 refactor: replace Tcount_allocs barrier with inlinable __count_allocs (#1094)
  • 291a3c6 refactor: simplify count_allocs using @​generated (#1093)
  • e6d1e13 Remove version '1.11' from pipeline setup matrix
  • bf1fce4 Move world-age DI test and drop second-order ext suite (#1088)
  • 34883ec fix(1.10): guard DebugRRule invalid CoDual specializations (#1085)
  • 498fdee Add AD rules for det/logdet/logabsdet on Symmetric matrices (fixes #819) (#1055)
  • 7d5c9e7 Fix primal_ir to work with non-differentiable code (#1068)
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [Mooncake](https://github.com/chalk-lab/Mooncake.jl) to permit the latest version.
- [Release notes](https://github.com/chalk-lab/Mooncake.jl/releases)
- [Changelog](https://github.com/chalk-lab/Mooncake.jl/blob/main/HISTORY.md)
- [Commits](chalk-lab/Mooncake.jl@v0.4.196...v0.5.24)

---
updated-dependencies:
- dependency-name: Mooncake
  dependency-version: 0.5.24
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file julia Pull requests that update julia code labels Apr 1, 2026
@FriesischScott FriesischScott merged commit 51396b9 into master Apr 17, 2026
9 checks passed
@FriesischScott FriesischScott deleted the dependabot/julia/Mooncake-0.4.196-and-0.5 branch April 17, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file julia Pull requests that update julia code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant