CUDA support

This commit is contained in:
MaddoScientisto 2026-05-09 18:37:24 +02:00
commit 8020fb6d25
2 changed files with 37 additions and 6 deletions

View file

@ -166,13 +166,13 @@ namespace AIFotoONLUS.Core
{
if (useGpu)
{
net.SetPreferableBackend(Backend.CUDA);
net.SetPreferableTarget(Target.CUDA);
net.SetPreferableBackend(Net.Backend.CUDA);
net.SetPreferableTarget(Net.Target.CUDA);
return;
}
net.SetPreferableBackend(Backend.OPENCV);
net.SetPreferableTarget(Target.CPU);
net.SetPreferableBackend(Net.Backend.OPENCV);
net.SetPreferableTarget(Net.Target.CPU);
}
private void ValidateGpuRuntime()