[Beignet] [PATCH] Add test cases generator.

Sun, Yi yi.sun at intel.com
Fri Nov 29 23:26:57 PST 2013


Hi Ruiling,
Thank you for your review. I just sent another version. Instead of defining the float ulp, I calculate it before using it.
I'm not sure whether it good enough, any better solution please let me know.
As to the input data, we have found so many values with which the behave of CL built-in function are different from CPU's.
But at this moment we can only use some simple values. When the generator is reliable enough, we should increase input data step by step.

Zhigang,
All your suggestions is implemented now. :p

Thanks
  --Sun, Yi

> -----Original Message-----
> From: Song, Ruiling
> Sent: Thursday, November 28, 2013 10:34 AM
> To: Sun, Yi; beignet at lists.freedesktop.org
> Cc: Jin, Gordon; Sun, Yi; Yangwei Shui; Shui, YangweiX
> Subject: RE: [Beignet] [PATCH] Add test cases generator.
> 
> Great job! But I have two comments to share:
> 1.	seems that you use FLT_ULP(0.000001) as the ulp unit. In fact, 1 ulp
> means the 'last bit of fraction part' in ieee754 representation. In radix b, if x
> has exponent E, then ULP(x) = (2^-23) * (b^E). see
> http://en.wikipedia.org/wiki/Unit_in_the_last_place so, you need to calculate
> the reference value first using cpu, then calculate the ulp value based on it, and
> then do the verification.
> 2. the input data is far from enough, usually many approximation algorithm can
> easily go out of the ulp range at certain input value. I also don't have good
> idea:( but it is better if more input data is tested.
> 



More information about the Beignet mailing list