[AI] Add ONNX Runtime GPU acceleration install flow to AI preferences#20963
[AI] Add ONNX Runtime GPU acceleration install flow to AI preferences#20963andriiryzhkov wants to merge 1 commit intodarktable-org:masterfrom
Conversation
|
That's a lot of code to do something once and especially since it can be done already using a script. |
Issue 1: Absolute-Path Traversal in Archive Extraction (CRITICAL)File: if(preserve_layout)
out_path = g_build_filename(destdir, name, NULL);
Fix: Reject absolute paths before constructing the output path: if(name[0] == G_DIR_SEPARATOR) continue; // or g_path_is_absolute(name)Issue 2: CMake
|
Agree. And it's mostly useful on Linux. Both macOS and Windows have solid GPU acceleration bundled by default. I don't have strong opinion on whether we should include it in the next release. It might be better to release with scripts support initially and collect more feedback from users. |
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 samedata/ort_gpu.jsonmanifest and produce the same install layout – they need to stay in sync.What it does
nvidia-smi, AMD viarocminfo+ multi-source ROCm version cascade, Intel vialspci+libze_loader).PT_GNU_STACK PF_Xon installed.sofiles so glibc ≥ 2.41 willdlopenAMD's MIGraphX wheels (they ship with the flag set; newer glibc otherwise rejects them silently).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_layoutfor auditwheel-bundled wheels), and post-install validation. They both readdata/ort_gpu.json; any change to detection rules, install destinations, or supported variants needs landing in both.