This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

KNLmeansCL → Crash !
#1
Hello,

First off, the problem described happends using Hybrid 2023.01.22.1 .

So, the denoise Filter KNLmeansCL both using vapoursynth & Avisynth works just fine as long i use GPU acceleration or Auto (wich falls back to gpu aswell) !!

But as soon i want to try out my new pc build (ryzen) to check performance and set it to nlmeans to cpu or accelerator Hybrid job crashes ..!?

I think even though i have an decent gpu, i think i can get more fps out of it using my cpu or both gpu & cpu.. That's another thing when gpu acc is used, my hybrid doesnt utilize my cpu much.. almost to none !!

cheers,
td
Reply
#2
Did you try the Vapoursynth Preview?
I know for my system I couldn't find opencl drivers compatible with KNLMeansCL and end up with:
Quote:knlm.KNLMeansCL: no compatible opencl platforms available!
when using:
havsfunc.KNLMeansCL(clip=clip, device_type="cpu")
or
havsfunc.KNLMeansCL(clip=clip, device_type="accelerator")
but since I never found the time to look into it (and didn't care enough), I just left the options as they are.

From what I see, this isn't a Hybrid bug, but rather an issue with KNLMeansCL and the installed drivers.
see: https://github.com/Khanattila/KNLMeansCL/issues/51
Sadly, the developer or KNLMeansCL doesn't seem to be active (or care) anymore,..
(KNLMeansCL works fine with "gpu" and my Intel and my NVIDIA cards, but it doesn't work with my AMD iGPU)

Quote: That's another thing when gpu acc is used, my hybrid doesnt utilize my cpu much.. almost to none !!
Okay,... that is good then, the main point is to move the filter usage onto the gpu,... Smile
For me, 'accelerator' doesn't work at all.

Cu Selur
--- mainly offline 20.-26 of May ---
Reply
#3
(04.05.2023, 21:12)Selur Wrote: Did you try the Vapoursynth Preview?

Now i did  Big Grin, and i get the following syntax error ↓ 

Failed to evaluate the script:
Python exception: knlm.KNLMeansCL: no compatible opencl platforms available!

Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 2866, in vapoursynth._vpy_evaluate
File "src\cython\vapoursynth.pyx", line 2867, in vapoursynth._vpy_evaluate
File "C:\Users\Michel\AppData\Local\Temp\tempPreviewVapoursynthFile21_29_26_422.vpy", line 31, in
clip = havsfunc.KNLMeansCL(clip=clip, device_type="cpu")
File "C:\Program Files\Hybrid\64bit\vsscripts\havsfunc.py", line 5963, in KNLMeansCL
return clip.knlm.KNLMeansCL(d=d, a=a, s=s, h=h, wmode=wmode, wref=wref, device_type=device_type, device_id=device_id).knlm.KNLMeansCL(
File "src\cython\vapoursynth.pyx", line 2612, in vapoursynth.Function.__call__
vapoursynth.Error: knlm.KNLMeansCL: no compatible opencl platforms available!


(04.05.2023, 21:12)Selur Wrote: (KNLMeansCL works fine with "gpu" and my Intel and my NVIDIA cards, but it doesn't work with my AMD iGPU)

Hmm, i guess you are refering to onboard amd gpu's !!  The filter works just splendid using my RX 6600 gpu though..

(04.05.2023, 21:12)Selur Wrote:
Quote: That's another thing when gpu acc is used, my hybrid doesnt utilize my cpu much.. almost to none !!
Okay,... that is good then, the main point is to move the filter usage onto the gpu,... Smile
For me, 'accelerator' doesn't work at all.

Cu Selur


errmm, i probebly have missread you and are going to get an beatin for this Cool .. 
But my goal is to move the workload from the gpu to my → Cpu ... either that or using Both my gpu & Cpu would be even better  Big Grin


cheers,
TD
Reply
#4
KNLMeansCL was basically designed to use the GPU, the cpu mode was always just some sort of 'fallback' function in it.
Also, using the gpu and the cpu with the same filter usually doesn't make sense since the communication overhead to copy intermediate results between them would kill any speed boost you get.

Quote:syntax error
That error has nothing to do with the syntax of the call. The syntax is correct.
Problem is that KNLMeansCL looks for some opencl platform which isn't available on your system.

Quote: i guess you are refering to onboard amd gpu's !! The filter works just splendid using my RX 6600 gpu though..
For clarification, I got a discrete:
- NVIDIA RTX 4080
- Intel Arc A380
and I got the onboard igpu from my Ryzen 9 7950X.

KNLMeansCL does not work for me with auto or with 'gpu' + NVIDIA/Intel.
It returns only black frames with 'gpu' when the AMD igpu is used.
I get the same crash you get when I use either 'accelerator' or 'cpu'.
('accelerator' should tell KNLMeansCL to use the integrated gpu on the cpu, but that doesn't seem to work, 'cpu' should tell KNLMeans to use the raw 'cpu')

Quote:But my goal is to move the workload from the gpu to my → Cpu
=> use another filter (or try to figure out which drivers are needed, https://github.com/Khanattila/KNLMeansCL...quirements might be a starting point)

Cu Selur
--- mainly offline 20.-26 of May ---
Reply
#5
You could try whether it works if you replace the current KNLMeansCL.dll with the 64bit one from https://github.com/Khanattila/KNLMeansCL...ag/v0.6.11
(forget that, the calls in Hybrid do not support the old interface)
Cu Selur
--- mainly offline 20.-26 of May ---
Reply
#6
(04.05.2023, 21:48)Selur Wrote: KNLMeansCL was basically designed to use the GPU, the cpu mode was always just some sort of 'fallback' function in it.
Also, using the gpu and the cpu with the same filter usually doesn't make sense since the communication overhead to copy intermediate results between them would kill any speed boost you get.

Quote:syntax error
That error has nothing to do with the syntax of the call. The syntax is correct.
Problem is that KNLMeansCL looks for some opencl platform which isn't available on your system.


So, thats the main difference between "KNLMeansCL" and the NLmeans filter that is used in vidcoder !?

Because although the two filters do provide identical results, the filter in vidcoder uses full cpu mode ..  And i get like 3 times more fps out of it ...  Dodgy

so, i have to appeal to the creator at github to improve compatibility in hybrid ?  No way to fix / workarround this so it would work in cpu mode ?


thanks anyway,

cheers,
td
Reply
#7
NLMeans wasn't ported to Vapoursynth.
And yes, KNLMeansCL is basically an accelerated version of NLMeans, with some additional options.
At the beginning, KNLMeansCL even was named NLMeansCL. Smile
https://forum.doom9.org/showthread.php?t=171379 might be interessting,..

Quote:so, i have to appeal to the creator at github to improve compatibility in hybrid ? No way to fix / workarround this so it would work in cpu mode ?
I don't know of any way or workaround to get the 'cpu' mode working, so yes, trying to contact the author of the filter and hoping for the best seems to be your only choice.

Cu Selur
--- mainly offline 20.-26 of May ---
Reply
#8
(04.05.2023, 21:55)Selur Wrote: You could try whether it works if you replace the current KNLMeansCL.dll with the 64bit one from https://github.com/Khanattila/KNLMeansCL...ag/v0.6.11
(forget that, the calls in Hybrid do not support the old interface)
Cu Selur

Much obliged , so i copied the 64 bit to avisynth/avisynthplugins that it... but no help there ... same error! 

Unless, i need to copy anything else to somewhere  Blush !?



(04.05.2023, 21:59)Selur Wrote: NLMeans wasn't ported to Vapoursynth.
And yes, KNLMeansCL is basically an accelerated version of NLMeans, with some additional options.
At the beginning, KNLMeansCL even was named NLMeansCL. Smile
https://forum.doom9.org/showthread.php?t=171379 might be interessting,..

Quote:so, i have to appeal to the creator at github to improve compatibility in hybrid ?  No way to fix / workarround this so it would work in cpu mode ?
I don't know of any way or workaround to get the 'cpu' mode working, so yes, trying to contact the author of the filter and hoping for the best seems to be your only choice.

Cu Selur

I guessed as much.. Well the performance difference pointed out the obvious anyway  Big Grin

Thanks for the many links and suggestions, i'll peekaboo arround Wink  


cheers,
td
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)