stan-dev / stan-dev/cmdstanr

Utilize multiple GPUs

Open
#891 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
R
Stars
160
Forks
69
Avg merge
1d 19h
Merged PRs (30d)
15

Description

I am testing stan on a system with three A100 GPUs. It appears all of the jobs run on the first GPU, ignoring the others. It seems this code:

      if (!is.null(self$opencl_ids)) {
        args$opencl <- c("opencl", paste0("platform=", self$opencl_ids[1]), paste0("device=", self$opencl_ids[2]))
      }

could be generalized to iterate over a vector of device ids.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the code that builds args$opencl from self$opencl_ids, using the shown conditional as the entry point. Trace how jobs select platform and device IDs, then verify that jobs can use the available devices rather than only the first GPU.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.