gavgaurav / nativelibs4java

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

Link problem: Exception in thread "main" com.nativelibs4java.opencl.CLBuildException: Compilation failure : CL_BUILD_PROGRAM_FAILURE #84

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using the AMD OpenCL SDK, just using my CPU.  Happens to be dual core 
Turion but I don't think that's material.

What steps will reproduce the problem?
1. kernel uses double16 (or I think double8)
2. Try to use 'dot'
3. Gets an ld failure.

What is the expected output? What do you see instead?

Was just compiling a kernel at that stage so I'm not expecting any output.  
I've had the double scalar type running with a variation of the add_floats 
kernel.

I get:

Exception in thread "main" com.nativelibs4java.opencl.CLBuildException: 
Compilation failure : CL_BUILD_PROGRAM_FAILURE
Internal Error:  ld failed

    at com.nativelibs4java.opencl.CLProgram.build(CLProgram.java:778)
    at com.nativelibs4java.opencl.CLProgram.createKernel(CLProgram.java:838)
    at com.msgware.OpenCL.run(OpenCL.java:50)
    at com.msgware.OpenCL.main(OpenCL.java:80)

What version of the product are you using? On what operating system?

javacl-1.0.0-RC2-shaded.
Win7 Pro, 64 bit

Please provide any additional information below.

Stupid AMD runtime has native and preferred vector width as 0, but double4 
seems OK - double16 (and I think double8) causes a link failure for dot.

The kernel is:

__kernel
void sum_with_vector(__global const double* a, __global double* out)
{
    double16 one = 1.0 ;

    int i = get_global_id(0) ;
    int off = 2 * i ;

    double16 d = vload16(off, a) ;

    double r = dot(d, one) ;

    out[i] = r ;
}

It may well be that dot isn't available for double8 and double16 - but I feel 
there is still an issue because the diagnostics provided by the runtime don't 
give any clue which routine did not link.

Original issue reported on code.google.com by jman11...@gmail.com on 18 Apr 2012 at 10:09

Attachments:

GoogleCodeExporter commented 9 years ago
And before anyone gets picky:

>>int off = 2 * i ;

Yeah, not what I need with double16 - I was just hacking it trying to find 
which doubleN forms worked. ;-)

Original comment by jman11...@gmail.com on 18 Apr 2012 at 10:16

GoogleCodeExporter commented 9 years ago
Hi jman11964,

Thanks a lot for your bug report !

This issue tracker is not used anymore though, so could you please migrate your 
issue to the github tracker ? (sorry about this !)

https://github.com/ochafik/nativelibs4java/issues

(side note on the issue itself : you're using #pragma OPENCL EXTENSION 
cl_khr_fp64 : enable, right ?)

Cheers
--
Olivier

Original comment by olivier.chafik@gmail.com on 19 Apr 2012 at 3:01