Vc::currentImplementationSupported() fails
Giordano Khouri
[please enable javascript to see the address]
Wed May 3 18:56:47 CEST 2017
Use the -mavx2 only for code that gets called after you know that avx2 exists on the machine. It must be compiled separately. Your main() and other boring code should be compiled for your base expected machine, e.g. sse2.
> -----Original Message-----
>[please enable javascript to see the address][please enable javascript to see the address]
> frankfurt.de] On Behalf Of Kay F. Jahnke
> Sent: Wednesday, May 03, 2017 2:18 AM
>[please enable javascript to see the address]
> Subject: Re: Vc::currentImplementationSupported() fails
>
> Am 02.05.2017 um 21:54 schrieb Matthias Kretz:
> > On Dienstag, 2. Mai 2017 19:19:48 CEST Kay F. Jahnke wrote:
> >> Am 02.05.2017 um 13:30 schrieb Matthias Kretz:
> >>> I think you're seeing this because AVX512 is not implemented on
> >>> master. Can you try compiling for AVX2 and running on an older
> >>> system? That should give you your expected error message.
> >>
> >> I tried on my laptop. There I compiled with -mavx2, and it can only
> >> handle AVX. same effect:
> >>
> >> Ungültiger Maschinenbefehl (Speicherabzug geschrieben) (illegal
> >> instruction, core dumped)
> > [...]
> >> That must be what it's doing - I'll try and narrow it down some more,
> >> then get in touch again. Maybe there's some code which is executed
> >> before main, could that be it?
> >
> > Yes. E.g. all dynamic initializers of global variables would run before
> main.
> > E.g. if you have global Vc::Vector objects that might be the reason.
>
> Okay, I had two things going on at the same time on my desktop system: I had
> code using Vc before main (some static object's constructor). When I removed
> that, I came past the currentImplementationSupported() call...
>
> > You can run the application in gdb and produce a backtrace on SIGILL.
> > Call `disassemble` to have gdb print the instructions it just
> > executed. Let me know where it happens, maybe there's something I can do
> in Vc.
>
> ... just to hit an illegal instruction which, as you suspected, the compiler
> had generated itself, having been called with -mavx512f, the offender being
>
> vpxord %zmm0,%zmm0,%zmm0
>
> which was used to set some variables to zero. My first proof of functioning
> autovectorization ;)
>
> Roughly the same on the laptop, though the illegal instruction here occured
> in the initialization of another global variable.
>
> While this explains the illegal instructions, it leaves me wondering how I
> can safely run the currentImplementationSupported() test. I may be able to
> avoid the illegal ops before the test, but if the test is actually executed,
> I feel it should not maintain all is well, when the program hits an illegal
> instruction just a few ops later.
>
> With regards
> Kay
>
> _______________________________________________
> Vc mailing list
>[please enable javascript to see the address]
> https://compeng.uni-frankfurt.de/mailman/listinfo/vc
Khouri Giordano
Software Technology Researcher
Nikon Inc.
1300 Walt Whitman Road
Melville NY 11747-3064
Office: 631-547-4335 Fax: 631-547-0361
[please enable javascript to see the address] www.nikonusa.com
CONFIDENTIAL:
This e-mail including any attachments is intended only for the party or parties to whom it is addressed and may contain information which is privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any use, disclosure, dissemination, distribution, copying, or printing of any information contained in or attached to this e-mail is STRICTLY PROHIBITED and may constitute a breach of confidentiality and/or privilege. If you have received this e-mail in error, please notify immediately the sender by reply e-mail and then delete this e-mail and any attachments in their entirety from your system. Thank you. This e-mail message including any attachments is believed to be free of any viruses; however, it is the sole responsibility of the recipient to ensure that it is virus free, and Nikon does not accept any responsibility for any loss, disruption or damage to your data or computer system which may occur in connection with this e-mail including any attachments.
More information about the Vc
mailing list