Compiling m4ri: msse/ mavx flags

31 views
Skip to first unread message

Aditya Shrotri

unread,
Nov 15, 2017, 7:39:36 PM11/15/17
to M4RI Development
Hello,

I have some code that heavily uses M4RI (primarily mzd_combine_even_in_place; no matrix multiplication). I have compiled M4RI 'as is' without any modifications to the makefile or configure script. During compilation, I noticed that only the msse, msse2 and msse3 flags are enabled for gcc. I was wondering if it would help to enable mavx or any other gcc flags, since I am compiling for relatively new intel processors (6th gen i7) which I believe have these features. If so, how should I go about it? Is there a reason why these flags don't come enabled out of the box? Will using march=native help?

Disclaimer: I have next to no knowledge of SIMD instruction sets, and what the relevant flags really do. Pardon my ignorance if the answer is trivial.

Thanks,
Aditya.

Martin R. Albrecht

unread,
Nov 16, 2017, 3:39:47 AM11/16/17
to m4ri-...@googlegroups.com
Hi there,

enabling those extensions might indeed help, either by using
"-march=native" or explicitly "-mavx". If you notice speed
difference, please report back :) We explicitly deal with SSE2
because we have some explicit code making use of it.

I know that some people are working towards contributing AVX2 code
along the same lines.

Cheers,
Martin
--

_pgp: https://keybase.io/martinralbrecht
_www: https://martinralbrecht.wordpress.com
_jab: martinr...@jabber.ccc.de
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF

Reply all
Reply to author
Forward
0 new messages