Thanks for the quick replies. I tend to agree with karlosz. If the past is an indicator of the future, most commits of sb-simd will depend on a particular version of SBCL. And while I'm willing to maintain sb-simd for the forseable future, I'm not willing to support backward compatibility to older versions of SBCL. So an sb-simd on Quicklisp would be broken for most of the people most of the time.
I can separate sb-simd into a relatively stable part that strongly depends on SBCL internals, and an experimental part (mostly the vectorizer) that doesn't. The stable part could be made a contrib and the experimental part could be put on Quicklisp. How does that sound?
________________________________________
From: Charles Zhang <
charles...@yahoo.com>
Sent: Monday, December 20, 2021 9:14:14 PM
To:
stas...@gmail.com
Cc: Heisig, Marco;
sbcl-...@lists.sourceforge.net
Subject: Re: [Sbcl-devel] Potential contrib: sb-simd
Agree with you that the "who" matters. But I still think that there's a layer of friction that gets removed by inclusion in source tree. For example, someone may not know anything about sb-simd, and makes a breaking change, but will know something broke immediately by building, and can figure out a fix right at the point of breakage. If it's out of tree, it gets reported to mailing list, bisection may be needed, original breaker may not be available at that time, etc. I agree that in principle "we go fix it" should suffice, but there is an additional layer of stuff that needs to happen.
The question is whether sb-simd warrants inclusion in the source tree to minimize this friction. Given the amount of internal stuff sb-simd uses (vops, patches, etc), and the general utility of such a contrib, I think it makes sense to classify this differently than say, a quicklisp project written in totally portable common lisp which happens to have a type incorrect make-array constructor. I would even say some of the existing contribs in tree are probably even more "portable/stable" than sb-simd.
Perhaps more opinionated portions of the library which are higher level such as auto-vectorizer IR could be maintained out of tree, as they are less subject to random breakage from backend changes.
On Mon, Dec 20, 2021 at 11:55, Stas Boukarev
<
stas...@gmail.com> wrote:
Say someone changes the make-array constructor and it breaks on some
project, then we go and fix it. Should be the same here.
It's not the location of the source code that matters, but who is
maintaining it. Right now sb-simd is managed by a separate group of
people. It has its own bug tracker, mailing list or whatever. That all
is an additional maintenance burden outside of just keeping the
sb-assem APIs stable.
If something's actively looked after then there will be no bitrot. But
if the original authors lose interest at some point, no amount of
inclusion into the source tree will help keep it alive.
On Mon, Dec 20, 2021 at 10:34 PM Charles Zhang <
charles...@yahoo.com<mailto:
charles...@yahoo.com>> wrote:
>
> The distinction with whether it's a contrib or not comes down to when a change in the compiler proper is made. It's not about just having some automated build system. Say someone changes the EA constructor for x86s:
>
> As a contrib, it's on the person who changes the EA constructor to update sb-simd appropriately.
>
> If it's out of tree, it's on whoever is maintaining the out of tree repository.
>
> So there's a clear organizational difference in terms of effectiveness of staving away bitrot.
>
> On Mon, Dec 20, 2021 at 11:27, Stas Boukarev
> <
stas...@gmail.com<mailto:
stas...@gmail.com>> wrote:
> I think it can be kept in sync without making it a contrib. Automated
> builds should catch any errors.
>
> On Mon, Dec 20, 2021 at 5:40 PM Heisig, Marco <
marco....@fau.de<mailto:
marco....@fau.de>> wrote:
> >
> > Hello everyone,
> >
> > I have been working on a convenient SIMD interface for SBCL (
https://github.com/marcoheisig/sb-simd), and it has slowly reached the point of being usable - at least according to Reddit (
https://www.reddit.com/r/Common_Lisp/comments/riedio/quite_amazing_sbcl_benchmark_speed_with_sbsimd/ ).
> >
> > The question is whether it makes sense to turn sb-simd into an SBCL contrib or whether I should ship it via Quicklisp.
> >
> > Pro (turning sb-simd into a contrib):
> >
> > - Heavy use of SBCL internals and defines hundreds of VOPs.
> >
> > - No external dependencies.
> >
> > Contra:
> >
> > - Rather large for a contrib. Compiling/loading it takes almost as long as compiling SBCL itself.
> >
> > - Some features, especially the vectorizer, are still under development and subject to frequent changes.
> >
> > - The project includes a database of instructions that may be useful independently of SBCL. If I decide to extract this database into a separate project one day, we'd have a contrib that depends on a Quicklisp project. Or I'd have to duplicate a lot of code, with all the problems that come with that.
> >
> > The last item concerns me most. Any thoughts on the issue?
> >
> > Best regards,
> > Marco
> >
> > PS: While I have the attention of the experts - can someone think of an elegant idea how I can mark a piece of x86-64 code to either always VEX encoded instructions or never? In sb-simd, I have a separate package for each instruction set and all instructions therein use the correct encoding for their instruction set. But something like (cl:+ float1 float2), (cl:coerce fixnum 'single-float), or the instructions emitted by a MOVE to/from XMM registers don't know or care about the encoding and frequently incur a SSE<->AVX transition penalty. I wrote a hack to store instruction set information in the lexical environment (
https://github.com/marcoheisig/sb-simd/blob/master/code/tweak-sbcl.lisp), but that is not pretty and doesn't cover all cases. And it forces me to overwrite several frequently used SBCL VOPs like move-to-single-reg. Any better ideas? Could one somehow write a pass that checks whether a piece of x86-64 code contains at least one VEX-encoded instruction, and if so, forces all relevant instructions to use VEX encoding?
> >
> > _______________________________________________
> > Sbcl-devel mailing list
> >
Sbcl-...@lists.sourceforge.net<mailto:
Sbcl-...@lists.sourceforge.net>
>
Sbcl-...@lists.sourceforge.net<mailto:
Sbcl-...@lists.sourceforge.net>