Skip to content

Requested to use GPU for bundle adjustment, but Ceres was compiled without CUDA support. Falling back to CPU-based dense solvers. #207

@Deye27

Description

@Deye27

Subject: Pre-compiled binaries and vcpkg manifest lack CUDA support for Ceres

Description

The pre-compiled Windows binaries for GLOMAP seem to be built against a version of Ceres that does not have CUDA or cuDSS support enabled. When running the mapper, this results in the following warnings, and the process falls back to CPU-based solvers:

W20250822 16:57:58.663830 22028 global_positioning.cc:380] Requested to use GPU for bundle adjustment, but Ceres was compiled without CUDA support. Falling back to CPU-based dense solvers.
W20250822 16:57:58.664532 22028 global_positioning.cc:397] Requested to use GPU for bundle adjustment, but Ceres was compiled without cuDSS support. Falling back to CPU-based sparse solvers.

Root Cause Analysis

I attempted to resolve this by manually compiling ceres.dll with CUDA and cuDSS support and replacing the distributed DLL. However, the warning persisted. This suggests the issue is not with the DLL at runtime, but rather with how the main glomap.exe executable itself was compiled.

Upon inspection of the repository, the root cause appears to be in the vcpkg.json manifest file. The ceres dependency is declared without the cuda feature, meaning vcpkg will build a CPU-only version of Ceres by default.

Current vcpkg.json entry for Ceres:
https://github.com/colmap/glomap/blob/main/vcpkg.json

        {
            "name": "ceres",
            "features": [
                "lapack",
                "schur",
                "suitesparse"
            ]
        },

Proposed Solution & Current Status

To enable GPU acceleration, the cuda feature needs to be added to the Ceres dependency list in vcpkg.json. This ensures that when GLOMAP is built from source using vcpkg, it links against a version of Ceres that is CUDA-aware.

Proposed change in vcpkg.json:

        {
            "name": "ceres",
            "features": [
                "lapack",
                "schur",
                "suitesparse",
                "cuda"
            ]
        },

I am currently recompiling GLOMAP from source with this modification. I expect this to resolve the issue and enable GPU-based bundle adjustment.

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