Skip to content

Add run time options for threads and gpu stuff #825

@SteveBronder

Description

@SteveBronder

Summary:

It would be nice to have a parallel option so users could do something like parallel threads=4 opencl_device=0 opencl_platform=0 or something of that ilk. What should it look like?

Description:

Right now we need to set threading info as an environment variable and the OpenCL stuff has to be known at compile time. I think at the math level we need

  • method to set number of threads dynamically
  • method in opencl_context to set the platform and device dynamically.

Then cmdstan users (and the other upstreams) can pass in the options at runtime.

The OpenCL kernels are compiled dynamically so we'd need to set the device/platform before we do any of the kernel compilation. Which I think will just happen if we do it at the cmdstan level before any of the kernels are called.

Current Version:

v2.22.0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions