On 02/12/2019 14:43, Thomas Schwinge wrote:
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?

Why do we do that for libgomp, but not for GCC in general? I mean, it's not "Intel i386" or "Renesas SuperH" (or should that be "Hitachi"?). The only GCC port that has the company name is the "nv" in "nvptx" (ignoring those where the company and architecture are the same).

We use "amdgcn" for the target triplet, but it's just "gcn" almost everywhere else, including the config directories.

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

This seems more significant.

There are certainly Radeon devices that are not GCN, but I think all GCN devices are branded Radeon?

https://www.amd.com/en/technologies/gcn says "GCN powered Radeon GPUs were built ..." so I think AMD would be fine with radeon. I'll put this on my todo list.

Andrew

Reply via email to