I've committed this single-liner (and added a comment) to OG8. This allows 
detection of
Compute Capability 7.0 (Volta) and lets libgomp allocate a more reasonable 
default gang
number for Volta GPUs.

Tested without regressions on a powerpc64le-linux system. Note that mainline has
different code for doing this task, so this patch doesn't apply there (not 
needed there).

Chung-Lin


    [og] Handle Compute Capability 7.0 (Volta)

         libgomp/
         * plugin/plugin-nvptx.c (GOMP_OFFLOAD_load_image): Handle up to
         Compute Capability 7.0.
diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c
index c2d3b71..706a36f 100644
--- a/libgomp/plugin/plugin-nvptx.c
+++ b/libgomp/plugin/plugin-nvptx.c
@@ -1273,8 +1273,9 @@ GOMP_OFFLOAD_load_image (int ord, unsigned version, const 
void *target_data,
              dev->register_allocation_unit_size = 256;
              dev->register_allocation_granularity = 2;
            }
-         else if (dev->binary_version <= 62)
+         else if (dev->binary_version <= 70)
            {
+             /* Compute Capability 6.1, 6.2, 7.0 share same parameters.  */
              dev->register_allocation_unit_size = 256;
              dev->register_allocation_granularity = 4;
            }

Reply via email to