[Patch] GCN: Add pre-initial support for gfx1100
Tobias Burnus
burnus@net-b.de
Sun Jan 7 19:20:19 GMT 2024
ROCm meanwhile supports also some consumer cards; besides the semi-new
gfx1030, support for gfx1100 was added more recently (in ROCm 5.7.1 for
"Ubuntu 22.04 only" and without parenthesis since ROCm 6.0.0).
GCC has already very limited support for gfx1030 - whose multlib support
is - on purpose - not yet enabled by default and is WIP.
The attached patch now adds gfx1100 on top of it, assuming that it
mostly behaves the same as gfx1030. This is really WIP as there are
known build (assembly) issues (see below) and not only "just" runtime
issues.
gfx1100 differs at least in the following aspects from the previously
supported cards:
* gfx1100 has an 'architected flat scratch' which is different from
'absolute flat scratch' which all others (but fiji: 'offset flat
scratch') have. Hence, '.amdhsa_reserve_flat_scratch 0'
has to be excluded to avoid assembly errors.
* gfx1100 also does not support 'v_mov_b32_sdwa', failing to assembly
libc/argz/libc_a-argz_stringify.o with:
"sdwa variant of this instruction is not supported"
→ This has not been address in the patch, hence, specifying gfx1100 in
--with-multilib-list= will fail to build when an in-tree newlib is build.
* * *
The attached patch fixes in addition one issue in libgomp (string-length
len constant is too short for gfx1030 (and gfx1100) = 7 characters) and
it includes the fix that __gfx1030__ is not defined, which I have
submitted separately (yesterday).
With the caveat that gfx1100 is even less usable than gfx1030 and it
won't build newlib, is it nonetheless
OK for mainline ?
(As gfx1100 is not enabled by default in multilib, a regular build will
will not fail and I think the *.md issue can be addressed separately.)
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcn-gfx1100.diff
Type: text/x-patch
Size: 20455 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20240107/59cebc62/attachment-0001.bin>
More information about the Gcc-patches
mailing list