[Libclc-dev] Implement more math builtins

Jan Vesely jan.vesely at rutgers.edu
Thu Apr 2 13:28:38 PDT 2015


On Thu, 2015-04-02 at 13:10 -0400, Tom Stellard wrote:
> On Wed, Mar 25, 2015 at 01:47:32PM -0400, Jan Vesely wrote:
> > Hi, 
> > 
> > I applied patches 1-8 (with 9 already in the tree, and also the ldexp
> > patch to avoid warnings), and tested (piglit) on my Turks:
> > acosh LLVM ERROR: Cannot select: REGISTER_LOAD 
> > acospi PASS
> > asinh PASS
> > asinpi PASS
> > atanh same failure as acosh
> > atanpi PASS
> > atan2pi PASS
> > 
> 
> Hi,
> 
> I've committed acospi, asinh, asinpi, and atanpi.  

atan2pi is also OK on r600

> The failures for
> acosh and atanh look like r600 specific bugs.  These both pass on SI+,
> so if no one objects I will commit these as well.

I have verified that the failures are caused by USE_TABLE in log1p
function, which is a known limitation for r600.
Strangely enough, using 1.0f instead of table values made piglit pass
(acosh, atanh, log1p) on r600, I guess the tests should be improved.

jan

> 
> -Tom
> 
> > I have posted piglits for the 3 functions that were missing the passing
> > patches LGTM. The failures are caused by log1p, so I guess the rest is
> > OK as well, but couldn't really test them.
> > I cannot test doubles.
> > 
> > jan
> > 
> > PS: ldexp fails too, but i guess that is expected without fp64
> > 
> > On Thu, 2015-03-12 at 20:11 +0000, Tom Stellard wrote:
> > > Hi,
> > > 
> > > This series implements several more math builtins.  cos/sin
> > > patches require an implementation of fract to work correctly
> > > for doubles.
> > > 
> > > I have patches to both implement fract and fix fmin, which fract
> > > depends on, but I still get failures in the fract and fmin tests
> > > due to what I think are bugs in the R600/SI compiler.
> > > 
> > > Even with those bugs, the sin/cos tests still pass with these
> > > broken implementations.
> > > 
> > > atan2 and atanpi also depend on an ldexp implementation.  For testing,
> > > I just implemented ldexp using the __builtin_amdgpu_ldexp builtin
> > > and these both passed the tests I have.
> > > 
> > > -Tom
> > > 
> > > 
> > > _______________________________________________
> > > Libclc-dev mailing list
> > > Libclc-dev at pcc.me.uk
> > > http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev
> > 
> > -- 
> > Jan Vesely <jan.vesely at rutgers.edu>
> 
> 
> 
> > _______________________________________________
> > Libclc-dev mailing list
> > Libclc-dev at pcc.me.uk
> > http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev
> 

-- 
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/libclc-dev/attachments/20150402/39684a54/attachment.sig>


More information about the Libclc-dev mailing list