[Libclc-dev] [PATCH v2 DON'T MERGE 14/14] half_powr: Implement using powr

Jan Vesely via Libclc-dev libclc-dev at lists.llvm.org
Sun Jan 28 19:02:12 PST 2018


On Thu, 2018-01-18 at 16:19 -0500, Jan Vesely wrote:
> On Thu, 2018-01-18 at 20:43 +0100, Jeroen Ketema wrote:
> > This whole patch set LGTM.
> 
> thanks for quick review
> 
> > 
> > > On 18 Jan 2018, at 00:41, Jan Vesely via Libclc-dev <libclc-dev at lists.llvm.org> wrote:
> > > 
> > > v2: Use full precision implementation
> > > 
> > > Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> > > ---
> > > Fails CTS as well. It should probably be left out for now.
> > 
> > I don’t have any issues with committing this, as the real failure is not in this code.

Hi Jeroen,

would you prefer this version(v2) for consistency, or v3?

thanks,
Jan

> 
> I've posted a workaround that passes the CTS. I'm not sure which
> version is preferable. since the workaround clearly hides an issue in
> the original powr implementation.
> 
> Jan
> 
> > 
> > Jeroen
> > 
> > > 
> > > generic/include/clc/clc.h            | 1 +
> > > generic/include/clc/math/half_powr.h | 7 +++++++
> > > generic/lib/SOURCES                  | 1 +
> > > generic/lib/math/half_powr.cl        | 6 ++++++
> > > 4 files changed, 15 insertions(+)
> > > create mode 100644 generic/include/clc/math/half_powr.h
> > > create mode 100644 generic/lib/math/half_powr.cl
> > > 
> > > diff --git a/generic/include/clc/clc.h b/generic/include/clc/clc.h
> > > index 930bbfc..fa48639 100644
> > > --- a/generic/include/clc/clc.h
> > > +++ b/generic/include/clc/clc.h
> > > @@ -78,6 +78,7 @@
> > > #include <clc/math/half_log.h>
> > > #include <clc/math/half_log10.h>
> > > #include <clc/math/half_log2.h>
> > > +#include <clc/math/half_powr.h>
> > > #include <clc/math/half_recip.h>
> > > #include <clc/math/half_rsqrt.h>
> > > #include <clc/math/half_sin.h>
> > > diff --git a/generic/include/clc/math/half_powr.h b/generic/include/clc/math/half_powr.h
> > > new file mode 100644
> > > index 0000000..c4e5242
> > > --- /dev/null
> > > +++ b/generic/include/clc/math/half_powr.h
> > > @@ -0,0 +1,7 @@
> > > +#define __CLC_BODY <clc/math/binary_decl_tt.inc>
> > > +#define __CLC_FUNCTION half_powr
> > > +
> > > +#include <clc/math/gentype.inc>
> > > +
> > > +#undef __CLC_BODY
> > > +#undef __CLC_FUNCTION
> > > diff --git a/generic/lib/SOURCES b/generic/lib/SOURCES
> > > index 9dbd35e..5aa2ba6 100644
> > > --- a/generic/lib/SOURCES
> > > +++ b/generic/lib/SOURCES
> > > @@ -112,6 +112,7 @@ math/half_exp2.cl
> > > math/half_log.cl
> > > math/half_log10.cl
> > > math/half_log2.cl
> > > +math/half_powr.cl
> > > math/half_recip.cl
> > > math/half_rsqrt.cl
> > > math/half_sin.cl
> > > diff --git a/generic/lib/math/half_powr.cl b/generic/lib/math/half_powr.cl
> > > new file mode 100644
> > > index 0000000..53174d4
> > > --- /dev/null
> > > +++ b/generic/lib/math/half_powr.cl
> > > @@ -0,0 +1,6 @@
> > > +#include <clc/clc.h>
> > > +
> > > +#define __CLC_FUNC powr
> > > +#define __CLC_BODY <half_binary.inc>
> > > +#define __FLOAT_ONLY
> > > +#include <clc/math/gentype.inc>
> > > -- 
> > > 2.14.3
> > > 
> > > _______________________________________________
> > > Libclc-dev mailing list
> > > Libclc-dev at lists.llvm.org
> > > http://lists.llvm.org/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: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/libclc-dev/attachments/20180128/48d9a15e/attachment.sig>


More information about the Libclc-dev mailing list