public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Hau Hsu <hau.hsu@sifive.com>
To: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Cc: libc-alpha@sourceware.org, hongrong.hsu@sifive.com,
	jerry.shih@sifive.com, nick.knight@sifive.com,
	Kito Cheng <kito.cheng@sifive.com>,
	Jeff Law <jeffreyalaw@gmail.com>,
	Greentime Hu <greentime.hu@sifive.com>,
	Alice Chan <alice.chan@sifive.com>,
	andrew@sifive.com, vincent.chen@sifive.com,
	Yi-Hsiu Hsu <yihsiu.hsu@sifive.com>
Subject: Re: [PATCH v2 0/5] riscv: Vectorized mem*/str* function
Date: Wed, 26 Apr 2023 11:11:39 +0800	[thread overview]
Message-ID: <1BBEA0D2-2EAF-4972-9938-DAB6B7BF022A@sifive.com> (raw)
In-Reply-To: <a83eb8d1-ead7-57d4-f4dd-fd9e06ecd2d1@linaro.org>

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

Hi Adhemerval,

Thanks for the comment.
The patchset is mainly for the providing a default RVV implementation.
We know that the mechanism to choose ISA variant is not determined yet.
The first patch is a workaround to build Glibc, but won't be the final version.
This decouples the how Glibc get RISC-V hardware information and the RVV function implementation.
As the final decision has been made, we will send another patchset to use that mechanism, 
with the RVV function implementation all together as the version to merge.

I'll send another patchset to fix other obvious mistakes base on your review.
Sorry for sending multiple copies of the same patches. 
I am not familiar with the system and had some SMTP config errors.

Thank you!

Best,

Hau Hsu
Software Engineer
hau.hsu@sifive.com

CC Yi-Hsiu Hsu



> Adhemerval Zanella Netto <adhemerval.zanella@linaro.org> 於 2023年4月21日 下午8:09 寫道:
> 
> 
> 
> On 21/04/23 04:54, Hau Hsu via Libc-alpha wrote:
>> I am submitting version 2 of the patch for adding vectorized mem*/str*
>> functions for RISC-V. This patch builds upon the previous version (v1)
>> available at
>> https://patchwork.sourceware.org/project/glibc/list/?series=17710.
>> 
>> In this version, we have included the __memcmpeq function and set lmul=1
>> for memcmp, which improves its generality.
>> 
>> 
> 
> Is this really the idea for RISCV? Because from last iteration with Jeff Law [1]
> I understood that RISCV would not move to start providing ISA variants where to 
> enable some optimization you will need to either configure with --with-cpu or 
> tune the compiler flags.
> 
> To explain it better, what you are trying is follow what powerpc does: it has
> sysdeps subfolder, each representing and ISA variant, and you only enables it 
> by either forcing on configure or automatically with configure.ac.
> 
> Now, for aarch64 you only have one ABI variant and each CPU or ISA optimization
> (for instance SVE) is enabled *iff* through iFUNC mechanism.  You also have a
> further optimization, that x86_64 and s390 implements, where if you are using
> an specific ABI level (say x86_64-v2) you can using this specific ABI level
> as the base and only provide ifunc variants fro the ABI level higher than you
> have defined (it is really not a big deal, it optimizes the code size a bit,
> and some intra libc calls). But it is still implemented through multiarch folder 
> mechanism, you don't have any sysdep subfolder.
> 
> And that's what I have understood from Jeff's last email, that RISCV will 
> eventually sort out his kernel functionality query mechanism (either by hwcap 
> or by the new syscall), get in on linux-next or linus tree, and then resume the
> work to provide both the unaligned and rvv or whatever other extension you want.
> 
> But it is really up to you maintainers, you can mimic the powerpc way to enable 
> ifunc, which basically adds a lot of boilerplate to include the arch-specific 
> variants. The drawback is now you have another build permutation that you need 
> to keep testing (as you did by adding another build-many-glibcs.py entry).
> 
> [1] https://sourceware.org/pipermail/libc-alpha/2023-March/146824.html
> 
> PS: you seemed to have sent multiple copies of the same patch, I will reply only
> the ones linked to this cover letter.


      reply	other threads:[~2023-04-26  3:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21  7:54 Hau Hsu
2023-04-21  7:54 ` [PATCH v2 1/5] riscv: Enabling vectorized mem*/str* functions in build time Hau Hsu
2023-04-21  7:54 ` [PATCH v2 2/5] riscv: vectorized mem* functions Hau Hsu
2023-04-21 12:12   ` Adhemerval Zanella Netto
2023-04-21  7:54 ` [PATCH v2 3/5] riscv: vectorized str* functions Hau Hsu
2023-04-21 12:14   ` Adhemerval Zanella Netto
2023-04-21  7:54 ` [PATCH v2 4/5] riscv: vectorized strchr and strnlen functions Hau Hsu
2023-04-21  7:54 ` [PATCH v2 5/5] riscv: add vectorized __memcmpeq Hau Hsu
2023-04-21 12:09 ` [PATCH v2 0/5] riscv: Vectorized mem*/str* function Adhemerval Zanella Netto
2023-04-26  3:11   ` Hau Hsu [this message]

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=1BBEA0D2-2EAF-4972-9938-DAB6B7BF022A@sifive.com \
    --to=hau.hsu@sifive.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=alice.chan@sifive.com \
    --cc=andrew@sifive.com \
    --cc=greentime.hu@sifive.com \
    --cc=hongrong.hsu@sifive.com \
    --cc=jeffreyalaw@gmail.com \
    --cc=jerry.shih@sifive.com \
    --cc=kito.cheng@sifive.com \
    --cc=libc-alpha@sourceware.org \
    --cc=nick.knight@sifive.com \
    --cc=vincent.chen@sifive.com \
    --cc=yihsiu.hsu@sifive.com \
    /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).