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

Re: how best to package when using hardware vectorization with vector-unit specific code?



On 2017-05-10 09:17 +0200, Kay F. Jahnke wrote:
> Hi group!
> 
> I have code which optionally makes use of hardware vectorization. This is
> done generically by using Vc:
> 
> https://github.com/VcDevel/Vc
> 
> When compiling with Vc, the resultant machine code is for a specific vector
> unit only, like AVX or SSE. There are several possible ways of dealing with
> these processor-dependent binaries:
> 
> - create a set of complete target-specific executables and select which one
> to deploy/run on the target machine

As Henrique, just implied, you can package each flavour as a separate
package and have users manaully install a suitable one.

i.e you can generate 

package
package-sse
package-neon
package-sse4
package-avx
and so on.

A small number of packages do this already, where the optimisations make enough difference that it is worth maintaining the variants:
e.g. glibc used to produce
glibc
glibc-i686  (only on the i386 architecture)
https://packages.debian.org/wheezy/libc6-i686
which is a version using the i686 ISA, for use only on machines that can run it.
It has since stopped doing this, either because of runtime detection or 
because the arch moved forward to an i686 baseline.

Some other packages do this sort of thing too.
radiance
radiance-sse3
(did - that one has been removed).

This does require the user to notice the choice and pick a suitable
version, but it's fairly simple to do and could be smoothly upgraded
to runtime function/library level detection in the future if you did
that. You definitely don't want 15 flavours though. Work out which
ones _really_ matter (> 10% speed difference overall?) and package
those, perhaps.

Wookey
-- 
Principal hats:  Linaro, Debian, Wookware, ARM
http://wookware.org/

Attachment: signature.asc
Description: Digital signature


Reply to: