public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] amdgcn: Ensure gfx11 is running in cumode
@ 2024-03-21 13:39 Andrew Stubbs
  2024-03-21 13:39 ` [commmitted] amdgcn: Comment correction Andrew Stubbs
  2024-03-22 11:56 ` [committed] amdgcn: Ensure gfx11 is running in cumode Thomas Schwinge
  0 siblings, 2 replies; 4+ messages in thread
From: Andrew Stubbs @ 2024-03-21 13:39 UTC (permalink / raw)
  To: gcc-patches

CUmode "on" is the setting for compatibility with GCN and CDNA devices.

Committed to mainline.

gcc/ChangeLog:

	* config/gcn/gcn-hsa.h (ASM_SPEC): Pass -mattr=+cumode.
---
 gcc/config/gcn/gcn-hsa.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/config/gcn/gcn-hsa.h b/gcc/config/gcn/gcn-hsa.h
index 9cf181f52a4..c75256dbac3 100644
--- a/gcc/config/gcn/gcn-hsa.h
+++ b/gcc/config/gcn/gcn-hsa.h
@@ -107,6 +107,7 @@ extern unsigned int gcn_local_sym_hash (const char *name);
 		  "%{" NO_XNACK XNACKOPT "} " \
 		  "%{" NO_SRAM_ECC SRAMOPT "} " \
 		  "%{march=gfx1030|march=gfx1100:-mattr=+wavefrontsize64} " \
+		  "%{march=gfx1030|march=gfx1100:-mattr=+cumode} " \
 		  "-filetype=obj"
 #define LINK_SPEC "--pie --export-dynamic"
 #define LIB_SPEC  "-lc"
-- 
2.41.0


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

* [commmitted] amdgcn: Comment correction
  2024-03-21 13:39 [committed] amdgcn: Ensure gfx11 is running in cumode Andrew Stubbs
@ 2024-03-21 13:39 ` Andrew Stubbs
  2024-03-22 11:56 ` [committed] amdgcn: Ensure gfx11 is running in cumode Thomas Schwinge
  1 sibling, 0 replies; 4+ messages in thread
From: Andrew Stubbs @ 2024-03-21 13:39 UTC (permalink / raw)
  To: gcc-patches

The location of the marker was changed, but the comment wasn't updated.
Fixed now.

Committed to mainline

gcc/ChangeLog:

	* config/gcn/gcn.cc (gcn_expand_builtin_1): Comment correction.
---
 gcc/config/gcn/gcn.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/config/gcn/gcn.cc b/gcc/config/gcn/gcn.cc
index bc076d1120d..fca001811e5 100644
--- a/gcc/config/gcn/gcn.cc
+++ b/gcc/config/gcn/gcn.cc
@@ -4932,8 +4932,8 @@ gcn_expand_builtin_1 (tree exp, rtx target, rtx /*subtarget */ ,
       }
     case GCN_BUILTIN_FIRST_CALL_THIS_THREAD_P:
       {
-	/* Stash a marker in the unused upper 16 bits of s[0:1] to indicate
-	   whether it was the first call.  */
+	/* Stash a marker in the unused upper 16 bits of QUEUE_PTR_ARG to
+	   indicate whether it was the first call.  */
 	rtx result = gen_reg_rtx (BImode);
 	emit_move_insn (result, const0_rtx);
 	if (cfun->machine->args.reg[QUEUE_PTR_ARG] >= 0)
-- 
2.41.0


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

* Re: [committed] amdgcn: Ensure gfx11 is running in cumode
  2024-03-21 13:39 [committed] amdgcn: Ensure gfx11 is running in cumode Andrew Stubbs
  2024-03-21 13:39 ` [commmitted] amdgcn: Comment correction Andrew Stubbs
@ 2024-03-22 11:56 ` Thomas Schwinge
  2024-03-22 13:12   ` Andrew Stubbs
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Schwinge @ 2024-03-22 11:56 UTC (permalink / raw)
  To: Andrew Stubbs; +Cc: gcc-patches

Hi Andrew!

On 2024-03-21T13:39:53+0000, Andrew Stubbs <ams@baylibre.com> wrote:
> CUmode "on" is the setting for compatibility with GCN and CDNA devices.

> --- a/gcc/config/gcn/gcn-hsa.h
> +++ b/gcc/config/gcn/gcn-hsa.h
> @@ -107,6 +107,7 @@ extern unsigned int gcn_local_sym_hash (const char *name);
>  		  "%{" NO_XNACK XNACKOPT "} " \
>  		  "%{" NO_SRAM_ECC SRAMOPT "} " \
>  		  "%{march=gfx1030|march=gfx1100:-mattr=+wavefrontsize64} " \
> +		  "%{march=gfx1030|march=gfx1100:-mattr=+cumode} " \
>  		  "-filetype=obj"

Is this just general housekeeping, or should I be seeing any kind of
change in the GCN target '-march=gfx1100' test results?  (I'm not.)


Grüße
 Thomas

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

* Re: [committed] amdgcn: Ensure gfx11 is running in cumode
  2024-03-22 11:56 ` [committed] amdgcn: Ensure gfx11 is running in cumode Thomas Schwinge
@ 2024-03-22 13:12   ` Andrew Stubbs
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Stubbs @ 2024-03-22 13:12 UTC (permalink / raw)
  To: Thomas Schwinge; +Cc: gcc-patches

On 22/03/2024 11:56, Thomas Schwinge wrote:
> Hi Andrew!
> 
> On 2024-03-21T13:39:53+0000, Andrew Stubbs <ams@baylibre.com> wrote:
>> CUmode "on" is the setting for compatibility with GCN and CDNA devices.
> 
>> --- a/gcc/config/gcn/gcn-hsa.h
>> +++ b/gcc/config/gcn/gcn-hsa.h
>> @@ -107,6 +107,7 @@ extern unsigned int gcn_local_sym_hash (const char *name);
>>   		  "%{" NO_XNACK XNACKOPT "} " \
>>   		  "%{" NO_SRAM_ECC SRAMOPT "} " \
>>   		  "%{march=gfx1030|march=gfx1100:-mattr=+wavefrontsize64} " \
>> +		  "%{march=gfx1030|march=gfx1100:-mattr=+cumode} " \
>>   		  "-filetype=obj"
> 
> Is this just general housekeeping, or should I be seeing any kind of
> change in the GCN target '-march=gfx1100' test results?  (I'm not.)

I'm pretty sure cumode is the default, but defaults can change and now 
we're future-proof. The option doesn't change the ELF flags at all.

The opposite of cumode allows more than 16 wavefronts in a workgroup, 
but they can't physically share a single LDS memory so it would break 
OpenACC broadcasting and reductions, and OpenMP libgomp team metadata. 
Also "cgroup" low-latency memory allocation.

Andrew

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-21 13:39 [committed] amdgcn: Ensure gfx11 is running in cumode Andrew Stubbs
2024-03-21 13:39 ` [commmitted] amdgcn: Comment correction Andrew Stubbs
2024-03-22 11:56 ` [committed] amdgcn: Ensure gfx11 is running in cumode Thomas Schwinge
2024-03-22 13:12   ` 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).