You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Empty patch match results on CUDA compute >= 100 #3514
Running patch_match_stereo results in a random noise depth map and an empty normal map on CUDA compute >= 100.
No problems on compute_90, but fails on compute_100, compute_120.
Naturally, any succeeding steps fail. There are no indications of any problems in the logs.
The input I am using is a well-established multiview dataset with ~20 views, and I did not have any problems previously. SfM reconstruction works fine.
I am using COLMAP release 3.12.3, built from source on CUDA 12.8 with CMAKE_CUDA_ARCHITECTURES=120.
$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX Open Kernel Module for x86_64 570.153.02 Release Build (nixbld@)
GCC version: gcc version 14.2.1 20250322 (GCC)
$ colmap help | head -n 2
COLMAP 3.12.3 -- Structure-from-Motion and Multi-View Stereo
(Commit Unknown on Unknown with CUDA)
$ uname -a
Linux nixosll 6.15.4 #1-NixOS SMP PREEMPT_DYNAMIC Fri Jun 27 10:13:43 UTC 2025 x86_64 GNU/Linux
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2025 NVIDIA Corporation
Built on Fri_Feb_21_20:23:50_PST_2025
Cuda compilation tools, release 12.8, V12.8.93
Build cuda_12.8.r12.8/compiler.35583870_
Is there a fix or more info about this.
I have the same result on mobile rtx 5070. It worked before on rtx 3090 and bellow. I tired different combinations on cuda and build compute architecture but with the same result.
If i try to run the binaries that ware build on different machine on the target rtx 5070 it says that no kernel was build for that device even when the required compute capability is included.
I have the same issue running the pre-built Windows binaries of version 3.13.0 on an RTX 5090, so it is not limited to Linux. However, using a self-compiled 3.14.0.dev0, the depth maps are Ok and the dense reconstruction works.
Could you specify which commit exactly you built? Ah, it's this version, I'll give it a shot now.
For context: I'm running into the same issue after bulding Colmap LTS 3.13.0 on a DGX Spark with Ubuntu 24.04 and compute capability of 12.1 with Cuda 13.
Ok, I tried with 868aff9 and also with the current main (65301f4), but no luck. I don't quite understand what the issue is. Some insight from the experts would be nice!
I cloned the repository back in November. git log says dd14dc7 as the latest commit. I use Cuda 12.8, which is the oldest version that supports the Blackwell architecture. I don't know though whether this is available on the Spark.
Well guess what, I just recompiled COLMAP after adding some debug statements to help me with another issue, and now it doesn't work anymore. I did not clone the most recent version, and nvcc is still version 12.8.93 from February 2025. So something else in the toolchain has changed that causes these issues, or it's the GPU driver.
I use Cuda 12.8, which is the oldest version that supports the Blackwell architecture. I don't know though whether this is available on the Spark
For now, I would refrain from messing with the Cuda+Nvidia version combo on the spark 😬 I don't want to break that.
One other difference between my working setup and the broken setup (on the spark) is that the spark is running their own Ubuntu based OS (24.04), where I couldn't build with MKL, but had to fall back to OpenBLAS. Don't think that's related, but who knows 🤷 My working setup is on 22.04 and uses MKL.
Since the same commit (dd14dc7) in my case worked when compiled back in November, and doesn't when compiled now on an up-to-date Ubuntu 24.04, it doesn't look like there's an older commit that would automatically work when built with a current tool chain. But this is just guessing. The pre-built 3.12.6 Windows binaries work on my system, the 3.13.0 binaries don't.
I just tried this on an up-to-date Ubuntu 24.04 with CUDA 13 and cannot replicate the issue. The depth maps coming out of the pipeline look good. I am using a 3080 GPU. Do you run patch match on a single or multiple GPUs?
Thank you. I hope that #4213 now resolves your issue out of the box. Would appreciate if you can confirm (unfortunately, I don't have a suitable GPU at hand to test myself).
@ahojnnes Results look good! Steps undertaken (Ubuntu 24.04, CUDA 12.8):
git clone --single-branch --branch user/jsch/blackwell-patch-match-cuda-bug https://github.com/colmap/colmap.git
cd colmap
mkdir build
cd build
cmake ..
This produced the message
CMake Warning at src/colmap/mvs/CMakeLists.txt:193 (message):
Blackwell GPU (sm_100+) detected. Replacing sm_100+ architectures with
90-virtual (PTX) for colmap_mvs_cuda to work around an NVCC compiler bug.
Blackwell GPUs will JIT-compile from PTX at first launch (see
https://github.com/colmap/colmap/issues/3514).
so Blackwell detection is working.
ninja did not work, so I did
make
sudo make install
When running colmap gui, I got the message
colmap: /usr/local/bin/../lib/libonnxruntime.so.1: version VERS_1.24.4' not found (required by colmap)`
I think this is a new dependency introduced with version 4, how to deal with that is not yet explained in the manual. I disabled ONNX in CMakeLists.txt and recompiled. After that, I could run colmap. I did a new dense reconstruction. All depth and normal maps look good and so does the resulting point cloud.
Hey, I also re-built latest main (with merged #4213) on the DGX Spark. Ninja did not work either, so I also built with make, sudo make install and now I can finally produce meaningful normal/depth maps 🎉
I did have to solve some small hiccups related to the onnxruntime, which were in my end, I think. Adding some symlinks between lib/lib64 and version 1.24.1 and 1.24.4 solved it, though.
Thanks for digging into this issue, much appreciated 👏
I had the same onnxruntime issues, it looks like something isn't quite right there with resolving library versions.
Ah, ok, I can provide more detailed information if needed, but it wasn't hard to fix anyway, the libraries were there, just not linked/referenced correctly.
#4213's PTX workaround fails when the CUDA toolkit is newer than the driver
The sm_100+ workaround from #4213 substitutes 90-virtual (PTX) for the colmap_mvs_cuda target so Blackwell GPUs JIT from PTX at first launch. That depends on a precondition which isn't stated anywhere and doesn't always hold: the driver must be able to JIT-compile PTX emitted by the build toolkit. PTX from a toolkit newer than the driver supports is rejected outright.
On this machine the workaround activates correctly and then dense reconstruction dies immediately:
CUDA error at src/colmap/mvs/patch_match_cuda.cu:1682
- the provided PTX was compiled with an unsupported toolchain.
Zero depth maps and zero normal maps are written, and ~/.nv/ComputeCache stays at 0 bytes — the JIT is refused, not merely slow.
Environment
GPU
RTX 5060 Ti 16 GB (Blackwell, sm_120)
Driver
595.84 — nvidia-smi reports max CUDA 13.2
Build toolkit (failing)
CUDA 13.3 (nvcc 13.3.73)
COLMAP
tag 4.1.1 (a0d785f), -DCUDA_ENABLED=ON -DCMAKE_CUDA_ARCHITECTURES=120
OS
Ubuntu 26.04, gcc 15.2, glibc 2.43
The CMake warning fires as designed, so the build is doing exactly what #4213 intends:
CMake Warning at src/colmap/mvs/CMakeLists.txt:217 (message):
Blackwell GPU (sm_100+) detected. Replacing sm_100+ architectures with
90-virtual (PTX) for colmap_mvs_cuda to work around an NVCC compiler bug.
With CMAKE_CUDA_ARCHITECTURES=120 the filter keeps architectures < 100 (none) and appends 90-virtual, so colmap_mvs_cuda ends up PTX-only with no native SASS fallback. When the driver refuses that PTX there is nothing else to load, so the failure is total rather than degraded.
Confirmed fix: build with a toolkit no newer than the driver supports
Rebuilding only the compiler, everything else identical:
patch_match_stereo exit 0, 120 depth + 120 normal maps
~/.nv/ComputeCache grows 0 → 45 MB, i.e. the JIT actually runs
stereo_fusion → 405,839 points (36.7× the 11,064-point sparse model)
poisson_mesher → 101,609 vertices / 185,406 faces
zero unsupported toolchain errors
Measured JIT cost, isolated from COLMAP's own per-view log timestamps (cold vs warm, 3 pairs): first view 29.3–29.7 s against a steady-state 4.11–4.15 s, i.e. 25.4 s ± 0.2 s one-time per compute-cache state. Worth knowing that the PTX path costs a fixed ~25 s on first launch and nothing thereafter.
Suggested handling
Configure-time check. The substitution is already conditional on detecting Blackwell; it could additionally compare CUDAToolkit_VERSION against the CUDA version nvidia-smi reports and warn (or error) when toolkit > driver. The native keyword detection already shells out to nvidia-smi, so the mechanism is present.
One clause in the warning text — "requires a driver supporting CUDA ≥ the build toolkit" — would make the constraint discoverable at build time rather than at first dense run.
Note for anyone hitting this on Ubuntu 26.04
The apt toolkit is 13.3 and NVIDIA never published cuda-toolkit-13-2 to the ubuntu2604 repo (13-1 and 13-3 only). 13.1 is not an option either: glibc 2.43 declares rsqrt/rsqrtfnoexcept and only CUDA ≥ 13.2 carries the matching _NV_GLIBC_VERSION_GE_2_42 guard, so 13.1 cannot compile the .cu files at all. That leaves a side-installed 13.2 toolkit (runfile, --toolkit only) as the single configuration satisfying both constraints.
Activity
[-]Empty patch match results[/-][+]Empty patch match results on CUDA compute >= 100[/+]dushko-murtovski commentedon Sep 9, 2025
Hi,
Is there a fix or more info about this.
I have the same result on mobile rtx 5070. It worked before on rtx 3090 and bellow. I tired different combinations on cuda and build compute architecture but with the same result.
If i try to run the binaries that ware build on different machine on the target rtx 5070 it says that no kernel was build for that device even when the required compute capability is included.
Any feedback would be appreciated.
Regards
tfwittwer commentedon Feb 25, 2026
I have the same issue running the pre-built Windows binaries of version 3.13.0 on an RTX 5090, so it is not limited to Linux. However, using a self-compiled 3.14.0.dev0, the depth maps are Ok and the dense reconstruction works.
LeanderFischer commentedon Feb 26, 2026
Could you specify which commit exactly you built?Ah, it's this version, I'll give it a shot now.For context: I'm running into the same issue after bulding Colmap LTS 3.13.0 on a DGX Spark with Ubuntu 24.04 and compute capability of 12.1 with Cuda 13.
LeanderFischer commentedon Feb 26, 2026
Ok, I tried with
868aff9and also with the current main (65301f4), but no luck. I don't quite understand what the issue is. Some insight from the experts would be nice!tfwittwer commentedon Feb 26, 2026
I cloned the repository back in November. git log says dd14dc7 as the latest commit. I use Cuda 12.8, which is the oldest version that supports the Blackwell architecture. I don't know though whether this is available on the Spark.
tfwittwer commentedon Feb 26, 2026
Well guess what, I just recompiled COLMAP after adding some debug statements to help me with another issue, and now it doesn't work anymore. I did not clone the most recent version, and nvcc is still version 12.8.93 from February 2025. So something else in the toolchain has changed that causes these issues, or it's the GPU driver.
LeanderFischer commentedon Feb 27, 2026
For now, I would refrain from messing with the Cuda+Nvidia version combo on the spark 😬 I don't want to break that.
One other difference between my working setup and the broken setup (on the spark) is that the spark is running their own Ubuntu based OS (24.04), where I couldn't build with MKL, but had to fall back to OpenBLAS. Don't think that's related, but who knows 🤷 My working setup is on 22.04 and uses MKL.
tfwittwer commentedon Feb 27, 2026
Yeah, MKL is x86-only so it won't work on the Spark. I'm also on Ubuntu 24.04, so it might have to do with the underlying toolchain and libraries.
ahojnnes commentedon Feb 27, 2026
I am trying to follow the discussion. Is this an issue related to the specific toolchain or we should treat this as a bug on all platforms?
tfwittwer commentedon Feb 27, 2026
It occurs under Windows, x86 Linux, and ARM Linux, so it looks to me like a bug on all platforms. 3.12.6 produces good results under Windows.
ahojnnes commentedon Feb 27, 2026
Does anybody have a definite commit hash where it still worked correctly?
tfwittwer commentedon Feb 27, 2026
Since the same commit (dd14dc7) in my case worked when compiled back in November, and doesn't when compiled now on an up-to-date Ubuntu 24.04, it doesn't look like there's an older commit that would automatically work when built with a current tool chain. But this is just guessing. The pre-built 3.12.6 Windows binaries work on my system, the 3.13.0 binaries don't.
ahojnnes commentedon Feb 27, 2026
I just tried this on an up-to-date Ubuntu 24.04 with CUDA 13 and cannot replicate the issue. The depth maps coming out of the pipeline look good. I am using a 3080 GPU. Do you run patch match on a single or multiple GPUs?
34 remaining items
ahojnnes commentedon Mar 31, 2026
@tfwittwer Does really only
-DCMAKE_CUDA_ARCHITECTURES=89work or also-DCMAKE_CUDA_ARCHITECTURES=90-virtualon your end?tfwittwer commentedon Mar 31, 2026
@ahojnnes
-DCMAKE_CUDA_ARCHITECTURES=90-virtualalso produces good results.ahojnnes commentedon Apr 2, 2026
Thank you. I hope that #4213 now resolves your issue out of the box. Would appreciate if you can confirm (unfortunately, I don't have a suitable GPU at hand to test myself).
tfwittwer commentedon Apr 2, 2026
@ahojnnes Sure I can do that - I guess that means cloning the branch that contains #4213 and configuring without additional parameters?
ahojnnes commentedon Apr 2, 2026
Yes, right. Thank you!
tfwittwer commentedon Apr 2, 2026
@ahojnnes Results look good! Steps undertaken (Ubuntu 24.04, CUDA 12.8):
This produced the message
so Blackwell detection is working.
ninja did not work, so I did
When running
colmap gui, I got the messagecolmap: /usr/local/bin/../lib/libonnxruntime.so.1: versionVERS_1.24.4' not found (required by colmap)`I think this is a new dependency introduced with version 4, how to deal with that is not yet explained in the manual. I disabled ONNX in CMakeLists.txt and recompiled. After that, I could run colmap. I did a new dense reconstruction. All depth and normal maps look good and so does the resulting point cloud.
ahojnnes commentedon Apr 2, 2026
Great, thanks, the issue with ONNX should hopefully fixed once this is fix is merged in the main branch.
Fix empty PatchMatch results on Blackwell GPUs (sm_100+) (#4213)
LeanderFischer commentedon Apr 3, 2026
Hey, I also re-built latest main (with merged #4213) on the DGX Spark. Ninja did not work either, so I also built with
make,sudo make installand now I can finally produce meaningful normal/depth maps 🎉I did have to solve some small hiccups related to the
onnxruntime, which were in my end, I think. Adding some symlinks between lib/lib64 and version 1.24.1 and 1.24.4 solved it, though.Thanks for digging into this issue, much appreciated 👏
tfwittwer commentedon Apr 3, 2026
I had the same onnxruntime issues, it looks like something isn't quite right there with resolving library versions.
Fix empty PatchMatch results on Blackwell GPUs (sm_100+) (#4213)
LeanderFischer commentedon Apr 9, 2026
Ah, ok, I can provide more detailed information if needed, but it wasn't hard to fix anyway, the libraries were there, just not linked/referenced correctly.
LeanderFischer commentedon Apr 9, 2026
I do however run into an issue when running the poisson mesher now, I opened another issue for it, just in case someone is seeing the same.
thexclr8er commentedon Aug 12, 2026
#4213's PTX workaround fails when the CUDA toolkit is newer than the driver
The sm_100+ workaround from #4213 substitutes
90-virtual(PTX) for thecolmap_mvs_cudatarget so Blackwell GPUs JIT from PTX at first launch. That depends on a precondition which isn't stated anywhere and doesn't always hold: the driver must be able to JIT-compile PTX emitted by the build toolkit. PTX from a toolkit newer than the driver supports is rejected outright.On this machine the workaround activates correctly and then dense reconstruction dies immediately:
Zero depth maps and zero normal maps are written, and
~/.nv/ComputeCachestays at 0 bytes — the JIT is refused, not merely slow.Environment
nvidia-smireports max CUDA 13.2-DCUDA_ENABLED=ON -DCMAKE_CUDA_ARCHITECTURES=120The CMake warning fires as designed, so the build is doing exactly what #4213 intends:
With
CMAKE_CUDA_ARCHITECTURES=120the filter keeps architectures< 100(none) and appends90-virtual, socolmap_mvs_cudaends up PTX-only with no native SASS fallback. When the driver refuses that PTX there is nothing else to load, so the failure is total rather than degraded.Confirmed fix: build with a toolkit no newer than the driver supports
Rebuilding only the compiler, everything else identical:
Result on the same workspace (60 images):
patch_match_stereoexit 0, 120 depth + 120 normal maps~/.nv/ComputeCachegrows 0 → 45 MB, i.e. the JIT actually runsstereo_fusion→ 405,839 points (36.7× the 11,064-point sparse model)poisson_mesher→ 101,609 vertices / 185,406 facesunsupported toolchainerrorsMeasured JIT cost, isolated from COLMAP's own per-view log timestamps (cold vs warm, 3 pairs): first view 29.3–29.7 s against a steady-state 4.11–4.15 s, i.e. 25.4 s ± 0.2 s one-time per compute-cache state. Worth knowing that the PTX path costs a fixed ~25 s on first launch and nothing thereafter.
Suggested handling
CUDAToolkit_VERSIONagainst the CUDA versionnvidia-smireports and warn (or error) when toolkit > driver. Thenativekeyword detection already shells out tonvidia-smi, so the mechanism is present.Note for anyone hitting this on Ubuntu 26.04
The apt toolkit is 13.3 and NVIDIA never published
cuda-toolkit-13-2to theubuntu2604repo (13-1 and 13-3 only). 13.1 is not an option either: glibc 2.43 declaresrsqrt/rsqrtfnoexceptand only CUDA ≥ 13.2 carries the matching_NV_GLIBC_VERSION_GE_2_42guard, so 13.1 cannot compile the.cufiles at all. That leaves a side-installed 13.2 toolkit (runfile,--toolkitonly) as the single configuration satisfying both constraints.