Skip to content

add native Enzyme rules and enhanced autodiff support#76

Merged
kylebeggs merged 19 commits intomainfrom
enzyme
Feb 13, 2026
Merged

add native Enzyme rules and enhanced autodiff support#76
kylebeggs merged 19 commits intomainfrom
enzyme

Conversation

@kylebeggs
Copy link
Member

Summary

  • Add native EnzymeRules (forward and reverse) for basis functions, operators, interpolators, and _build_weights
  • Implement BLAS-optimized backward pass infrastructure (src/solve/backward.jl) for efficient gradient computation
  • Add shape parameter differentiation for IMQ and Gaussian basis functions (second derivative operators)
  • Add ChainRulesCore rrule for Interpolator construction (enables Mooncake.jl autodiff through construction)
  • Migrate autodiff test suite to DifferentiationInterface.jl for unified testing across backends
  • Add new autodiff documentation page with usage examples

Details

Enzyme Support

Native EnzymeRules are implemented for all core operations, avoiding the need for Enzyme to trace through complex RBF weight computation. Forward and reverse rules are provided for:

  • Basis function evaluation (PHS, IMQ, Gaussian)
  • RadialBasisOperator application
  • Interpolator evaluation
  • _build_weights (the core weight computation kernel)

Shape Parameter Derivatives

Second derivative operators (∂², ∇², H) are implemented for IMQ and Gaussian basis functions in dedicated files, enabling differentiation of _build_weights with respect to shape parameters.

Interpolator Construction Rule

A ChainRulesCore.rrule is added for Interpolator construction, working around the factorize Union return type that blocks Enzyme. This rule is usable via Mooncake.jl through DifferentiationInterface.

Testing

All autodiff tests use DifferentiationInterface.jl with both Enzyme and Mooncake backends, testing:

  • Operator application derivatives (Partial, Laplacian, Gradient)
  • Interpolator evaluation derivatives
  • Interpolator construction derivatives (Mooncake only, via rrule)

Test plan

  • All existing tests pass
  • New autodiff tests pass with Enzyme backend
  • New autodiff tests pass with Mooncake backend
  • CI passes on all supported Julia versions

Closes #71
Closes #74

🤖 Generated with Claude Code

kylebeggs and others added 10 commits January 28, 2026 14:57
Replace @import_rrule bridging approach with native augmented_primal + reverse
implementations for better performance and decoupled dependencies.

Changes:
- Move backward pass logic to main package (src/solve/):
  - backward_cache.jl: StencilForwardCache, WeightsBuildForwardCache types
  - backward.jl: backward_linear_solve!, backward_collocation!, etc.
  - forward_cache.jl: _forward_with_cache function
  - operator_second_derivatives.jl: grad_applied_*_wrt_{x,xi} functions

- Rewrite Enzyme extension with native EnzymeRules:
  - Basis functions (PHS1-7, IMQ, Gaussian)
  - Operator evaluation (_eval_op, op(x))
  - Interpolator (single and batch)
  - _build_weights (Partial, Laplacian)

- Performance optimizations in backward.jl:
  - Replace O(n²) scalar outer product loop with BLAS mul!
  - Hoist functor construction outside loops
  - Eliminate broadcast allocations with direct indexing
  - Cache array references to reduce indirection

- Update Project.toml: Enzyme extension now only requires Enzyme + EnzymeCore
- Add native _build_weights tests to enzyme_ext.jl

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…d pass

Extends Enzyme extension with derivatives w.r.t. shape parameter ε for IMQ
and Gaussian basis functions. Refactors backward pass to use unified
macro-generated rules, reducing code duplication for different operators.

- Add shape_parameter_derivatives.jl with ∂φ/∂ε, ∂(∇²φ)/∂ε, ∂(∂φ/∂x)/∂ε
- Add backward_stencil_*_with_ε! functions for full gradient computation
- Extend operator_second_derivatives.jl with IMQ and Gaussian support
- Add comprehensive tests for all basis types (PHS, IMQ, Gaussian)
- Update ChainRulesCore and Mooncake extensions for consistency

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The backward_rhs_partial! function was missing the polynomial section
gradient. For Laplacian, ∇² of polynomials gives constants, so the
gradient w.r.t. eval_point is zero. But for Partial, ∂/∂x of polynomials
has non-constant terms (e.g., ∂(x²)/∂x = 2x), requiring second mixed
derivatives in the backward pass.

Also replaces macro-generated Enzyme rules with explicit function
definitions for Julia 1.11 compatibility (fixes whitespace parsing
issues in quoted expressions).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace native Enzyme tests with unified DI-based tests supporting both
Enzyme and Mooncake backends. Enzyme tests skip on Julia 1.12+ due to
known compatibility issues.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add full reverse-mode AD support for Interpolator:
- rrule for construction (differentiates through A \ b via adjoint solve)
- Enhanced evaluation rules returning weight gradients
- Batch evaluation support

Add comprehensive autodiff documentation page with examples for operators,
interpolators, basis functions, and weight construction.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@kylebeggs kylebeggs changed the title feat(autodiff): add native Enzyme rules and enhanced autodiff support add native Enzyme rules and enhanced autodiff support Feb 6, 2026
@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

❌ Patch coverage is 99.73753% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/solve/backward.jl 99.48% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/RadialBasisFunctions.jl 100.00% <ø> (ø)
src/solve/backward_cache.jl 100.00% <ø> (ø)
src/solve/forward_cache.jl 100.00% <100.00%> (ø)
src/solve/operator_second_derivatives.jl 100.00% <100.00%> (ø)
src/solve/shape_parameter_derivatives.jl 100.00% <100.00%> (ø)
src/solve/backward.jl 99.48% <99.48%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Relax Gaussian basis gradient test tolerance (1e-2 → 5e-2) for cross-platform stability
- Update benchmark compat to 0.3 matching current package version
- Skip weak deps (Enzyme, Mooncake, ChainRulesCore, etc.) in downgrade CI
- Switch autodiff doc examples to Mooncake backend for Julia 1.12 compatibility

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Benchmark Results

main 70abc91... main / 70abc91...
Directional 2.43 ± 0.19 ms 2.51 ± 0.12 ms 0.969 ± 0.086
Directional (per point) 2.52 ± 0.086 ms 2.47 ± 0.087 ms 1.02 ± 0.05
Gradient 7.76 ± 0.33 ms 8.69 ± 0.47 ms 0.893 ± 0.061
MonomialBasis/dim=1/deg=0 0.0454 ± 0.014 μs 0.0395 ± 0.013 μs 1.15 ± 0.52
MonomialBasis/dim=1/deg=1 0.0802 ± 0.021 μs 0.0646 ± 0.022 μs 1.24 ± 0.54
MonomialBasis/dim=1/deg=2 0.0871 ± 0.022 μs 0.0756 ± 0.021 μs 1.15 ± 0.43
MonomialBasis/dim=2/deg=0 0.0355 ± 0.013 μs 24.3 ± 13 ns 1.46 ± 0.96
MonomialBasis/dim=2/deg=1 0.0361 ± 0.014 μs 31.3 ± 14 ns 1.15 ± 0.68
MonomialBasis/dim=2/deg=2 0.0407 ± 0.014 μs 0.0434 ± 0.013 μs 0.938 ± 0.43
MonomialBasis/dim=3/deg=0 0.0345 ± 0.013 μs 0.0442 ± 0.014 μs 0.782 ± 0.38
MonomialBasis/dim=3/deg=1 0.0391 ± 0.014 μs 0.0444 ± 0.014 μs 0.881 ± 0.42
MonomialBasis/dim=3/deg=2 0.0467 ± 0.014 μs 0.053 ± 0.014 μs 0.881 ± 0.35
Partial 2.48 ± 0.14 ms 2.48 ± 0.094 ms 0.998 ± 0.07
RBF/Gaussian, exp(-(ε*r)²)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 0/0/∂ 9.67 ± 0.06 ns 9.87 ± 0.13 ns 0.98 ± 0.014
RBF/Gaussian, exp(-(ε*r)²)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 0/0/∂² 10.1 ± 0.18 ns 10.2 ± 0.16 ns 0.99 ± 0.023
RBF/Gaussian, exp(-(ε*r)²)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 0/0/∇ 17 ± 0.061 ns 17.1 ± 0.07 ns 0.991 ± 0.0054
RBF/Gaussian, exp(-(ε*r)²)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 0/0/∇² 18.5 ± 0.17 ns 18.1 ± 0.06 ns 1.02 ± 0.01
RBF/Gaussian, exp(-(ε*r)²)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 1/1/∂ 9.68 ± 0.08 ns 9.87 ± 0.15 ns 0.981 ± 0.017
RBF/Gaussian, exp(-(ε*r)²)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 1/1/∂² 10.1 ± 0.17 ns 10.1 ± 0.17 ns 1 ± 0.024
RBF/Gaussian, exp(-(ε*r)²)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 1/1/∇ 17 ± 0.061 ns 17 ± 0.071 ns 1 ± 0.0055
RBF/Gaussian, exp(-(ε*r)²)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 1/1/∇² 18.5 ± 0.16 ns 18 ± 0.14 ns 1.03 ± 0.012
RBF/Gaussian, exp(-(ε*r)²)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 2/2/∂ 9.67 ± 0.07 ns 9.88 ± 0.15 ns 0.979 ± 0.016
RBF/Gaussian, exp(-(ε*r)²)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 2/2/∂² 10.1 ± 0.19 ns 10.1 ± 0.19 ns 0.999 ± 0.027
RBF/Gaussian, exp(-(ε*r)²)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 2/2/∇ 17 ± 0.061 ns 17 ± 0.14 ns 1 ± 0.009
RBF/Gaussian, exp(-(ε*r)²)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 2/2/∇² 18.5 ± 0.14 ns 18.1 ± 0.1 ns 1.02 ± 0.0097
RBF/Inverse Multiquadrics, 1/sqrt((r*ε)²+1)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 0/0/∂ 6.32 ± 0.011 ns 6.32 ± 0.01 ns 1 ± 0.0024
RBF/Inverse Multiquadrics, 1/sqrt((r*ε)²+1)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 0/0/∂² 14.2 ± 0.13 ns 14.2 ± 0.081 ns 0.999 ± 0.011
RBF/Inverse Multiquadrics, 1/sqrt((r*ε)²+1)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 0/0/∇ 8.66 ± 0.18 ns 8.63 ± 0.27 ns 1 ± 0.038
RBF/Inverse Multiquadrics, 1/sqrt((r*ε)²+1)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 0/0/∇² 15.8 ± 0.081 ns 15.8 ± 0.1 ns 0.998 ± 0.0082
RBF/Inverse Multiquadrics, 1/sqrt((r*ε)²+1)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 1/1/∂ 6.32 ± 0.011 ns 6.27 ± 0.069 ns 1.01 ± 0.011
RBF/Inverse Multiquadrics, 1/sqrt((r*ε)²+1)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 1/1/∂² 14.2 ± 0.15 ns 14.2 ± 0.15 ns 1 ± 0.015
RBF/Inverse Multiquadrics, 1/sqrt((r*ε)²+1)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 1/1/∇ 8.6 ± 0.09 ns 8.64 ± 0.27 ns 0.995 ± 0.033
RBF/Inverse Multiquadrics, 1/sqrt((r*ε)²+1)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 1/1/∇² 15.8 ± 0.081 ns 15.8 ± 0.12 ns 0.997 ± 0.0092
RBF/Inverse Multiquadrics, 1/sqrt((r*ε)²+1)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 2/2/∂ 6.32 ± 0.011 ns 6.27 ± 0.09 ns 1.01 ± 0.015
RBF/Inverse Multiquadrics, 1/sqrt((r*ε)²+1)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 2/2/∂² 14.2 ± 0.081 ns 14.2 ± 0.14 ns 1 ± 0.011
RBF/Inverse Multiquadrics, 1/sqrt((r*ε)²+1)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 2/2/∇ 8.63 ± 0.09 ns 8.63 ± 0.28 ns 0.999 ± 0.034
RBF/Inverse Multiquadrics, 1/sqrt((r*ε)²+1)
├─Shape factor: ε = 1
└─Polynomial augmentation: degree 2/2/∇² 15.8 ± 0.13 ns 15.8 ± 0.1 ns 1 ± 0.01
RBF/Polyharmonic spline (r³)
└─Polynomial augmentation: degree 0/0/∂ 3.73 ± 0.01 ns 3.73 ± 0.01 ns 1 ± 0.0038
RBF/Polyharmonic spline (r³)
└─Polynomial augmentation: degree 0/0/∂² 4.7 ± 0.01 ns 4.7 ± 0.01 ns 1 ± 0.003
RBF/Polyharmonic spline (r³)
└─Polynomial augmentation: degree 0/0/∇ 5.58 ± 0.05 ns 5.61 ± 0.041 ns 0.995 ± 0.011
RBF/Polyharmonic spline (r³)
└─Polynomial augmentation: degree 0/0/∇² 3.11 ± 0.001 ns 3.11 ± 0 ns 1 ± 0.00032
RBF/Polyharmonic spline (r³)
└─Polynomial augmentation: degree 1/1/∂ 3.73 ± 0.01 ns 3.73 ± 0.01 ns 1 ± 0.0038
RBF/Polyharmonic spline (r³)
└─Polynomial augmentation: degree 1/1/∂² 4.7 ± 0.01 ns 4.7 ± 0.01 ns 1 ± 0.003
RBF/Polyharmonic spline (r³)
└─Polynomial augmentation: degree 1/1/∇ 5.58 ± 0.049 ns 5.61 ± 0.041 ns 0.995 ± 0.011
RBF/Polyharmonic spline (r³)
└─Polynomial augmentation: degree 1/1/∇² 3.11 ± 0.001 ns 3.11 ± 0 ns 1 ± 0.00032
RBF/Polyharmonic spline (r³)
└─Polynomial augmentation: degree 2/2/∂ 3.73 ± 0.01 ns 3.73 ± 0.01 ns 1 ± 0.0038
RBF/Polyharmonic spline (r³)
└─Polynomial augmentation: degree 2/2/∂² 4.7 ± 0.01 ns 4.7 ± 0.01 ns 1 ± 0.003
RBF/Polyharmonic spline (r³)
└─Polynomial augmentation: degree 2/2/∇ 5.58 ± 0.04 ns 5.61 ± 0.04 ns 0.995 ± 0.01
RBF/Polyharmonic spline (r³)
└─Polynomial augmentation: degree 2/2/∇² 3.11 ± 0.001 ns 3.11 ± 0 ns 1 ± 0.00032
RBF/Polyharmonic spline (r¹)
└─Polynomial augmentation: degree 0/0/∂ 4.27 ± 0.01 ns 4.27 ± 0.01 ns 1 ± 0.0033
RBF/Polyharmonic spline (r¹)
└─Polynomial augmentation: degree 0/0/∂² 5.58 ± 0.01 ns 5.44 ± 0.01 ns 1.03 ± 0.0026
RBF/Polyharmonic spline (r¹)
└─Polynomial augmentation: degree 0/0/∇ 6.81 ± 0.01 ns 6.99 ± 0.3 ns 0.974 ± 0.042
RBF/Polyharmonic spline (r¹)
└─Polynomial augmentation: degree 0/0/∇² 4.27 ± 0.009 ns 4.27 ± 0.01 ns 1 ± 0.0032
RBF/Polyharmonic spline (r¹)
└─Polynomial augmentation: degree 1/1/∂ 4.27 ± 0.01 ns 4.28 ± 0.01 ns 0.998 ± 0.0033
RBF/Polyharmonic spline (r¹)
└─Polynomial augmentation: degree 1/1/∂² 5.58 ± 0.01 ns 5.44 ± 0.01 ns 1.03 ± 0.0026
RBF/Polyharmonic spline (r¹)
└─Polynomial augmentation: degree 1/1/∇ 6.81 ± 0.01 ns 7.1 ± 0.3 ns 0.959 ± 0.041
RBF/Polyharmonic spline (r¹)
└─Polynomial augmentation: degree 1/1/∇² 4.27 ± 0.009 ns 4.27 ± 0.01 ns 1 ± 0.0032
RBF/Polyharmonic spline (r¹)
└─Polynomial augmentation: degree 2/2/∂ 4.27 ± 0.01 ns 4.27 ± 0.01 ns 1 ± 0.0033
RBF/Polyharmonic spline (r¹)
└─Polynomial augmentation: degree 2/2/∂² 5.58 ± 0.01 ns 5.44 ± 0.01 ns 1.03 ± 0.0026
RBF/Polyharmonic spline (r¹)
└─Polynomial augmentation: degree 2/2/∇ 6.81 ± 0.01 ns 7.11 ± 0.3 ns 0.958 ± 0.04
RBF/Polyharmonic spline (r¹)
└─Polynomial augmentation: degree 2/2/∇² 4.27 ± 0.01 ns 4.27 ± 0.01 ns 1 ± 0.0033
RBF/Polyharmonic spline (r⁵)
└─Polynomial augmentation: degree 0/0/∂ 5.26 ± 0.01 ns 5.26 ± 0.01 ns 1 ± 0.0027
RBF/Polyharmonic spline (r⁵)
└─Polynomial augmentation: degree 0/0/∂² 4.96 ± 0.01 ns 4.65 ± 0.001 ns 1.07 ± 0.0022
RBF/Polyharmonic spline (r⁵)
└─Polynomial augmentation: degree 0/0/∇ 6.21 ± 0.02 ns 6.08 ± 0.05 ns 1.02 ± 0.009
RBF/Polyharmonic spline (r⁵)
└─Polynomial augmentation: degree 0/0/∇² 3.11 ± 0.009 ns 3.11 ± 0.009 ns 1 ± 0.0041
RBF/Polyharmonic spline (r⁵)
└─Polynomial augmentation: degree 1/1/∂ 5.26 ± 0.01 ns 5.26 ± 0.01 ns 1 ± 0.0027
RBF/Polyharmonic spline (r⁵)
└─Polynomial augmentation: degree 1/1/∂² 4.96 ± 0.01 ns 4.65 ± 0.001 ns 1.07 ± 0.0022
RBF/Polyharmonic spline (r⁵)
└─Polynomial augmentation: degree 1/1/∇ 6.21 ± 0.021 ns 6.52 ± 0.05 ns 0.952 ± 0.008
RBF/Polyharmonic spline (r⁵)
└─Polynomial augmentation: degree 1/1/∇² 3.11 ± 0 ns 3.11 ± 0.009 ns 1 ± 0.0029
RBF/Polyharmonic spline (r⁵)
└─Polynomial augmentation: degree 2/2/∂ 5.26 ± 0.01 ns 5.26 ± 0.01 ns 1 ± 0.0027
RBF/Polyharmonic spline (r⁵)
└─Polynomial augmentation: degree 2/2/∂² 4.96 ± 0.01 ns 4.65 ± 0.001 ns 1.07 ± 0.0022
RBF/Polyharmonic spline (r⁵)
└─Polynomial augmentation: degree 2/2/∇ 6.21 ± 0.02 ns 6.09 ± 0.051 ns 1.02 ± 0.0091
RBF/Polyharmonic spline (r⁵)
└─Polynomial augmentation: degree 2/2/∇² 3.11 ± 0 ns 3.11 ± 0.009 ns 1 ± 0.0029
RBF/Polyharmonic spline (r⁷)
└─Polynomial augmentation: degree 0/0/∂ 10.3 ± 0.079 ns 10.3 ± 0.11 ns 1 ± 0.013
RBF/Polyharmonic spline (r⁷)
└─Polynomial augmentation: degree 0/0/∂² 5.27 ± 0.01 ns 5.27 ± 0.01 ns 1 ± 0.0027
RBF/Polyharmonic spline (r⁷)
└─Polynomial augmentation: degree 0/0/∇ 12.5 ± 0.14 ns 12.5 ± 0.1 ns 0.994 ± 0.014
RBF/Polyharmonic spline (r⁷)
└─Polynomial augmentation: degree 0/0/∇² 8 ± 0.11 ns 8.05 ± 0.07 ns 0.994 ± 0.016
RBF/Polyharmonic spline (r⁷)
└─Polynomial augmentation: degree 1/1/∂ 10.3 ± 0.08 ns 10.3 ± 0.091 ns 1 ± 0.012
RBF/Polyharmonic spline (r⁷)
└─Polynomial augmentation: degree 1/1/∂² 5.27 ± 0.01 ns 5.27 ± 0.01 ns 1 ± 0.0027
RBF/Polyharmonic spline (r⁷)
└─Polynomial augmentation: degree 1/1/∇ 13 ± 0.1 ns 12.5 ± 0.099 ns 1.04 ± 0.011
RBF/Polyharmonic spline (r⁷)
└─Polynomial augmentation: degree 1/1/∇² 8 ± 0.11 ns 8.05 ± 0.012 ns 0.994 ± 0.014
RBF/Polyharmonic spline (r⁷)
└─Polynomial augmentation: degree 2/2/∂ 10.4 ± 0.079 ns 10.2 ± 0.15 ns 1.01 ± 0.017
RBF/Polyharmonic spline (r⁷)
└─Polynomial augmentation: degree 2/2/∂² 5.27 ± 0.01 ns 5.27 ± 0.01 ns 1 ± 0.0027
RBF/Polyharmonic spline (r⁷)
└─Polynomial augmentation: degree 2/2/∇ 12.5 ± 0.13 ns 12.5 ± 0.091 ns 0.994 ± 0.013
RBF/Polyharmonic spline (r⁷)
└─Polynomial augmentation: degree 2/2/∇² 7.99 ± 0.11 ns 8.05 ± 0.019 ns 0.993 ± 0.014
time_to_load 0.794 ± 0.0076 s 0.778 ± 0.012 s 1.02 ± 0.019

Benchmark Plots

A plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR.
Go to "Actions"->"Benchmark a pull request"->[the most recent run]->"Artifacts" (at the bottom).

kylebeggs and others added 8 commits February 6, 2026 18:30
- Add Const xi overloads for basis rules (closure-captured args)
- Support both Active and Duplicated return types in operator rules
- Replace .+= with immutable accumulation pattern for SVector shadows
- Use pre-computed weights directly instead of calling update_weights!
- Switch test backend to Enzyme.Const annotation
- Skip Enzyme Interpolator constructor tests (factorize Union types)
- Fix Mooncake UUID in docs/Project.toml
Enzyme.jl has known issues on Julia 1.12+, so use Mooncake as the
primary backend in all doc examples for cross-version reliability.
Add tests for dimension-specific polynomial backward passes (1D, 3D,
dim=2 in 2D) and direct unit tests for non-ε backward stencil functions
that are only called from the Enzyme extension (skipped on Julia 1.12+).
Use per-file MersenneTwister seeds across all test files to eliminate
non-reproducible test behavior from unseeded RNG usage.
Exercise all grad_laplacian_phs{1,3,5,7} dispatch paths and add 3D
Partial(1,2) and Partial(1,3) operator tests.
DocumenterVitepress v0.3.0 replaced markdown-it-mathjax3 with a custom
mathjax-plugin.ts that provides a Vite virtual module for MathJax styles.
Without the plugin, the build fails on `virtual:mathjax-styles.css` import.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Prevents future breakage from upstream doc dependency major releases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kylebeggs kylebeggs merged commit 0aad7cd into main Feb 13, 2026
26 checks passed
@kylebeggs kylebeggs deleted the enzyme branch February 13, 2026 14:24
kylebeggs added a commit that referenced this pull request Feb 15, 2026
Keep our branch's native Enzyme/Mooncake rules, delete CRC extension
files and tests from main's enzyme PR (#76). Retain DI tests and
docs additions from main.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(enzyme): add _build_weights support for IMQ and Gaussian basis functions EnzymeRules?

1 participant