cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

festi
Journeyman III

CodeXL truncate float on when profiling openCL

Hello,

I have a problem when using the "Application Timeline Trace" tool in profile mode. Float constants are truncated

Here an example:


__kernel void useFloats(__global float* in,


                        __global float* out){


    if(get_global_id(0) == 0){


        out[0] += in[0] + 2.5f;


    }


}


If I run this kernel with in pointing to 0.3 and I read out I get 2.8, which is normal because 0.3 + 2.5 = 2.8.

If I run the same kernel with the same input using the "Application Timeline Trace" tool I get 2.3 (the constant 2.5 is truncated to 2.0).

I am running Fedora 19 with an HD7990 and CodeXl 1.4.5728.0.

Does anyone have a solution?

0 Likes
3 Replies
chesik
Staff

Hi,

I've tried reproducing this problem with CodeXL, but so far I have been unable to do so.  I wrote a simple application that dispatches the kernel you show, but I don't see any difference in the output when running under CodeXL.  Can you provide a sample application that shows the problem for you?

Thanks,

Chris

0 Likes

Here a sample code with a makefile for linux and a visual studio project for windows. I have tested it on two computer, a desktop with a Radeon HD 7990 and a laptop with a FirePro M4000. On both computer I have tested the problem on Windows 7 and Fedora and I noticed my problem only appear on Fedora.

On normal circumstances the sample code output:

device name: Tahiti

0.840188 + 0.5 = 1.340188

0.394383 + 0.5 = 0.894383

0.783099 + 0.5 = 1.283099

0.798440 + 0.5 = 1.298440

0.911647 + 0.5 = 1.411647

0.197551 + 0.5 = 0.697551

0.335223 + 0.5 = 0.835223

0.768230 + 0.5 = 1.268230

0.277775 + 0.5 = 0.777775

0.553970 + 0.5 = 1.053970

Computed '10/10' correct values!

But when using the "Application timeline trace" tool of CodeXL on Linux the program output:

device name: Tahiti

0,840188 + 0.5 = 0,840188

0,394383 + 0.5 = 0,394383

0,783099 + 0.5 = 0,783099

0,798440 + 0.5 = 0,798440

0,911647 + 0.5 = 0,911647

0,197551 + 0.5 = 0,197551

0,335223 + 0.5 = 0,335223

0,768230 + 0.5 = 0,768230

0,277775 + 0.5 = 0,277775

0,553970 + 0.5 = 0,553970

Computed '0/10' correct values!

0 Likes

Hi,

I've tried your test case on my Linux development machine and am unable to reproduce the problem.  I've asked the CodeXL QA team to run your test case on their Linux machines to see if this is somehow distribution or hardware specific.

Thanks,

Chris

0 Likes