From 200a5530190e6a5a452d76c4b13d18bb176d5f2c Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Sun, 19 Jun 2022 17:00:49 -0400 Subject: [PATCH] Fix SIFT_GPU on Windows --- opendm/gpu.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opendm/gpu.py b/opendm/gpu.py index f3b9e1b8..c92cad12 100644 --- a/opendm/gpu.py +++ b/opendm/gpu.py @@ -38,7 +38,9 @@ def has_popsift_and_can_handle_texsize(width, height): def get_cuda_compute_version(device_id = 0): cuda_lib = "libcuda.so" if sys.platform == 'win32': - cuda_lib = "nvcuda.dll" + cuda_lib = os.path.join(os.environ.get('SYSTEMROOT'), 'system32', 'nvcuda.dll') + if not os.path.isfile(cuda_lib): + cuda_lib = "nvcuda.dll" nvcuda = ctypes.cdll.LoadLibrary(cuda_lib)