Skip to content

Drop Turing/DynamicPPL support - #75

Merged
rsenne merged 2 commits into
v3.0from
drop-turing-support
Oct 13, 2026
Merged

rsenne merged 2 commits into
v3.0from
drop-turing-support

Conversation

@rsenne

@rsenne rsenne commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Closes #74.

DynamicPPL models only run on the CPU, so the extension doesn't fit what this package is for, and it's maintenance I can't keep up with. Releases up to 0.2 keep Turing support.

  • Removes DynamicPPLExt, the DensityModel(::DynamicPPL.Model) constructor, and the DynamicPPL weak dep and compat entry.
  • test-Turing-Integration.jl is gone. test-DEER-Turing-Logistic.jl becomes test-DEER-Logistic.jl and keeps the hand-written CPU/GPU checks.
  • New test-LogDensityProblems.jl. LogDensityProblemsExt was previously only tested through DynamicPPL; it now runs against a hand-written target (constructor, posterior recovery, SecondOrder HVP with ParallelMALASampler).
  • Docs, README, and the LogDensityProblemsExt docstring no longer mention Turing. The GPU limitations list drops its first entry and is renumbered.
  • Drops Distributions from the test env, since only the Turing models used it.

DynamicPPL models only run on the CPU, which is the case ParallelMCMC is
least suited for, and keeping the extension working is more maintenance
than it is worth right now. Releases up to 0.2 keep it.

Removes DynamicPPLExt and its tests, strips the Turing model from the
logistic-regression DEER tests, and adds tests for LogDensityProblemsExt,
which were previously only exercised through DynamicPPL.

Closes #74
@rsenne rsenne added this to the v3.0 milestone Oct 13, 2026
@codecov

codecov Bot commented Oct 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (v3.0@df9a183). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             v3.0      #75   +/-   ##
=======================================
  Coverage        ?   87.32%           
=======================================
  Files           ?        7           
  Lines           ?     1294           
  Branches        ?        0           
=======================================
  Hits            ?     1130           
  Misses          ?      164           
  Partials        ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

Comment thread docs/src/15-gpu.md
These wrappers are a workaround pending upstream Enzyme support for GPU matmul rules. Once that lands, plain `A * B` on `CuArray`s will work and the wrappers will be deprecated.

### 3. Some Enzyme GPU gradients hit a `gc-transition` abort. Staging them as single ops is a workaround
### 2. Some Enzyme GPU gradients hit a `gc-transition` abort. Staging them as single ops is a workaround

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is no longer the case, right?

Comment thread docs/src/15-gpu.md
To run on GPU, hand-write `logdensity` / `grad_logdensity` (and the batched variants) directly over `CuArray`s and pass them to `DensityModel`. This is shown in the example below.

### 2. Enzyme on GPU currently needs `pmcmc_matmul` / `pmcmc_dot` / `pmcmc_dotsum`
### 1. Enzyme on GPU currently needs `pmcmc_matmul` / `pmcmc_dot` / `pmcmc_dotsum`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't this get upstreamed?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes--I'm behind on docs stuff. These comments will be removed in #71

- Reword the comment on the LogDensityProblems wrapper structs; their remaining
  dispatch use is the Reactant HVP check. Drop a comment that only restated code.
- A plain backend in `hvp` works when `logdensity_and_gradient` is
  differentiable by it. Say that instead of calling plain backends unsupported,
  and keep `SecondOrder` as the fallback.
- Put a runnable LogDensityProblems example in Getting Started and link it from
  the reference page.
- Test that the batched slots pass through the LogDensityProblems constructor,
  that the default parameter name is `x`, and tighten the variance tolerance.
@rsenne
rsenne merged commit 024bc6e into v3.0 Oct 13, 2026
7 checks passed
@rsenne
rsenne deleted the drop-turing-support branch October 13, 2026 14:55
rsenne added a commit that referenced this pull request Oct 13, 2026
Turing support was removed in #75. Move the runnable LogDensityProblems
example and HVP note into the models page.
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.

2 participants