From: Wileam Yonatan Phan <wileamyp@outlook.com>
To: Andrew Stubbs <ams@codesourcery.com>,
"gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Re: Clarification on newlib version for building AMDGCN offloading backend
Date: Wed, 29 Mar 2023 18:18:45 +0000 [thread overview]
Message-ID: <BY5PR14MB3911DC5232A94B887FB0F006CE899@BY5PR14MB3911.namprd14.prod.outlook.com> (raw)
In-Reply-To: <BY5PR14MB39116A17800816DA7C469146CEB79@BY5PR14MB3911.namprd14.prod.outlook.com>
Hi Andrew,
I just built GCC 12.2.0 with AMDGCN offloading successfully with Spack!
However, when I tried to test it with an OpenACC test code that I have, I encountered the following error message:
wyp@basecamp:~/work/testcodes/f90-acc-ddot$ gfortran -fopenacc -foffload=amdgcn-unknown-amdhsa="-march=gfx900" ddot.f90
as: unrecognized option '-triple=amdgcn--amdhsa'
mkoffload: fatal error: x86_64-pc-linux-gnu-accel-amdgcn-unknown-amdhsa-gcc returned 1 exit status
compilation terminated.
lto-wrapper: fatal error: /home/wyp/work/spack/opt/spack/linux-ubuntu20.04-zen2/gcc-12.2.0/gcc-12.2.0-w7lclfarefmge3uegn2a5vw37bnwhwto/libexec/gcc/x86_64-pc-linux-gnu/12.2.0//accel/amdgcn-unknown-amdhsa/mkoffload returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
For reference, the target options that are recognized by llvm-mc are the following:
yp@basecamp:~/work/spack/opt/spack/linux-ubuntu20.04-zen2/gcc-12.2.0/llvm-13.0.1-6zvbqlbev3wiqihvz2god7pzcptnoxu3/bin$ llvm-mc -version
LLVM (http://llvm.org/):
LLVM version 13.0.1
Optimized build.
Default target: x86_64-unknown-linux-gnu
Host CPU: znver2
Registered Targets:
amdgcn - AMD GCN GPUs
r600 - AMD GPUs HD2XXX-HD6XXX
x86 - 32-bit X86: Pentium-Pro and above
x86-64 - 64-bit X86: EM64T and AMD64
Please advise,
Wil
From: Wileam Yonatan Phan <wileamyp@outlook.com>
Sent: Tuesday, March 7, 2023 13:42
To: Andrew Stubbs <ams@codesourcery.com>; gcc@gcc.gnu.org <gcc@gcc.gnu.org>
Subject: Re: Clarification on newlib version for building AMDGCN offloading backend
Hi Andrew,
Thanks! I've created the first draft as a GitHub PR here:
<https://github.com/spack/spack/pull/35919>
I think it still needs some work on the part where it builds LLVM utilities with CMake.
As much as I want supporting only the newest GCC version, Spack currently supports building all stable versions of GCC from the tarballs, as well as latest develop branch, so I've enabled all versions >= 10.
Thanks,
Wil
From: Andrew Stubbs <ams@codesourcery.com>
Sent: Tuesday, March 7, 2023 10:38
To: Wileam Yonatan Phan <wileamyp@outlook.com>; gcc@gcc.gnu.org <gcc@gcc.gnu.org>
Subject: Re: Clarification on newlib version for building AMDGCN offloading backend
On 06/03/2023 19:23, Wileam Yonatan Phan via Gcc wrote:
> Hi,
>
> I'm working on adding a build recipe for GCC with AMDGCN offloading backend in Spack. Can anyone clarify the following sentence listed on the wiki?
>
>> The Newlib version needs to be contemporaeous with GCC, at least until the ABI is finalized.
> <https://gcc.gnu.org/wiki/Offloading#How_to_build_an_offloading-enabled_GCC>
>
> What are the correct contemporaneous versions for each version of GCC >= 10?
Just match the dates and you'll probably be fine. We've mostly
synchronised the ABI changes across the GCC mainline and the development
branch precisely because the Newlib dependency is shared.
Right now the required version of Newlib is 4.3.0.20230120. Prior to the
ABI change a month or so ago you would have to use a Newlib snapshot.
I wouldn't recommend spending very much of your valuable time on
enabling old versions of these toolchains.
Andrew
next prev parent reply other threads:[~2023-03-29 18:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-06 19:23 Wileam Yonatan Phan
2023-03-07 15:38 ` Andrew Stubbs
2023-03-07 18:42 ` Wileam Yonatan Phan
2023-03-29 18:18 ` Wileam Yonatan Phan [this message]
2023-03-30 8:45 ` Andrew Stubbs
2023-06-30 21:06 ` Wileam Yonatan Phan
2023-07-03 9:02 ` Stubbs, Andrew
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=BY5PR14MB3911DC5232A94B887FB0F006CE899@BY5PR14MB3911.namprd14.prod.outlook.com \
--to=wileamyp@outlook.com \
--cc=ams@codesourcery.com \
--cc=gcc@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).