webrev-hsail-transcendentals
Thomas Wuerthinger
thomas.wuerthinger at oracle.com
Tue Jul 1 14:11:22 UTC 2014
Tom,
We cannot ourselves change the copyright header. Either Gustav contributes the code under the current OCA or he shares copyright with AMD such that you can yourself contribute.
Thanks, thomas
On 01 Jul 2014, at 08:34, Doug Simon <doug.simon at oracle.com> wrote:
> I will integrate this patch. However, to do so, I need to change the header for JStrictMath so that it passes ‘mx checkheaders'. The header is currently:
>
> /*
> * Copyright 1999-2006 Sun Microsystems, Inc. All rights reserved.
> * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
> */
>
> Can we simply change this to the expected Oracle copyright header?
>
> -Doug
>
> On Jun 30, 2014, at 9:56 PM, Deneau, Tom <tom.deneau at amd.com> wrote:
>
>> Please review the following webrev which adds support for several missing java.lang.Math routines to the HSAIL backend.
>> http://cr.openjdk.java.net/~tdeneau/graal-webrevs/webrev-hsail-transcendentals/webrev/
>>
>> Many of these routines were declared as native in the regular host backends, but HSAIL has no way to invoke host code from the kernels. But if we could find java implementations of these methods we could use those thru the graal MethodSubstitution framework. For the java implementations, we basically used a file StrictMath.java which Gustav Trede donated to OpenJDK back in 2009 as a java port of the C FDLIBM routines, thank you Gustav.
>> http://mail.openjdk.java.net/pipermail/hotspot-dev/2009-August/001992.html
>>
>> We made only a few minor changes to that file. My understanding from Joe Darcy is that in Java 9 there will be an official port of FDLIBM to java in the JDK, so when that happens we should be able to use that instead.
>>
>>
>> Notes:
>>
>> * JStrictMath.java is the java implementation of the Math routines noted above. HSAILMathSubstitutions redirects several methods to there. In addition test cases were added for many Math routines which were already implemented as java methods in java.lang.Math.
>>
>> * GraalTest --
>>
>> o Since the java spec specifies the tolerance for most of these Math routines in terms of ULPs, I wanted to enable a way for AssertEquals to use ULPs rather than a constant maximum delta. This is done by overriding protected int ulpsDelta() to return something other than zero.
>>
>> * HSAILAssembler
>>
>> o fix the printing of some special Double and Float constants
>>
>> o cvt for float to integer uses zeroi_sat (saturate)
>>
>> * HSAILLIRGenerator & HSAILControlFlow
>>
>> o IntegerTestMove support was required by some of the java implementations
>>
>> * all the rest are just junit tests.
>>
>> All junit tests should pass on the simulator. These math routines have also been useful in solidifying the hsail hardware implementation.
>>
>> -- Tom
>>
>
More information about the graal-dev
mailing list