Thanks.

So, with that kind of failure mode, my program can test for capabilities on
startup and exit gracefully before any of the offending calls are made.

Rob


On Thu, Sep 17, 2020 at 8:48 PM Rasmus Munk Larsen <[email protected]>
wrote:

> Generally, in that case the program will probably crash with SIGILL (on
> Linux, similar on Windows). when it encounters an instruction not supported
> by the user's CPU. Your only solution is to compile the application for the
> lowest common denominator. That is a downside to a library like Eigen
> without dynamic CPU dispatch. There have been some discussions about adding
> dynamic dispatch, but there are no current plans to do so.
>
> Best,
>    Rasmus
>
> On Thu, Sep 17, 2020 at 7:52 PM Rob McDonald <[email protected]>
> wrote:
>
>> I maintain an open source program that uses Eigen.  The vast majority of
>> my users do not compile the program, instead downloading a pre-compiled
>> binary from our website.  About 80% are on Windows, 10% on Mac and 10% on
>> Linux.  I only provide X86 builds, 32 and 64-bit on Windows, 64-bit only on
>> Mac and Linux.  We may eliminate the 32-bit Windows build soon.
>>
>> Historically, I have compiled with no special flags enabling
>> vectorization options for the CPU.  I would like to pursue this as I expect
>> it will unlock some nice performance gains.  However, I'd like to keep
>> things simple and compatible for users.
>>
>> What happens when someone runs a program compiled with vectorization when
>> their CPU does not support it?  If it fails, how graceful is the failure?
>>
>> Is there a standard approach to identify the capabilities of a given
>> machine?  I could add that to my program and survey users before making a
>> change...  Would such code still run on a machine that was in the process
>> of failing due to not having support for the built in vectorization?  I.e.
>> if it is crashing, can we send a message as to why we're going down?
>>
>> Is there a graceful way to support multiple options?
>>
>> Any tips from other broad use applications is greatly appreciated.
>>
>> Rob
>>
>>
>>

Reply via email to