Skip to content

[AI] Add ONNX Runtime GPU acceleration install flow to AI preferences#20963

Open
andriiryzhkov wants to merge 1 commit intodarktable-org:masterfrom
andriiryzhkov:ort_ui_install
Open

[AI] Add ONNX Runtime GPU acceleration install flow to AI preferences#20963
andriiryzhkov wants to merge 1 commit intodarktable-org:masterfrom
andriiryzhkov:ort_ui_install

Conversation

@andriiryzhkov
Copy link
Copy Markdown
Collaborator

Adds a GPU ONNX Runtime installer to the AI preferences tab as an alternative to the shell/PowerShell scripts in tools/ai/, for users who'd rather not run them from a terminal. Open preferences → AI tab → click install → restart darktable. Both paths consume the same data/ort_gpu.json manifest and produce the same install layout – they need to stay in sync.

What it does

  • Detects GPU (NVIDIA via nvidia-smi, AMD via rocminfo + multi-source ROCm version cascade, Intel via lspci + libze_loader).
  • Downloads and SHA-256-verifies the matching archive, extracts via libarchive, probes the installed library to confirm it loads.
  • On Windows, bundles cuDNN + CUDA-runtime DLLs from the system toolkit; pulls the OpenVINO runtime as a second download for Intel/Windows.
  • On Linux, clears PT_GNU_STACK PF_X on installed .so files so glibc ≥ 2.41 will dlopen AMD's MIGraphX wheels (they ship with the flag set; newer glibc otherwise rejects them silently).
  • Auto-redetects after install and writes plugins/ai/ort_library_path.

Parity with the scripts

The two paths are peers, not master/slave. Both must agree on package selection, install paths, checksum verification, archive layout (including preserve_layout for auditwheel-bundled wheels), and post-install validation. They both read data/ort_gpu.json; any change to detection rules, install destinations, or supported variants needs landing in both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant