public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch] GCN: install.texi update for Newlib change and LLVM 18 release
@ 2024-04-03  9:09 Tobias Burnus
  2024-04-03  9:27 ` Jakub Jelinek
  0 siblings, 1 reply; 4+ messages in thread
From: Tobias Burnus @ 2024-04-03  9:09 UTC (permalink / raw)
  To: gcc-patches, Andrew Stubbs

[-- Attachment #1: Type: text/plain, Size: 245 bytes --]

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

[-- Attachment #2: gcn-install.diff --]
[-- Type: text/x-patch, Size: 1347 bytes --]

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 />

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Patch] GCN: install.texi update for Newlib change and LLVM 18 release
  2024-04-03  9:09 [Patch] GCN: install.texi update for Newlib change and LLVM 18 release Tobias Burnus
@ 2024-04-03  9:27 ` Jakub Jelinek
  2024-04-03 10:33   ` Tobias Burnus
  2024-04-03 11:22   ` Andrew Stubbs
  0 siblings, 2 replies; 4+ messages in thread
From: Jakub Jelinek @ 2024-04-03  9:27 UTC (permalink / raw)
  To: Tobias Burnus; +Cc: gcc-patches, Andrew Stubbs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Patch] GCN: install.texi update for Newlib change and LLVM 18 release
  2024-04-03  9:27 ` Jakub Jelinek
@ 2024-04-03 10:33   ` Tobias Burnus
  2024-04-03 11:22   ` Andrew Stubbs
  1 sibling, 0 replies; 4+ messages in thread
From: Tobias Burnus @ 2024-04-03 10:33 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: gcc-patches, Andrew Stubbs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Patch] GCN: install.texi update for Newlib change and LLVM 18 release
  2024-04-03  9:27 ` Jakub Jelinek
  2024-04-03 10:33   ` Tobias Burnus
@ 2024-04-03 11:22   ` Andrew Stubbs
  1 sibling, 0 replies; 4+ messages in thread
From: Andrew Stubbs @ 2024-04-03 11:22 UTC (permalink / raw)
  To: Jakub Jelinek, Tobias Burnus; +Cc: gcc-patches

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-03 11:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-03  9:09 [Patch] GCN: install.texi update for Newlib change and LLVM 18 release Tobias Burnus
2024-04-03  9:27 ` Jakub Jelinek
2024-04-03 10:33   ` Tobias Burnus
2024-04-03 11:22   ` Andrew Stubbs

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).