From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id A75C53858D28 for ; Tue, 17 Jan 2023 19:52:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A75C53858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673985136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kvydObS29N6cTVVrE6B4a7A2fgPHAexViQfvlU+J2oY=; b=LwGflU1f/7fB4hCVwRR0UfuVHHXytvW2phvPiRVS5p0Y1nX4y+hSM1eh4yIx1846U1Bsf8 /U/+7Exa8n8AbS8W1HE3TpPQTX0eJ4FAUSQKTIFp9So3ml5zli9jwC5deMB3sBPGfgHiow kAMjYXjDcYWvOY7B8qh3J1lJFdZ/Jxk= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-249-K-kUT5LlMfOS_i91acs6lw-1; Tue, 17 Jan 2023 14:52:14 -0500 X-MC-Unique: K-kUT5LlMfOS_i91acs6lw-1 Received: by mail-qt1-f197.google.com with SMTP id f23-20020ac84717000000b003b645f1491aso485680qtp.6 for ; Tue, 17 Jan 2023 11:52:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kvydObS29N6cTVVrE6B4a7A2fgPHAexViQfvlU+J2oY=; b=AopuWToZq0QSXyMXgUqfNhNcencFJTCmDQGrUcsVqt+JyX1IFg3u/pugeAlGxRSoQJ /P1i22njaeooEE9zeSXoMpaJdQpjbPf5pX77kDUzhNbV3NJw3Idb4Q08pmGI0yMJBldU O7NDv/Hm4QFb7UYLFmwRTAgNegSb0SxPWvnYmZxlbUgaAFEJqWsPCaGQ1aEXmHB8wQkA J6NMYfZ6n3PyFiacG4IC0ka5nVaJk3d1bebPYCxHSENGFZEauplZGJdoShmPonFIx6GC Evdu644RakPBi159sQiNPkBozdjttYjJm2i0cuAmJxoXI9cHA9FjBLI2wy3NGSOQUi67 DIyw== X-Gm-Message-State: AFqh2kr2fhnGSeaPgatmGa9ZV2Vvewc+qe5/Pi8ywb4DsPZZroRBdE6w 8GyXNTsGdgALIxaFcdP3kuoI7e13zl+xfKFqC5JpQc8ecEniG3kNdH2srpkfAVZs4hhcTz32jq4 vqKZRnh5H0gqDOlCtwc8JopzZhotx2T4= X-Received: by 2002:a05:6214:3b05:b0:4c7:9a42:7c08 with SMTP id nm5-20020a0562143b0500b004c79a427c08mr235579qvb.44.1673985133924; Tue, 17 Jan 2023 11:52:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXv//RSwuVlZYHZT6bac9M22z3uQ7XFBB549BbSDZjYP7Ox9k8jGp+OEamgepxRgV1SjbJDl9I/lykbsSIdrP/c= X-Received: by 2002:a05:6214:3b05:b0:4c7:9a42:7c08 with SMTP id nm5-20020a0562143b0500b004c79a427c08mr235576qvb.44.1673985133711; Tue, 17 Jan 2023 11:52:13 -0800 (PST) MIME-Version: 1.0 References: <1f6be8e5-6995-ab6b-f9e7-8fbc68b071e1@codesourcery.com> In-Reply-To: <1f6be8e5-6995-ab6b-f9e7-8fbc68b071e1@codesourcery.com> From: Jeff Johnston Date: Tue, 17 Jan 2023 14:52:02 -0500 Message-ID: Subject: Re: [PATCH] amdgcn: Add vectorized math routines To: Kwok Cheung Yeung , Newlib X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="0000000000004127b205f27b09e7" X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --0000000000004127b205f27b09e7 Content-Type: text/plain; charset="UTF-8" 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 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 > > 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 > --0000000000004127b205f27b09e7--