From: "Cameron Fletcher (CF)" <circumflex@disroot.org>
To: gcc-help@gcc.gnu.org
Subject: Re: How to build gcc with AVX512?
Date: Fri, 15 Nov 2019 09:48:00 -0000 [thread overview]
Message-ID: <6b884a0c-8083-0090-8592-e696e76d5fba@disroot.org> (raw)
In-Reply-To: <f0e7e3cbe662e554395411c30266408c11a940ed.camel@mengyan1223.wang>
On 14/11/19 9:12 pm, Xi Ruoyao wrote:
> On 2019-11-14 14:46 +0530, Cameron Fletcher (CF) wrote:
>> On 14/11/19 1:41 pm, Stefan Ring wrote:
>>> On Thu, Nov 14, 2019 at 6:31 AM Cameron Fletcher (CF)
>>> <circumflex@disroot.org> wrote:
>>>> I am trying to build gcc 8.3 with using --with-fpmath=avx but it
>>>> only builds gcc with AVX1.
>>>>
>>>> Can someone help me on how to build gcc with avx512 support?
>>>
>>> Do you mean you want a compiler that understands the avx512
>>> instruction set and can generate code for it?
>>>
>> Yes. I have a cascade lake xeon on which I am building gcc.
>
> You'll need `-march=cascadelake` to tell GCC your CPU is a Cascade
> Lake, and `-ftree-vectorize` to tell GCC to vectorize some loops into
> AVX/AVX2/AVX512 instructions.
I am trying to build GCC to support AVX,
not building the application with AVX which I will be doing later.
>
> If you want to fully utilize AVX512 `-mprefer-vector-width=512` may be
> necessary. Without this option GCC will use AVX512 instructions (with
> `-march=cascadelake`) but only the 256-bit and 128-bit variants.
>
> And we shoule notice that using AVX512 may slow down the system (due to
> downclocking). Daniel Lemire wrote a nice article discussing these
> issues:
>
> https://lemire.me/blog/2018/09/07/avx-512-when-and-how-to-use-these-new-instructions/
Thanks for this article.
next prev parent reply other threads:[~2019-11-15 9:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-14 5:31 Cameron Fletcher (CF)
2019-11-14 8:27 ` Stefan Ring
2019-11-14 9:16 ` Cameron Fletcher (CF)
2019-11-14 15:42 ` Xi Ruoyao
2019-11-15 9:48 ` Cameron Fletcher (CF) [this message]
2019-11-15 10:22 ` Jonathan Wakely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6b884a0c-8083-0090-8592-e696e76d5fba@disroot.org \
--to=circumflex@disroot.org \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).