tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: rapidfuzz failing 9.0 i386 2023Q2



Taylor R Campbell <campbell+netbsd-tech-pkg%mumble.net@localhost> writes:

>> Date: Mon, 03 Jul 2023 08:55:20 -0400
>> From: Greg Troxel <gdt%lexort.com@localhost>
>> 
>> It's not about the build cpu at all.  pkgsrc uses the base compiler, and
>> on i386 NetBSD supports 486 and up, so the gcc config is:
>> 
>>   Target: i486--netbsdelf
>> 
>> and thus avx2 is not available.
>
> That doesn't follow -- you can enable per-file or per-function AVX2
> support with -mavx2 or __attribute__((target("avx2"))) or similar.

I meant "one cannot assume from the target that avx will be present" and
thus absent run-time probing it is unsound to use those instructions.

>> It is totally fair to say that it should be probed for and used at
>> runtime, regardless of build target.  But it does not seem to do that.
>
> It does appear to do that; there's a bunch of logic to query cpuid,
> translate that into feature bits of which one is AVX2, and use that in
> some places.

Cool - after the pullup has settled out and the branch is ok feel free
to hack on this.  Or rather, to commit - would like to keep things
simple until I see a happy post-pullup pbulk, as you know I can't even
manage to keep my pkgsrc trees straight about which is which!


Home | Main Index | Thread Index | Old Index