cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

codeboycjy
Journeyman III

A BUG IN THE LATEST ATI STREAM SDK (2.0 BATE3) ?

Hi:
   I've tried the latest ati stream sdk with our code which runs well with the previous SDK. And it crashed. I tried to find the bug in my code, but i found this:

   int kernelTest(float a)
   {
       float4 tempValue = (float4)( 0.0f , 0.0f , 0.0f , 0.0f );
       if( a == 0.0f )
          tempValue.x = 1.0f;
       if( tempValue.x > 0.0f )
          return 0;
       return 1;
   }

   The compiler in the lastest SDK crashed when compiling the simple CL kernel Code with only one kernel above.(We've tested the case in xp and vista)

   To reproduce the problem, append the simple kernel in the cl file of HelloCL Sample from SDK bate3. It will take u only two minutes to catch the error, please check it for us.

   Any idea is really appreciate!! Thanks!!!!

0 Likes
3 Replies
n0thing
Journeyman III

Changing the conditional statement :

if( a == 0.0f )

to

if( fabs(a) < 1e-7 )

solves the error. Strange!

0 Likes

I've tried that and it is solved.

But the problem is not the kernel but the compiler. i think even if there is only some text in the cl file , there is no reason for a compiler to crash.

Actually this simple kernel could compile with a little modification. But in our project , we've got 3k lines of code in cl file. And compiler crashed too( it won't crash with the bate2 version sdk) It's not easy to find a way to skip the error.

And i think the most straightful way to solve this is to find the reason for the problem but not to modify the kernel.

Thanks for ur attension!!

0 Likes

We have traked the issue and it is fixed internally. Thanks for reporting it and the fix will appear in a soon to be released refresh.

0 Likes