diff mbox series

GCN: install.texi update for Newlib change and LLVM 18 release

Message ID fff28577-6c2b-472c-b55b-5e6580df4900@baylibre.com
State New
Headers show
Series GCN: install.texi update for Newlib change and LLVM 18 release | expand

Commit Message

Tobias Burnus April 3, 2024, 9:09 a.m. UTC
Update for the GCN Newlib commit 7dd4eb1db "amdgcn: Implement proper locks",
https://sourceware.org/git/?p=newlib-cygwin.git;a=commit;h=7dd4eb1db

And change future to past tense regarding the LLVM 18 release.

OK for mainline?

Thanks,

Tobias

Comments

Jakub Jelinek April 3, 2024, 9:27 a.m. UTC | #1
On Wed, Apr 03, 2024 at 11:09:19AM +0200, Tobias Burnus wrote:
> @@ -3954,8 +3956,8 @@ on the GPU.
>  To enable support for GCN3 Fiji devices (gfx803), GCC has to be configured with
>  @option{--with-arch=@code{fiji}} or
>  @option{--with-multilib-list=@code{fiji},...}.  Note that support for Fiji
> -devices has been removed in ROCm 4.0 and support in LLVM is deprecated and will
> -be removed in LLVM 18.
> +devices has been removed in ROCm 4.0 and support in LLVM is deprecated and has
> +been removed in LLVM 18.

Shouldn't we at configure time then detect the case where fiji can't be
supported and either error if it is included explicitly in multilib list, or
implicitly take it out from that list and arrange error to be emitted when
using -march=fiji/gfx803 ?
Sure, if one configures against LLVM 17 and then updates LLVM to 18, it will
still result in weird errors/LLVM ICEs, but at least in the common case when
one configures GCC 14 against LLVM 18 one won't suffer from those ICEs and
get clear diagnostics that fiji is sadly no longer supported.

	Jakub
Tobias Burnus April 3, 2024, 10:33 a.m. UTC | #2
Hi Jakub, hello world

Jakub Jelinek wrote:
> On Wed, Apr 03, 2024 at 11:09:19AM +0200, Tobias Burnus wrote:
>> @@ -3954,8 +3956,8 @@ on the GPU.
>>   To enable support for GCN3 Fiji devices (gfx803), GCC has to be configured with
>>   @option{--with-arch=@code{fiji}} or
>>   @option{--with-multilib-list=@code{fiji},...}.  Note that support for Fiji [...]
>> +devices has been removed in ROCm 4.0 and support in LLVM is deprecated and has
>> +been removed in LLVM 18.
> Shouldn't we at configure time then detect the case where fiji can't be
> supported and either error if it is included explicitly in multilib list, or
> implicitly take it out from that list and arrange error to be emitted when
> using -march=fiji/gfx803 ?

I am not sure that it is really needed for the reasons given below.
And while it would help some specific use (having LLVM 17 and wanting to use Fiji),
it will also cause some confusion as GCC 14 will magically behave differently
depending how build.

Additionally:

* I bet most use gcc/config.gcc which works in most cases just fine
   (LLVM >= 17; enabling all but Fiji)

* Fiji itself is old – removed from recent ROCm and LLVM >= 18,
   which also implies that it is seen as not seeing a lot of use

While there is no configure-time check, using Fiji with LLVM 18 will
fail with a semi-clear compile-time error when doing the in-tree newlib
build or the libgomp build.
(This shows up by default as issue with LLVM 18 + GCC 12/13;
  see https://gcc.gnu.org/PR114419)

Likewise, it will fail with LLVM < 15 when building gfx1100/gfx1103.

* * *

Note: The compiler itself is perfectly happy to handle fiji and gfx1100 itself,
just the LLVM MC assembler doesn't support one [< 15] or the other [>=LLVM 18].

* * *

For those tracking GCC or caring, the documentation at
   https://gcc.gnu.org/gcc-14/changes.html#amdgcn
and
   https://gcc.gnu.org/install/specific.html#amdgcn-x-amdhsa
provides some glory details.

And it is also mentioned at https://gcc.gnu.org/wiki/Offloading


Tobias
Andrew Stubbs April 3, 2024, 11:22 a.m. UTC | #3
On 03/04/2024 10:27, Jakub Jelinek wrote:
> On Wed, Apr 03, 2024 at 11:09:19AM +0200, Tobias Burnus wrote:
>> @@ -3954,8 +3956,8 @@ on the GPU.
>>   To enable support for GCN3 Fiji devices (gfx803), GCC has to be configured with
>>   @option{--with-arch=@code{fiji}} or
>>   @option{--with-multilib-list=@code{fiji},...}.  Note that support for Fiji
>> -devices has been removed in ROCm 4.0 and support in LLVM is deprecated and will
>> -be removed in LLVM 18.
>> +devices has been removed in ROCm 4.0 and support in LLVM is deprecated and has
>> +been removed in LLVM 18.
> 
> Shouldn't we at configure time then detect the case where fiji can't be
> supported and either error if it is included explicitly in multilib list, or
> implicitly take it out from that list and arrange error to be emitted when
> using -march=fiji/gfx803 ?
> Sure, if one configures against LLVM 17 and then updates LLVM to 18, it will
> still result in weird errors/LLVM ICEs, but at least in the common case when
> one configures GCC 14 against LLVM 18 one won't suffer from those ICEs and
> get clear diagnostics that fiji is sadly no longer supported.

One additional point: since our departure from Siemens, we no longer 
have access to any Fiji devices ourselves. I plan to rip that stuff out 
the first chance I get (not necessarily very soon).

In the meantime, Fiji is not included in the default configuration of 
GCC 14, so anyone enabling it is doing so explicitly and a) will have 
read the documentation, and b) would be surprised if Fiji were 
automatically excluded.

We could emit an error at configure time if an unsuitable LLVM is 
detected, but I don't think it's worth the effort for what is a niche 
product that requires drivers so old they were only supported on now-EOL 
OS versions.

I'm happy with Tobias's patch with s/LLVM is deprecated/LLVM was 
deprecated/. The Newlib versions are a bit awkward, but we can't 
recommend 4.5 until it exists.

Andrew
diff mbox series

Patch

GCN: install.texi update for Newlib change and LLVM 18 release

gcc/ChangeLog:

	* doc/install.texi (amdgcn-*-amdhsa): Update Newlib recommendation
	and update wording for LLVM 18 release.

diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index 269fe7ec870..022bc32901c 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -3944,7 +3944,9 @@  Instead of GNU Binutils, you will need to install LLVM 15, or later, and copy
 by specifying a @code{--with-multilib-list=} that does not list @code{gfx1100}
 and @code{gfx1103}.
 
-Use Newlib (4.3.0 or newer; 4.4.0 or later is recommended).
+Use Newlib (4.3.0 or newer; 4.4.0 contains some improvements and git commit
+7dd4eb1db (2025-03-25, post-4.4.0) fixes device console output for GFX10 and
+GFX11 devices).
 
 To run the binaries, install the HSA Runtime from the
 @uref{https://rocm.docs.amd.com/,,ROCm Platform}, and use
@@ -3954,8 +3956,8 @@  on the GPU.
 To enable support for GCN3 Fiji devices (gfx803), GCC has to be configured with
 @option{--with-arch=@code{fiji}} or
 @option{--with-multilib-list=@code{fiji},...}.  Note that support for Fiji
-devices has been removed in ROCm 4.0 and support in LLVM is deprecated and will
-be removed in LLVM 18.
+devices has been removed in ROCm 4.0 and support in LLVM is deprecated and has
+been removed in LLVM 18.
 
 @html
 <hr />