clisk icon indicating copy to clipboard operation
clisk copied to clipboard

Hardware question

Open BorisKourt opened this issue 9 years ago • 5 comments

Does clisk use only CPU or does it tap into GPU resources?

If CPU does it take advantage of multi-threading?

I built a small image generation script that works on 4096px+ textures and would like to get a dedicated piece of hardware to pipe everything through. Just wondering if I should just focus on the CPU or get a good GPU.

Thank you for making this!

BorisKourt avatar Jan 23 '16 04:01 BorisKourt

CPU only right now. It does make use of all available processors though.

There is actually a known performance problem in clisk with deeply nested generators. If I fix that you should get sub-second rendering even on CPUs, though it is a bit of intricate work as it required refactoring the code generation....

mikera avatar Jan 23 '16 04:01 mikera

Is there a way to figure out if I have a system with deeply nested generators?

Right now I am pushing an image through clisk and then your imagez library, and that ends up at about 23 seconds per image (I haven't tried to optimize anything on my end though.) The expensive steps seem to be shatter and turbulate (expected though.)

I will keep an eye out for updates.

Thanks!

BorisKourt avatar Jan 23 '16 05:01 BorisKourt

A rough way to estimate this is to count the maximum level of nesting in the brackets.

The fundamental problem is that complexity currently grows as O(4^d) where d is the nesting depth of certain clisk functions. This is solvable but I haven't quite had time to fix it yet - will do this weekend if I get enough time.

mikera avatar Jan 23 '16 10:01 mikera

Using the wrong terminology here but: If I 'realize' a vector (ether to texture or something else) at each step (would cause loss of data) and then apply the next step, would this remove the aforementioned nesting? (or just slow things down haha)

BorisKourt avatar Feb 07 '16 19:02 BorisKourt

Yeah you can render a texture and then use that texture elsewhere / in multiple places. Will definitely help performance if you do it right, but at the cost of a fixed resolution on the texture.

mikera avatar Feb 08 '16 11:02 mikera