Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th November 2017, 08:31   #1241  |  Link
Khanattila
Registered User
 
Khanattila's Avatar
 
Join Date: Nov 2014
Posts: 417
Quote:
Originally Posted by Groucho2004 View Post
As I mentioned several times, multi-threading a GPU filter makes little sense. That doesn't mean that you can't multi-thread the rest of your filters. That of course only makes sense if you're using filters that are heavy on the CPU.
Really, this is a topic that we have really talked about many times.
__________________
https://github.com/Khanattila
Khanattila is offline   Reply With Quote
Old 6th November 2017, 10:09   #1242  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 963
Quote:
Originally Posted by johnmeyer View Post
Moving prefetch to the line before the return statement did not do anything.

I'm going to take a break and see if I can figure out the error in my ways ...
Well. You explicitly set the KNLMeansCL MT mode to MT_SERIALIZED at the top of the script, which means that it - and everything upstream of it up to and including the source filter - will run single-threaded and synchronously, just like in vanilla Avisynth. You've thereby intentionally bottlenecked the script, so what are you expecting to see here, really? The only filters that are running multithreaded in your script are interleave() and weave().

You can definitely multithread KNLMeansCL by running multiple instances of it (MT_MULTI_INSTANCE, and I hope you have a ton of RAM) but the main benefit of this isn't that it improves the performance of KNLMeansCL itself, but that it allows filters upstream of it to run in parallel. Avisynth's parallelism is brain damaged, news at 11.

Last edited by TheFluff; 6th November 2017 at 10:13.
TheFluff is offline   Reply With Quote
Old 6th November 2017, 21:01   #1243  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 1,877
Quote:
Originally Posted by TheFluff View Post
Well. You explicitly set the KNLMeansCL MT mode to MT_SERIALIZED at the top of the script, which means that it - and everything upstream of it up to and including the source filter - will run single-threaded and synchronously, just like in vanilla Avisynth. You've thereby intentionally bottlenecked the script, so what are you expecting to see here, really? The only filters that are running multithreaded in your script are interleave() and weave().

You can definitely multithread KNLMeansCL by running multiple instances of it (MT_MULTI_INSTANCE, and I hope you have a ton of RAM) but the main benefit of this isn't that it improves the performance of KNLMeansCL itself, but that it allows filters upstream of it to run in parallel. Avisynth's parallelism is brain damaged, news at 11.
You are right that in post #1232 I did include MT_SERIALIZE, but in my earlier post (#1223), I didn't have that. Believe me, I've tried all the various MT modes.

Your idea of MT_MULTI_INSTANCE is very intriguing. I didn't know about that. I'll pursue that and see what happens. I do happen to have a "ton of RAM," although whether AVISynth+ running KNLMeansCL will use it, or not, I don't know. It should be fun to try it and find out. Thanks!
johnmeyer is offline   Reply With Quote
Old 8th November 2017, 19:17   #1244  |  Link
RieGo
Registered User
 
Join Date: Nov 2009
Posts: 30
i'd like to share a little story in case you got the same problem.
so lately my knlmeanscl didn't work. it always threw some missing dependency errors.
i tried everything mostly reinstalling ms vs runtimes, but i couldn't figure out the problem.
my graphics driver was up to date - that's what i thought.

here's what actually happened: i got a new Win 10 Upgrade lately. what i didn't expect/know is that it replaces my graphics driver with a worse one - which doesn't have opencl support(?)
completely reinstalling the nvidia driver fixed everything and KNLMeansCL is working great again
RieGo is offline   Reply With Quote
Old 8th November 2017, 21:59   #1245  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 1,877
Quote:
Originally Posted by RieGo View Post
i'd like to share a little story in case you got the same problem.
so lately my knlmeanscl didn't work. it always threw some missing dependency errors.
i tried everything mostly reinstalling ms vs runtimes, but i couldn't figure out the problem.
my graphics driver was up to date - that's what i thought.

here's what actually happened: i got a new Win 10 Upgrade lately. what i didn't expect/know is that it replaces my graphics driver with a worse one - which doesn't have opencl support(?)
completely reinstalling the nvidia driver fixed everything and KNLMeansCL is working great again
I think you are right about the graphics driver, and a few posts further up, Groucho tried to help me upgrade my XP driver, but the nVidia installer failed and I eventually gave up. My Win7 installation (same computer, different boot drive) has the last nVidia driver for Win7 and it will run KNLMeansCL.

As for having something replaced by a background upgrade that I don't authorize, I turn off ALL upgrades for everything, including Windows. Neither my Win XP or Win7 installation has been updated in seven years. As a result, I never have had the pleasure of turning on the computer, only to find that it doesn't behave like it did yesterday. As a result, I get a lot of work done because I don't spend any time in the "care and feeding" of my computer.

I partition my hard drives so that only the O/S and programs are on the boot partition. I can do an image backup in less than five minutes. So, if something bad does happen (people always worry that I'll get a virus or something like that, especially since I don't run any anti-virus programs), I can restore the computer in less than ten minutes. I've had to do this a few times when I've installed a new program that screws things up.

So: no background updates; no anti-virus software; no background programs (task manager only lists three processes in XP after I boot); and partition the boot drive. I highly recommend this to anyone who wants a fast, trouble-free computer.
johnmeyer is offline   Reply With Quote
Old 15th November 2017, 22:50   #1246  |  Link
edcrfv94
Registered User
 
Join Date: Apr 2015
Posts: 50
The result is different, which one is correct?

Code:
	SetMemoryMax(3000)
	
	ImageSource("1.png", end=0).Dither_convert_rgb_to_yuv(lsb=true,output="YV12").DitherPost(mode=6)
	
	ConvertBits(bits=16)
	
	KNLMeansCL(d=2, a=4, s=4, h=0.4, channels="Y", stacked=false, device_type="GPU")
	
	ConvertToStacked().DitherPost(mode=6, ampo=1)
Code:
	SetMemoryMax(3000)
	
	ImageSource("1.png", end=0).Dither_convert_rgb_to_yuv(lsb=true,output="YV12").DitherPost(mode=6)
	
	ConvertBits(bits=16)
	ConvertToStacked()
	
	KNLMeansCL(d=2, a=4, s=4, h=0.4, channels="Y", stacked=true, device_type="GPU")
	
	DitherPost(mode=6, ampo=1)
edcrfv94 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:41.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.