-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
I noticed that the AbstractMCMC interface causes many memory allocations. It appears that each call to step reconstructs key objects, such as the Hamiltonian, integrator, adaptor, and state/transition objects, instead of reusing them.
Noticed most allocations in
AdvancedHMC.jl/src/abstractmcmc.jl
Lines 198 to 199 in 646202c
| # Make new transition. | |
| t = transition(rng, h, κ, t_old.z) |
This behavior contrasts with the direct AdvancedHMC approach, which reuses stateful objects and minimizes allocations.
Metadata
Metadata
Assignees
Labels
No labels