AnsweredAssumed Answered

Apparent miscompilation of OpenCL program

Question asked by Ono-Sendai on Nov 14, 2015
Latest reply on Dec 1, 2015 by dipak

Hi,

The attached OpenCL program appears to be miscompiled by the AMD Windows drivers, when targeting my HD 7770.

It works fine when targeting the CPU device.

 

To replicate:

Compile the program with empty compilation flag string.

The kernel needs one argument of a buffer of 4 floats to write to.

 

Observed behaviour:

The kernel printf output gives:

Values: (0.000000, 0.000000)

Values: (0.000500, 0.000000)

Values: (0.000500, 0.000000)

 

And the values of the result buffer (argument to kernel) are:

Res: (0.0000000E+000, 0.0000000E+000, 0.0000000E+000, 0)

 

Expected behaviour:

The kernel printf output gives:

Values: (0.000000, 0.000000)

Values: (0.000500, 0.000000)

Values: (0.000000, 0.000500)

And the values of the result buffer (argument to kernel) are:

Res: (0.0000000E+000, 1.9999668E-004, 0.0000000E+000, 0)

 

 

I am guessing this is some kind of register spilling bug or related.

 

 

Catalyst Version: 15.7.1

Outcomes