Skip to content

Speculative dynamic HMC #2818

Description

@wds15

Summary:

The dynamic HMC algorithm can be parallelized to run the forward and backward sweeps in independence. See for a description and a decent evaluation the thread on discourse:

https://discourse.mc-stan.org/t/parallel-dynamic-hmc-merits/10895

By using 2 cores we can be speed up things by 35%.

Description:

A prototype implementation is here:

https://github.com/stan-dev/stan/blob/parallel-nuts-2/src/stan/mcmc/hmc/nuts/base_nuts.hpp#L159

That version is based on the 2.20.0 sampler.

The branch is not runnable without a special setup of math due to the requirement of the TBB. A variant of the branch https://github.com/stan-dev/math/tree/parallel-ad-tape-3 can make this one run, but no attempt is made at the moment to give clear instructions.

This issue is here to document that we can get 35% speedup if we do a speculative HMC

Reproducible Steps:

See discourse for all of this.

Current Output:

Expected Output:

Faster samples.

Additional Information:

Provide any additional information here.

Current Version:

v2.20.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions