Skip to content

Remove build_ad_backend convenience factory and no-arg __ad_backend()#502

Merged
ocots merged 1 commit into
mainfrom
feat/remove-build-ad-backend
Jul 22, 2026
Merged

Remove build_ad_backend convenience factory and no-arg __ad_backend()#502
ocots merged 1 commit into
mainfrom
feat/remove-build-ad-backend

Conversation

@ocots

@ocots ocots commented Jul 22, 2026

Copy link
Copy Markdown
Member

Summary

Remove the build_ad_backend convenience factory — a trivial one-line wrapper around DifferentiationInterface(; kwargs...) — and the no-arg __ad_backend() default (superseded by parameterized __ad_backend(::Type{CPU}) / __ad_backend(::Type{GPU})).

Changes

Source

  • Delete src/Differentiation/building.jl (contained only build_ad_backend)
  • Edit src/Differentiation/Differentiation.jl: remove include, export, and docstring entry
  • Edit src/Differentiation/default.jl: remove no-arg __ad_backend() + docstring; keep parameterized variants

Tests

  • test_ad_backend.jl: removed "Unit: build_ad_backend" and "Unit: __ad_backend default" testsets
  • test_arg_placement.jl: _default_backend() now calls DifferentiationInterface() directly
  • test_differentiation_module.jl: removed :build_ad_backend from EXPORTED_FUNCTIONS

Docs & workflow

  • docs/src/guide/differentiation.md: "Building a backend" section rewritten with real DifferentiationInterface() constructions
  • docs/api_reference.jl: removed building.jl from file list
  • .devin/workflows/plan.md: 3 build_ad_backendDifferentiationInterface replacements

Release

  • Project.toml: version bump 0.28.2-beta0.28.3-beta
  • CHANGELOG.md: new ## [0.28.3-beta] entry
  • BREAKING.md: new non-breaking note for 0.28.3-beta

Test results

All 106 differentiation tests pass.

Breaking change?

No breaking change in practice: build_ad_backend was not used anywhere in the ecosystem. Callers replace build_ad_backend(; kwargs...)DifferentiationInterface(; kwargs...).

- Delete src/Differentiation/building.jl (contained only build_ad_backend)
- Remove build_ad_backend from Differentiation module: include, export, docstring
- Remove no-arg __ad_backend() from default.jl; keep parameterized
  __ad_backend(::Type{CPU}) and __ad_backend(::Type{GPU})
- Update tests: remove build_ad_backend and __ad_backend testsets,
  replace call sites with DifferentiationInterface()
- Rewrite docs/guide/differentiation.md 'Building a backend' section
  with real DifferentiationInterface() constructions
- Remove building.jl from docs/api_reference.jl file list
- Update .devin/workflows/plan.md references (3 occurrences)
- Bump version 0.28.2-beta -> 0.28.3-beta
- Update CHANGELOG.md and BREAKING.md
@ocots
ocots merged commit edb5fde into main Jul 22, 2026
6 checks passed
@ocots
ocots deleted the feat/remove-build-ad-backend branch July 22, 2026 20:39
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.

1 participant