juvenildo01 / aparapi

Automatically exported from code.google.com/p/aparapi
Other
0 stars 0 forks source link

Calling large methods with lots of parameters causes a compilation failure #133

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I implemented a SHA1 PBKDF2 Kernal in aparapi (the results are correct for 
trivial test cases).  For some reason, aparapi fails to compile it.  I can fix 
the issue by removing method calls, but that breaks the code.  It looks like 
between either the large amount of code in methods, the large number of 
parameters for some, or multiple calls from a single method, there's a problem. 
 Funny enough, running the SHA1 code in a standalone way works fine.

I read through the rules for permitted constructs, and I seem to be fine.  All 
fields are final and either primitives or arrays of primitives. The code 
doesn't touch any classes. No exceptions are thrown. Etc.

Here's the error I'm getting:

Nov 06, 2013 8:41:33 AM com.amd.aparapi.KernelRunner warnFallBackAndExecute
WARNING: Reverting to Java Thread Pool (JTP) for class aparapi.SHA1PBKDF2: 
OpenCL compile failed

<program output>

clBuildProgram failed
************************************************
fcl build 1 succeeded.
fcl build 2 succeeded.
Error: internal error.

************************************************

Original issue reported on code.google.com by ehrm...@gmail.com on 6 Nov 2013 at 4:57

Attachments:

GoogleCodeExporter commented 9 years ago
This was on 64-bit Windows 7 with Java 7.

Original comment by ehrm...@gmail.com on 6 Nov 2013 at 5:31

GoogleCodeExporter commented 9 years ago
Try adding -Dcom.amd.aparapi.enableShowGeneratedOpenCL=true to see the actual 
OpenCL source code being generated for your kernel. The message seems to say it 
is an OpenCL compile time error.

What version of OpenCL are you using?

Original comment by ecasp...@gmail.com on 6 Nov 2013 at 5:42

GoogleCodeExporter commented 9 years ago
Here's the attached generated code. I got gcc to compile it with just a few 
tweaks, so it's probably OK. (long will be 64 bits on a GPU, right?)

I'm not sure which version of OpenCL I have.

Original comment by ehrm...@gmail.com on 6 Nov 2013 at 6:22

Attachments:

GoogleCodeExporter commented 9 years ago
I forgot to mention I'm using the Aparapi_2013_01_23 build.

Original comment by ehrm...@gmail.com on 6 Nov 2013 at 6:42