[AI] GPU acceleration install: manifest-driven scripts#20676
[AI] GPU acceleration install: manifest-driven scripts#20676TurboGit merged 3 commits intodarktable-org:masterfrom
Conversation
2fc7d22 to
bf749a7
Compare
|
@TurboGit : I need help testing this scripts and UI installer. Can you test it with NVIDIA card on Linux? And maybe you can advise who can help with other tests? |
|
@andriiryzhkov : Just to be sure, you mean install-ort-gpu.sh, right? I'll try to do that tomorrow. |
|
|
|
@andriiryzhkov : Using the script was ok. I was also able to install with the in UI [install] button. I saw a difference, when using the script I had not softlink created whereas with the in UI installation I got: |
|
@TurboGit : Thank you for testing. The symlinks are created by the UI install for extra safety, but not strictly required — darktable loads the library by full path from the preferences config, not via Looks like NVIDIA and AMD are tested. |
No not needed, just wanted to be sure this was expected and not the a cause of another issue. |
3d4266e to
4544aee
Compare
|
Fixed cuDNN detection in UI installation on Ubuntu and Debian |
7810328 to
64815e6
Compare
|
Some feedback after I tried to install the ONNX runtime for ROCm 7.2, / MIGraphX: Now this is what I get when I start darktable with ai debug msgs enabled and click on the restore module: It just gets stuck with I also attached the output of I assigned 10 GB of pageable RAM to the iGPU, which should be sufficient, shouldn't it? It is certainly not hitting any memory bottleneck as per the Maybe this is just a very specific AMD / iGPU issue, as my laptop is running on a AMD Ryzen 7 8845HS with an Radeon 780M iGPU. |
|
@da-phil :
You are not stuck, let it finish compilation. It may take long, veeerrrryyyyy long. But it's only one time per model and per tile size. I tested on my Radeon 780M iGPU and it took 30 minutes. The compilation is cached on disk. The following runs with the same tile size where very fast - just like 10 seconds or so. Much faster than CPU. iGPUs generally are not supported by ROCm and they don't have pre-build kernels. That's why I think it takes so long. But compilation is a thing even for proper supported GPUs. |
Okay, this time I was patient enough and voila, it worked! On CPU: On GPU: But now the problem: the GPU path leads to significant vertical stripe artifacts:
Is this a known issue or is there anything I can do to debug it? The CPU path leads to artifact-free denoised images. |
That is interesting. I will check, but assume it would be hard to trace |
|
When testing your changes from PR #20813, I stopped seeing those vertical stripes and the export speed increased to a solid average of 46s for the same 9568x6376 image. Will get back to you once I know more or if I can reproduce the issue. |
ee6a76b to
41ad8bb
Compare
|
@TurboGit : This PR is ready for review. I personally tested on all three platforms and major GPU vendors. The only combination that I don't have opportunity to test is OpenVINO on Linux. That is for Intel iGPU or GPU. It could be just iGPU with Intel processor. I don't expect any problems with it, but just transparent about this small gap. PR is general provides easy way to deal with different AI acceleration options from within darktable itself. |
6adc15d to
5cc84e3
Compare
|
@TurboGit : Can you have a look on this PR too? |
|
Sorry for providing feedback so late, but I gave the install script another spin with this outcome: It's a little bit misleading to see my CPU in this line: Also, I'm a little bit confused why it chooses libonnxruntime.so.1.23.2, I thought DT is build with libonnxruntime.so.1.24? Another idea: maybe add a |
5cc84e3 to
fe0d4d9
Compare
Fixed detection.
Yes, DT is built and bundled with ONNX Runtime 1.24. But library version we install with this script or UI installation might be different. For AMD it depends on underlying ROCm version - there's only one built ONNX Runtime per specific version of ROCm. For OpenVINO on Intel GPUs, version of ONNX Runtime with GPU support is lagging behind a little bit. So, ONNX Runtime library with GPU acceleration support might differ from bundled one. It should not cause any problem. |
|
@andriiryzhkov short question: where are you storing the information that a model has been downloaded? I'm asking because I share my darktable configs (darktablerc, library.db, data.db etc.) between two machines (laptop & PC) and on my laptop today, I had the issue that the model was shown as "installed" in the model settings overview, however it couldn't be loaded properly, as my laptop hasn't previously used latest master with the new rawdenoise model, but my PC had yesterday. |
|
@da-phil : Download status is not stored anywhere, it is resolved at DT start each time from models folder. |
Thanks for confirming, then this was a different issue. I just deleted the model from the list and re-downloaded successfully. |
|
I think we should merge this PR soon, as this can be really helpful for folks who are willing to test all the new AI features @andriiryzhkov contributed to darktable so far, but need to first install the respective libraries to make it work. |
e5aea46 to
b512337
Compare
|
I've split the original scope of this PR into smaller, easier-to-review pieces. After this push, PR #20676 contains only the CLI install scripts and the GPU package registry ( The rest is moving out:
Splitting like this should make each piece small enough to review on its own. Apologies for the churn – the original PR grew larger than I'd intended. |
|
@TurboGit : can you check this PR? It has reduced scope now - only additional tools, no changes in C codebase. |
TurboGit
left a comment
There was a problem hiding this comment.
Thanks, good to go at this stage.

Follow-up to #20647 (ORT library path preference and custom loading). Addresses #20532.
Summary
Manifest-driven system for installing GPU-accelerated ONNX Runtime directly from darktable or via scripts.
Package manifest (
data/ort_gpu.json)All download URLs, SHA-256 checksums, archive formats, and ROCm version mappings in a single JSON file – update it to change URLs/versions without rebuilding darktable. Supports NVIDIA (CUDA), AMD (MIGraphX), and Intel (OpenVINO) on Linux and Windows.
Unified install scripts
install-ort-gpu.shinstall-ort-gpu.ps1install-ort-amd-build.shScripts read the same
ort_gpu.jsonmanifest, detect GPU, download and verify the matching package. Support--vendor,--force,--manifestflags.Documentation
tools/ai/README.md– install methods, EP table, manifest format, manual install, verification.