ran out of registers in predicate nvopencc error


I am getting the following error when compiling my application.

It won’t generate a cubin file (doesn’t get this far).

It also generates a warning about render function being to large to optimize:

Your kernel may be way too long.
Maybe you can get around this by splitting long kernel into multiple passes.
I once got that after I unrolled a 192 times loop. Using an actual loop solved the problem.

Cheers mate,
I ll try to split up the kernel code and see what will happen.

I’ve tried ucommenting consecutive blocks of code and managed to get an “internal error” when compiling with a significant amount of code removed.

After some more uncommenting, it compiled succesfully which might indicate that this is indeed a kernel size issue.

I dont have any unrolled loops :fear:

This issue was because I’ve used a home-made rtti (cast to a pointer based on a member variable) to create a pseudo polymorphism solution and for some reason I was thinking that the unused statements wont be compiled, it is just that as rtti suggests compiler doesnt know if the given branch will be executed and so (in my case) it tried to inline all the differenet sub-class methods into the base class pseudo virtual method.

Since the method in question was using other methods from the base class it resulted in a real code explosion!. Almost >.< 57k lines from a 100 line method.