PoC multi-GPU openmvs

pull/1544/head
Piero Toffanin 2022-10-17 17:26:31 +00:00
rodzic 61d1865bd3
commit 57a804598e
3 zmienionych plików z 8 dodań i 6 usunięć

Wyświetl plik

@ -53,7 +53,7 @@ ExternalProject_Add(${_proj_name}
#--Download step--------------
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
GIT_REPOSITORY https://github.com/OpenDroneMap/openMVS
GIT_TAG 291
GIT_TAG 292dev
#--Update/Patch step----------
UPDATE_COMMAND ""
#--Configure step-------------

Wyświetl plik

@ -1 +1 @@
2.9.1
2.9.2

Wyświetl plik

@ -75,8 +75,10 @@ class ODMOpenMVSStage(types.ODM_Stage):
]
gpu_config = []
if not has_gpu(args):
use_gpu = has_gpu(args)
if use_gpu:
gpu_config.append("--cuda-device -3")
else:
gpu_config.append("--cuda-device -2")
if args.pc_tile:
@ -106,9 +108,9 @@ class ODMOpenMVSStage(types.ODM_Stage):
except system.SubprocessException as e:
# If the GPU was enabled and the program failed,
# try to run it again without GPU
if e.errorCode == 1 and len(gpu_config) == 0:
if e.errorCode == 1 and use_gpu:
log.ODM_WARNING("OpenMVS failed with GPU, is your graphics card driver up to date? Falling back to CPU.")
gpu_config.append("--cuda-device -2")
gpu_config = ["--cuda-device -2"]
run_densify()
else:
raise e