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 B19E33858D28 for ; Wed, 18 Jan 2023 18:37:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B19E33858D28 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=1674067070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IQidaGvs4Mr8GI9ArVSgBpXpLK6Q1RcUFzOlJEUY2G8=; b=b1Ws8IHBJB9JV0VRkMyl7JREmkZV/V9UbZjSrXc94AzKOAxB7BhdXSUlfq6LjKaq45K9JZ PgjCGWghYnWGGjUGHmUezHwBgy1n8fzotTGZUAcqgokuxaDu5rlsAlivq9Ci12GoeAi0Oi SBr/eG+pI3EBhYYIn//d9dN5qMj/1kA= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-27-TJI1Wd0POkeragj7igpn4w-1; Wed, 18 Jan 2023 13:37:46 -0500 X-MC-Unique: TJI1Wd0POkeragj7igpn4w-1 Received: by mail-qk1-f197.google.com with SMTP id bj28-20020a05620a191c00b007068d8b5051so5225896qkb.14 for ; Wed, 18 Jan 2023 10:37:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc: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=IQidaGvs4Mr8GI9ArVSgBpXpLK6Q1RcUFzOlJEUY2G8=; b=hwOLRJ303F47aMnaJvXsO2Ms/HdkSLNyJmiMZh1a05LGYXmuI5BccW/SiHB+QZve2h QJxFhZEEMr+lUPhyDsBOq5eLTjOCMBt9MmZLjPVYpU1wL1TyXU+MWz+uIvkeqiOYmi5O CvfVwyIYRgLX96v+Ke1AypV+LkSfp/gXFicIO8w/6883g6k2sTX9pJk9W+01Hf/BxpVJ R58viGy98qqlRkVKEb+B+Pprz+DfrTRomhSS9IM3yNFc5JwhxYSdgTeEobbBTxvRuNeW ktWFaC7NRbqxDU4tomKsFfE5nYiyyGm8+PgW2qqMWwpZbpPAdSZbtQ+0HU+8ZpEmLpKJ +q1A== X-Gm-Message-State: AFqh2ko8sdDtP2XVh862gSS3TBJCtzuBiJWA5TBA84SqG4W9+fZW6A0n h3Yp9KWgWPx3b16WKIoLS72Ed3+XvP2LEq7y4+yr6z1cwXO1S0pvXxPoMND1vqW45qql0wrfOEr 1TaCM6u+OJSgdb8qVBzLfdXN75fwrL4o= X-Received: by 2002:a0c:f842:0:b0:4aa:a353:8426 with SMTP id g2-20020a0cf842000000b004aaa3538426mr370699qvo.55.1674067065799; Wed, 18 Jan 2023 10:37:45 -0800 (PST) X-Google-Smtp-Source: AMrXdXudD4wCNIdIGyfboYiMTPClWoACx6UA0WjSjbONu+rQF5ECHQmySUbLGPNQzgBklsfj9aBhcy/kffQ8dLw/zJo= X-Received: by 2002:a0c:f842:0:b0:4aa:a353:8426 with SMTP id g2-20020a0cf842000000b004aaa3538426mr370697qvo.55.1674067065551; Wed, 18 Jan 2023 10:37:45 -0800 (PST) MIME-Version: 1.0 References: <1f6be8e5-6995-ab6b-f9e7-8fbc68b071e1@codesourcery.com> In-Reply-To: From: Jeff Johnston Date: Wed, 18 Jan 2023 13:37:34 -0500 Message-ID: Subject: Re: [PATCH] amdgcn: Add vectorized math routines To: Kwok Cheung Yeung Cc: Newlib X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="000000000000c5d29d05f28e1c06" X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,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: --000000000000c5d29d05f28e1c06 Content-Type: text/plain; charset="UTF-8" Hi Kwok, Looks good. Patch has been merged. Regards, -- Jeff J. On Wed, Jan 18, 2023 at 12:05 PM Kwok Cheung Yeung wrote: > Hello Jeff, > > I have added the default Red Hat license to the source files based on > those with no explicit license notice. I have also added it to those > files with the 'Software Manual for the Elementary Functions' > attribution, since attribution is not a license as such. > > Thanks > > Kwok > > On 17/01/2023 7:52 pm, Jeff Johnston wrote: > > 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 > > --000000000000c5d29d05f28e1c06--