Skip to content

Expose transition data and state synchronization for sampler adapters - #2

Merged
BJMCox merged 2 commits into
mainfrom
integration-api
Sep 21, 2026
Merged

BJMCox merged 2 commits into
mainfrom
integration-api

Conversation

@BJMCox

@BJMCox BJMCox commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

External samplers need rejected candidates and acceptance probabilities, plus a way to synchronize positions after another move or retry. Add cached initial densities, borrowed transition fields, synchronize!, validate_positions, and step!(state, rng; proposal_index).

Preserve cumulative counts, cyclic mixture phase, owned snapshots, and the standalone RNG law. Allow -Inf starts so callers can recover through their initialization policy. Prepare version 0.0.2 without tagging or registration.

Updated against main, including Gaussian replacement moves, workload-aware threading, and precompilation. Fix transition metadata for optimized snapshots and invalid Gaussian proposals. Keep external RNG addresses separate from thread schedules. Run synchronization validation on the state's owning CUDA device.

Validation:

  • 229 CPU checks pass on Julia 1.10.12 and Julia 1.13.0.
  • The CUDA suite passes 144 checks, including 76 device checks and a two-GPU synchronization regression, with scalar indexing disabled.
  • Strict documentation build and doctests pass.
  • 80 package-scoped JET checks report no issues across the new APIs and four built-in moves.
  • Twenty standalone replay cases match main exactly across serial, threaded, batched, and CPU-kernel execution. Allocation counts are unchanged. Repeated paired-sweep timings show no consistent regression.

Supports the BAT adapter in bat/BAT.jl#573.

@codecov

codecov Bot commented Sep 13, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

Expose transition details, addressed RNG sweeps, synchronization, and shared position validation for external samplers. Accept cached initial densities while preserving standalone replay and existing execution backends.
@BJMCox
BJMCox marked this pull request as ready for review September 21, 2026 14:14
@BJMCox
BJMCox merged commit 91c0c97 into main Sep 21, 2026
8 checks passed
@BJMCox
BJMCox deleted the integration-api branch September 30, 2026 12:34
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