[nvptx,committed] Add PTX_CTA_SIZE

Message ID 6cc2b276-2cda-1536-7539-f417fef1f82d@suse.de
State New
Headers show
Series
  • [nvptx,committed] Add PTX_CTA_SIZE
Related show

Commit Message

Tom de Vries Dec. 19, 2018, 5:19 p.m.
[ was: Re: [nvptx] vector length patch series ]
On 14-12-18 20:58, Tom de Vries wrote:
> 0005-nvptx-update-openacc-dim-macros.patch


Factored out this patch.

Committed.

Thanks,
- Tom

Patch

[nvptx] Add PTX_CTA_SIZE

2018-12-17  Tom de Vries  <tdevries@suse.de>

	* config/nvptx/nvptx.c (PTX_CTA_SIZE): Define.

---
 gcc/config/nvptx/nvptx.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c
index 2a2d638e6d7..f4095ff5f55 100644
--- a/gcc/config/nvptx/nvptx.c
+++ b/gcc/config/nvptx/nvptx.c
@@ -86,6 +86,11 @@ 
 #define PTX_WORKER_LENGTH 32
 #define PTX_DEFAULT_RUNTIME_DIM 0 /* Defer to runtime.  */
 
+/* The PTX concept CTA (Concurrent Thread Array) maps on the CUDA concept thread
+   block, which has had a maximum number of threads of 1024 since CUDA version
+   2.x.  */
+#define PTX_CTA_SIZE 1024
+
 /* The various PTX memory areas an object might reside in.  */
 enum nvptx_data_area
 {