This is the mail archive of the
mailing list for the GCC project.
Re: [gcn][patch] Add -mgpu option and plumb in assembler/linker
- From: Andrew Stubbs <andrew_stubbs at mentor dot com>
- To: Andrew Stubbs <ams at codesourcery dot com>, Jan Hubicka <hubicka at ucw dot cz>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 6 Jun 2017 20:52:52 +0100
- Subject: Re: [gcn][patch] Add -mgpu option and plumb in assembler/linker
- Authentication-results: sourceware.org; auth=none
- References: <firstname.lastname@example.org> <email@example.com>
On 29/05/17 18:27, Martin Jambor wrote:
I apologize for taking so long to reply, I was traveling for two past
weeks and just before that we suffered some local infrastructure
issues that prevented me from working on this too.
And I've just been on vacation for a week. :-)
On Fri, Apr 28, 2017 at 06:06:39PM +0100, Andrew Stubbs wrote:
At the moment I prefer to use --with-as and --with-ld configure
Those only work with absolute paths, which is not suitable for a
toolchain that may be installed in a user's home directory, which will
be my use case.
despite the error message. I guess we are fine with passing -fno-lto
or rather disabling lto at configure time for the time being.
I configure with --disable-lto.
This is the one thing that was it difficult for me to get it working.
I had to upgrade my kernel and both run-time libraries to the newest
ROCm 1.5, re-compile llvm and lld from ROCm github branches, and
rewrite our testing kernel invoker to use non-deprecated HSA 1.1
functions (we had been using hsa_code_object_deserialize and friends
from HSA 1.0). But finally, my kernels get loaded, started and work.
Hmm, I didn't realize it would be so hard. I guess I'm joining the party
3. Add -mgpu option and corresponding --with-gpu. I've deliberately used
"gpu" instead of "cpu" because I want offloading compilers to be able to say
"-mcpu=foo -foffload=-mgpu=bar", or even have the host compiler just
understand -mgpu and DTRT.
As far as I am concerned, this seems like a good idea.
Thomas objects to the new option, and after talking with him the
reasoning seems sound. GCC has been moving away from -mcpu in any case,
so I guess I'll put -march and -mtune back, and use those for the same
I'll commit the patch with those changes soonish.