Hi!

On 2019-11-12T13:29:13+0000, Andrew Stubbs <a...@codesourcery.com> wrote:
> --- a/include/gomp-constants.h
> +++ b/include/gomp-constants.h
> @@ -174,6 +174,7 @@ enum gomp_map_kind
>  #define GOMP_DEVICE_NVIDIA_PTX               5
>  #define GOMP_DEVICE_INTEL_MIC                6
>  #define GOMP_DEVICE_HSA                      7
> +#define GOMP_DEVICE_GCN                      8

Unless we are to expect non-AMD GCN implementations (hardware), I'd favor
if all these "GCN" things were called "AMD GCN", like done for "Nvidia
PTX", or "Intel MIC", or why shouldn't we?


> --- a/libgomp/configure.ac
> +++ b/libgomp/configure.ac
> @@ -176,7 +176,7 @@ case "$host" in
>    *-*-rtems*)
>      # RTEMS supports Pthreads, but the library is not available at GCC build 
> time.
>      ;;
> -  nvptx*-*-*)
> +  nvptx*-*-* | amdgcn*-*-*)
>      # NVPTX does not support Pthreads, has its own code replacement.
>      libgomp_use_pthreads=no
>      # NVPTX is an accelerator-only target

I'd have sorted alphabetically, and updated the "NVPTX" comments.

> --- a/libgomp/configure.tgt
> +++ b/libgomp/configure.tgt
> @@ -164,6 +164,10 @@ case "${target}" in
>       fi
>       ;;
>  
> +  amdgcn*-*-*)
> +     config_path="gcn accel"
> +     ;;
> +
>    *)
>       ;;

(Again, I'd sort alphabetically, but again, I acknowledge that the list is
not sorted at present.)


> --- a/libgomp/openacc.h
> +++ b/libgomp/openacc.h
> @@ -55,6 +55,7 @@ typedef enum acc_device_t {
>    /* acc_device_host_nonshm = 3 removed.  */
>    acc_device_not_host = 4,
>    acc_device_nvidia = 5,
> +  acc_device_gcn = 8,

There is no 'acc_device_gcn' in OpenACC.  Per OpenACC 3.0, A.1.2. "AMD
GPU Targets", for example, there is 'acc_device_radeon' (and "the
case-insensitive name 'radeon' for the environment variable
'ACC_DEVICE_TYPE'").  If that is not appropriate to use (I have not read
up how exactly AMD's "GCN" and "radeon" relate to each other), we should
get that clarified in the OpenACC specification.


Grüße
 Thomas

Attachment: signature.asc
Description: PGP signature

Reply via email to