Menu

#38 Incorrect result with CAL backend when AT code is called

open
nobody
brcc (29)
5
2009-06-03
2009-06-03
Gaurav Garg
No

The following kernel give wrong result -

kernel void
ker(float in1[ ], float in2[ ], out float out1< > )
{
int pos_x = instance().x;
int i = pos_x >> 1;
float t;
if(pos_x & 0x01) {
t = in2[i ];
} else {
t = in1[i ];
}
// Some operations with t
out1 = t;
}

But, making a small change produces expected result-

kernel void
ker(float in1[ ], float in2[ ], out float out1< > )
{
int pos_x = instance().x;
int i = pos_x >> 1;
float t;
if(pos_x & 0x01) {
t = in2[i ];
} else {
t = 3.0f;
}
// Some operations with t
out1 = t;
}

Discussion

  • Gaurav Garg

    Gaurav Garg - 2009-06-03

    Test case

     
  • Gaurav Garg

    Gaurav Garg - 2009-06-03
    • assigned_to: genaganna --> nobody
     

Log in to post a comment.

MongoDB Logo MongoDB