public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Jeff Johnston <jjohnstn@redhat.com>
To: Kwok Cheung Yeung <kcy@codesourcery.com>, Newlib <newlib@sourceware.org>
Subject: Re: [PATCH] amdgcn: Add vectorized math routines
Date: Tue, 17 Jan 2023 14:52:02 -0500	[thread overview]
Message-ID: <CAOox84sOBFdokPrdbyH9T0z3Q9zYKY=QCZv598Y1KMVFY05fLA@mail.gmail.com> (raw)
In-Reply-To: <1f6be8e5-6995-ab6b-f9e7-8fbc68b071e1@codesourcery.com>

[-- Attachment #1: Type: text/plain, Size: 4903 bytes --]

Hello Kwok,

Thanks for re-submitting.  For the files you base off that have no license
info, their license defaults to be the Red Hat license at the top of
COPYING.NEWLIB.  You will need to add that license to those new files you
based off.

-- Jeff J.

On Tue, Jan 17, 2023 at 7:36 AM Kwok Cheung Yeung <kcy@codesourcery.com>
wrote:

> Hello
>
> Sorry for the delay in replying. I've gone through the licenses for each
> file - apart from v64df_gamma.c ,v64sf_gamma.c, v64df_log10.c and
> v64sf_log10.c (which are all rather trivial), all the .c files already
> contain the copyright header from the file from which they were derived.
> A number of the original files simply had no license notice, so there
> was nothing to copy over.
>
> No license:
>
> v64_mathcnst.c, v64df_acos.c, v64df_asin.c, v64df_atan.c, v64df_atan2.c,
> v64df_cos.c, v64df_cosh.c, v64df_ispos.c, v64df_numtest.c, v64df_sin.c,
> v64df_sinh.c, v64sf_acos.c, v64sf_asin.c, v64sf_atan.c, v64sf_atan2.c,
> v64sf_cos.c, v64sf_cosh.c, v64sf_ispos.c, v64sf_numtest.c, v64sf_sin.c,
> v64sf_sinh.c
>
> Sun Microsystems license:
>
> v64df_acosh.c, v64df_asinh.c, v64df_atanh.c, v64df_copysign.c,
> v64df_erf.c, v64df_finite.c, v64df_fmod.c, v64df_gamma.c, v64df_hypot.c,
> v64df_ilogb.c, v64df_isnan.c, v64df_lgamma_r.c, v64df_lgamma.c,
> v64df_modf.c, v64df_pow.c, v64df_remainder.c, v64df_rint.c,
> v64df_scalb.c, v64df_scalbn.c, v64df_signif.c, v64df_tan.c,
> v64df_tgamma.c, v64sf_acosh.c, v64sf_asinh.c, v64sf_atanh.c,
> v64sf_copysign.c, v64sf_erf.c, v64sf_exp.c, v64sf_finite.c,
> v64sf_fmod.c, v64sf_gamma.c, v64sf_hypot.c, v64sf_ilogb.c,
> v64sf_isnan.c, v64sf_lgamma_r.c, v64sf_lgamma.c, v64sf_modf.c,
> v64sf_pow.c, v64sf_remainder.c, v64sf_rint.c, v64sf_scalb.c,
> v64sf_scalbn.c, v64sf_signif.c, v64sf_tan.c, v64sf_tgamma.c
>
> Red Hat license:
>
> v64df_exp2.c, v64sf_exp2.c
>
> 'Software Manual for the Elementary Functions' attribution:
>
> v64df_asine.c, v64df_atangent.c, v64df_exp.c, v64df_log.c,
> v64df_log10.c, v64df_sine.c, v64df_sineh.c, v64df_sqrt.c, v64df_tanh.c,
> v64sf_asine.c, v64sf_atangent.c, v64sf_log.c, v64sf_log10.c,
> v64sf_sine.c, v64sf_sineh.c, v64sf_sqrt.c, v64sf_tanh.c
>
> Original:
>
> v64df_log2.c, v64sf_log2.c, v64_reent.c
>
> The amdgcnmach.h file has portions from:
>
> newlib/libm/common/fdlibm.h (Sun Microsystems license)
> newlib/libm/mathfp/zmath.h (no license)
> newlib/libm/common/math_errf.c (ARM license)
> newlib/libm/common/math_config.h (ARM license)
>
> so I have added the Sun and ARM copyright notices to the file. I have
> split off the vector macro library used by all the functions into a
> separate file amdgcn_veclib.h to make the authorship more clear, and
> have amdgcnmach.h include that.
>
> I have added a copyright notice for Siemens (my parent company) at the
> top of each file, with terms similar to the usual MIT/BSD clauses.
>
> Okay for inclusion in Newlib?
>
> Thanks,
>
> Kwok
>
>
> > Hi Kwok,
> >
> > You need to provide headers in all the source and include files.  Some
> > files mention they are based on an existing
> > newlib file.  Those files should copy the license header over and not
> just
> > have a reference (imagine if
> > someone were to delete the original file or rename it).  You are not
> > allowed to change the licensing
> > of a file you have based off of but you can add additional copyright info
> > for your additions if you wish.
> >
> > As mentioned you need to add a license header for the new amdgcnmatch.h
> > header file that is used everywhere.
> >
> > -- Jeff J.
> >
> > On Fri, Dec 2, 2022 at 5:04 PM Kwok Cheung Yeung <kcy@codesourcery.com>
> > wrote:
> >
> >> Hello
> >>
> >> This patch implements a set of vectorized math routines for use by the
> >> auto-vectorizer in GCC for the AMD GCN architecture. The implementation
> >> is located in libm/machine/amdgcn, and is based on the current set of
> >> scalar math routines in Newlib, from libm/common, libm/math and
> >> libm/mathfp (where the level of accuracy was deemed sufficient for our
> >> purposes). I have ensured that the copyright notices from the original
> >> were retained.
> >>
> >> The vectorized routines make extensive use of the GCC vector extensions
> >> for C, some GCN-specific builtins in GCC, and a SIMD abstraction library
> >> located in libm/machine/amdgcn/amdgcnmach.h. As the builtins are a
> >> recent addition to GCC, I have added #if statements to skip compilation
> >> of the routines that use them to ensure that Newlib will still build for
> >> older versions of GCC.
> >>
> >> Versions for 2-lane vectors up to 64-lane vectors (in powers of 2) are
> >> provided for all public functions. Versions with <64 lanes (which is the
> >> 'natural' vector width for AMD GCN) are shims that call the 64-lane
> >> version with the unused lanes masked out.
> >>
> >> Okay for inclusion into Newlib?
> >>
> >> Thanks
> >>
> >> Kwok Yeung
>

  reply	other threads:[~2023-01-17 19:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 22:02 Kwok Cheung Yeung
2022-12-12 22:32 ` Jeff Johnston
2023-01-17 12:34   ` Kwok Cheung Yeung
2023-01-17 19:52     ` Jeff Johnston [this message]
2023-01-18 17:04       ` Kwok Cheung Yeung
2023-01-18 18:37         ` Jeff Johnston

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOox84sOBFdokPrdbyH9T0z3Q9zYKY=QCZv598Y1KMVFY05fLA@mail.gmail.com' \
    --to=jjohnstn@redhat.com \
    --cc=kcy@codesourcery.com \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).