AnsweredAssumed Answered

printf bug

Question asked by ms_alkadi on Aug 5, 2014
Latest reply on Aug 14, 2014 by dipak

I have the following kernel

 

kernel void generate_bi(global uint *sizes, global uint *bi)

{

    uint globalID0 = get_global_id(0);

    uint globalID1 = get_global_id(1);

    printf((__constant char*) "(%d, %d) Thread works\n", globalID0, globalID1);

}

 

I don't get all printf's on my screen. For example, when I launch 16x16 in a single workgroup, I get the following

 

(0, 0) Thread works

(1, 0) Thread works

(2, 0) Thread works

(3, 0) Thread works

(4, 0) Thread works

(5, 0) Thread works

(6, 0) Thread works

(7, 0) Thread works

(8, 0) Thread works

(9, 0) Thread works

(10, 0) Thread works

(11, 0) Thread works

(12, 0) Thread works

(13, 0) Thread works

(14, 0) Thread works

(15, 0) Thread works

(0, 1) Thread works

(1, 1) Thread works

(2, 1) Thread works

(3, 1) Thread works

(4, 1) Thread works

(5, 1) Thread works

(6, 1) Thread works

(7, 1) Thread works

(8, 1) Thread works

(9, 1) Thread works

(10, 1) Thread works

(11, 1) Thread works

(12, 1) Thread works

(13, 1) Thread works

(14, 1) Thread works

(15, 1) Thread works

(0, 2) Thread works

(1, 2) Thread works

(2, 2) Thread works

(3, 2) Thread works

(4, 2) Thread works

(5, 2) Thread works

(6, 2) Thread works

 

Any ideas?

Outcomes