File: older-gcc-for-cuda.patch

package info (click to toggle)
alicevision 3.3.0%2Brepack-3
  • links: PTS, VCS
  • area: contrib
  • in suites: sid
  • size: 33,932 kB
  • sloc: cpp: 145,449; python: 14,170; ansic: 7,937; modula3: 6,893; sh: 163; makefile: 66
file content (31 lines) | stat: -rw-r--r-- 1,630 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Description: At this time we have nvidi-cuda-dev=12.4.1, which apparently doesn't
  work with gcc > 13.2:
    https://docs.nvidia.com/cuda/archive/12.4.1/cuda-installation-guide-linux/index.html
  Today gcc-13 provides 13.4, so I request gcc-12, and I point nvcc at that.
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index dfa00ff..d2f20cf 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -738,12 +738,22 @@ if (ALICEVISION_HAVE_CUDA)
     # default stream legacy implies that the 0 stream synchronizes all streams
     set(CUDA_NVCC_FLAGS         "${CUDA_NVCC_FLAGS};--default-stream;legacy")
     # default stream per-thread implies that each host thread has one non-synchronizing 0-stream
     # set(CUDA_NVCC_FLAGS         "${CUDA_NVCC_FLAGS};--default-stream;per-thread")
     # print local memory usage per kernel: -Xptxas;-v
     #   -Xptxas;--warn-on-local-memory-usage;-Xptxas;--warn-on-spills
+
+
+    # Depth map processing is a part of most meshlab workflows, and it requires
+    # cuda. At this time we have nvidi-cuda-dev=12.4.1, which apparently doesn't
+    # work with gcc > 13.2:
+    #   https://docs.nvidia.com/cuda/archive/12.4.1/cuda-installation-guide-linux/index.html
+    # Today gcc-13 provides 13.4, so I request gcc-12, and I point nvcc at that.
+    set(CUDA_HOST_COMPILER /usr/bin/gcc-12)
+
+
     message(STATUS "CUDA Version is ${CUDA_VERSION}")
     if (UNIX)
         set(CUDA_NVCC_FLAGS         "${CUDA_NVCC_FLAGS};-D_FORCE_INLINES")
     endif()
     if (ALICEVISION_NVCC_WARNINGS)
         set(CUDA_NVCC_FLAGS_RELEASE "${CUDA_NVCC_FLAGS_RELEASE};-Xptxas;-warn-lmem-usage")