On 2018/12/14 10:53 PM, Thomas Schwinge wrote:
Additionally the following, or why not?  Please comment on the one TODO
which before your async re-work also was -- incorrectly? -- run
asynchronously?


diff --git libgomp/oacc-parallel.c libgomp/oacc-parallel.c
index 5a441c9efe38..91875c57fc97 100644
--- libgomp/oacc-parallel.c
+++ libgomp/oacc-parallel.c
@@ -413,11 +413,11 @@ GOACC_enter_exit_data (int device, size_t mapnum,
                {
                case GOMP_MAP_ALLOC:
                case GOMP_MAP_FORCE_ALLOC:
-                 acc_create (hostaddrs[i], sizes[i]);
+                 acc_create_async (hostaddrs[i], sizes[i], async);
                  break;
                case GOMP_MAP_TO:
                case GOMP_MAP_FORCE_TO:
-                 acc_copyin (hostaddrs[i], sizes[i]);
+                 acc_copyin_async (hostaddrs[i], sizes[i], async);
                  break;
                default:

Yes! I think these were somehow missed by mistake. Thanks for catching!

                  gomp_fatal (">>>> GOACC_enter_exit_data UNHANDLED kind 
0x%.2x",
@@ -563,6 +563,8 @@ GOACC_update (int device, size_t mapnum,
                 the value of the allocated device memory in the
                 previous pointer.  */
              *(uintptr_t *) hostaddrs[i] = (uintptr_t)dptr;
+             /* This is intentionally no calling acc_update_device_async,
+                because TODO.  */
              acc_update_device (hostaddrs[i], sizeof (uintptr_t));
/* Restore the host pointer. */

I don't remember adding this piece of comment, it might have been Cesar I guess?
I'm not sure if there's any real reason not to use acc_update_device_async 
here...
Change and test to see?

Thanks,
Chung-Lin

Reply via email to