[Patch]+[RFC] AMDGCN offloading – use amdgcn-amdhsa vs. amdgcn-unknown-amdhsa

Tobias Burnus tobias@codesourcery.com
Fri Mar 20 21:08:22 GMT 2020


Dear all,

normally, the target triplet does not play much of a role as
it is not really exposed to the user. However, for offloading,
it appears often:
* In distribution use, offloading support is compiled in, but
   not enabled by default; one needs to use -foffload=… explicitly.
* Even with the default build (all offload targets are enabled by
   default), one still might need to specify the host triplet – if,
   e.g., NVidia and GCN are both supported — as AMDGCN needs a
   -march=, i.e. -foffload=<triplet>=-march=...

Coming to offloading:
* for Nvidia, everyone uses "nvptx-none"
* for AMDGCN is was initially "amdgcn-unknown-amdhsa"

However, when Matthias build it for Debian, he shortened it to
"amdgcn-amdhsa" – as did Richard for SUSE. Cf
https://salsa.debian.org/toolchain-team/gcc/-/blob/master/debian/rules2
andhttps://build.opensuse.org/package/view_file/devel:gcc/gcc10/gcc.spec.in?expand=1

This shortening makes it user friendlier and I like it, but
it now causes that the offloading target is not recognized by
the testsuite – and I think one also should update the documentation.


OK – or do you have better/additional suggestions?

Cheers,

Tobias

-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: amd-unknown.diff
Type: text/x-patch
Size: 2209 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20200320/9be148c1/attachment.bin>


More information about the Gcc-patches mailing list