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
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