Log in

View Full Version : I'll give a shot to OnCUDA()


FranceBB
16th July 2020, 16:00
Hi there,
after pondering about it and waiting for many hours once again for the encode to complete, I decided to give the new OnCUDA() function of Avisynth+ a shot.
This is one of the functions inherited by the AVS Neo merge so I think that some of you who have been using the Nekopanda version may be more familiar with it.
So... the question is: how does it work?
I have two Intel Xeon E5-2640 20c/40th, 64 GB of RAM and an NVIDIA Quadro P4000, I'm ready to go. So now that AVS Neo has been merged into Avisynth+, does Avisynth+ automatically detect my configuration and uses the GPU when needed or is it relying on the CPU only as it used to? I expect the latter...
In that case, can I just put OnCUDA() before everything in my script and expect it to work? Will it use the GPU for every internal function like resizers, tweaks, convertto etc? And what about external plugins? I know that ffms2 and LSMASH should work with the GPU, but how about everything else? Like, for instance, QTGMC: can I just specify OnCUDA() and expect some filters to work on the GPU and some other - that lack a GPU implementation - work on the CPU automatically? Or perhaps is it gonna deliver an error? And what about those hardware accelerations, are they made by plugin writers themselves?
The idea is to take all my automatized workflows and speed them up by using the so-far-not-used GPU power (expect for x264 --openCl but that's another story).

Thank you in advance for clearing my nebulous questions. :)


As a side note: although some of you know me as a very conservative person on my XP x86, I'm also a very open person when it comes to my job since I have Win10 x64 there, a way more powerful hardware and I'm not hog-tied to specific dlls for compatibility.

tormento
17th July 2020, 14:06
So... the question is: how does it work?
AFAIK you need specific rewrite and recompile of normal plugins.

How I wish we could use CUDA so easily with no rewrite needed.

Just get a look at the original author page.

P.S: if you have some voice in the purchase process, get 4 2080 TI cards instead of Quadro. Look at this (https://grando.ai/choose-a-gpu-machine-for-ai-deep-learning/#grando-rm) beast.

gispos
18th July 2020, 06:20
Cuda is not implemented in the normal Avisynth + version.
Is still exclusive Nekopanda function, unfortunately.

There are also few plugins. As far as I know only those on the Nekopanda github page.
https://github.com/nekopanda/AviSynthCUDAFilters

FranceBB
18th July 2020, 12:06
Cuda is not implemented in the normal Avisynth + version.
Is still exclusive Nekopanda function, unfortunately.

There are also few plugins. As far as I know only those on the Nekopanda github page.
https://github.com/nekopanda/AviSynthCUDAFilters

What was the whole test1, test2, test3, test4, test5, test6, test7, test8 thing that Ferenc made, then? I thought he merged AVXSynth last year thus introducing Linux/OSX support and AVS Neo this year thus introducing CUDA Support.

AFAIK you need specific rewrite and recompile of normal plugins.

How I wish we could use CUDA so easily with no rewrite needed.

Just get a look at the original author page.

P.S: if you have some voice in the purchase process[...]

I see... So it's gonna take a lot before it will work...
As to the budget, I have little to no say at all in the purchasing process. I mean, I can ask, but then my boss has to approve it and the boss of my boss has to approve it and so on. I'm level 4 out of 10, you can easily see how many people above me have to approve it before it happens xD I don't really have a say on those things xD

tormento
18th July 2020, 14:07
What was the whole test1, test2, test3, test4, test5, test6, test7, test8 thing that Ferenc made, then?
I think him only can answer and he is on vacation... You need to wait ;)

The curious think is that the release list tells that "in the original Plus, you could use only one Prefetch, but you can use any number of CUDA versions.
Also, an argument has been added to specify the number of frames to prefetch". How are we supposed to use CUDA prefetch if the script doesn't support CUDA?

As to the budget, I have little to no say at all in the purchasing process.
Pass him the link, perhaps he had a nice night before, who knows :devil:

gispos
19th July 2020, 20:16
What was the whole test1, test2, test3, test4, test5, test6, test7, test8 thing that Ferenc made, then? I thought he merged AVXSynth last year thus introducing Linux/OSX support and AVS Neo this year thus introducing CUDA Support.

As I understand it, almost everything that has to do with multithreading has been implemented from Neo fork.
Therefore there is 'OnCPU', but there is no 'OnCuda' which would be necessary for Cuda.

FranceBB
19th July 2020, 20:53
As I understand it, almost everything that has to do with multithreading has been implemented from Neo fork.
Therefore there is 'OnCPU', but there is no 'OnCuda' which would be necessary for Cuda.

Oh, I see... got it.

qyot27
20th July 2020, 04:38
What was the whole test1, test2, test3, test4, test5, test6, test7, test8 thing that Ferenc made, then? I thought he merged AVXSynth last year thus introducing Linux/OSX support and AVS Neo this year thus introducing CUDA Support.
AvxSynth was not merged (and the pull request for Linux support is here (https://github.com/AviSynth/AviSynthPlus/pull/120), for anyone interested in the process by which it happened). Very little of what AvxSynth did on their end was usable/salvageable for AviSynth+. The few parts that were missing and could be used were cannibalized, but A) you could probably count them on one hand and B) were mostly there to smooth things over in the initial transition and could very well be refactored away in the future with more general or more performant and tailored solutions. Most of the things that made AviSynth+ compatible with Linux were done during the process of modernizing to use standard C++11 and intrinsics and the ability to build using GCC. You know, the stuff that already separated Plus from 2.6.