diff mbox series

[OpenACC,og8,committed] Handle Compute Capability 7.0 in libgomp

Message ID 18bb8aa8-b368-006a-1989-e4dba5a1fdd4@mentor.com
State New
Headers show
Series [OpenACC,og8,committed] Handle Compute Capability 7.0 in libgomp | expand

Commit Message

Chung-Lin Tang April 1, 2019, 3:29 p.m. UTC
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 mbox series

Patch

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;
 	    }