From cec5629879910ecd01f7567d912abd3f66c2cd7f Mon Sep 17 00:00:00 2001 From: Pascal Obry Date: Sat, 14 Mar 2026 18:56:32 +0100 Subject: [PATCH] Enable GPU for ONNX runtime on GNU/Linux. - First we need the ONNX runtime with support for GPU. - And ensure that all ONNX runtime library are copied. Closes #20517 --- cmake/modules/FindONNXRuntime.cmake | 2 +- src/ai/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/modules/FindONNXRuntime.cmake b/cmake/modules/FindONNXRuntime.cmake index 7c48742609da..57c8835e4395 100644 --- a/cmake/modules/FindONNXRuntime.cmake +++ b/cmake/modules/FindONNXRuntime.cmake @@ -128,7 +128,7 @@ if(NOT _ORT_HEADER OR NOT _ORT_LIBRARY) endif() elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") - set(_ORT_PACKAGE "onnxruntime-linux-x64-${_ORT_VER}.tgz") + set(_ORT_PACKAGE "onnxruntime-linux-x64-gpu-${_ORT_VER}.tgz") elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") set(_ORT_PACKAGE "onnxruntime-linux-aarch64-${_ORT_VER}.tgz") else() diff --git a/src/ai/CMakeLists.txt b/src/ai/CMakeLists.txt index 2bf88d25faf2..91fa69c9d83b 100644 --- a/src/ai/CMakeLists.txt +++ b/src/ai/CMakeLists.txt @@ -76,7 +76,7 @@ elseif(WIN32) ) endif() elseif(UNIX) - file(GLOB _ORT_SO "${ONNXRuntime_LIB_DIR}/libonnxruntime.so*") + file(GLOB _ORT_SO "${ONNXRuntime_LIB_DIR}/libonnxruntime*.so*") if(_ORT_SO) install(FILES ${_ORT_SO} DESTINATION ${CMAKE_INSTALL_LIBDIR}/darktable