Skip to content

[Caspar] Add GPU index argument to Caspar solver #460

@tordnat

Description

@tordnat

Is your feature request related to a problem? Please describe.
Currently, Caspar defaults to GPU index 0. When running multiple reconstructions in, let's say COLMAP, both processes will request the same GPU, making it difficult to parallelize large reconstruction tasks. This would also be beneficial when running on CI/CD servers, as it enables you to run different regression tests on different devices in parallel.

Describe the solution you'd like

  • In solver.cc.jinja add cudaSetDevice(device_id) at the top of the constructo, and store device_id as a member
  • In solver.h.jinja add int device_id = 0 parameter to the constructor and a member variable
  • In solver_pybinding.h.jinja add device_id to the pybind11 constructor binding with a default of 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions