[Openmp-commits] [PATCH] D14031: [OpenMP] Initial implementation of OpenMP offloading library - libomptarget.

Narayanaswamy, Ravi via Openmp-commits openmp-commits at lists.llvm.org
Wed Jan 6 08:16:35 PST 2016


OpenMP says : " If the corresponding list item is not present in the device data environment then no assignment occurs to or from the original list item."

Device.IsInit being false can be one's implementation as the list item not present in the device data environment.

Ravi

-----Original Message-----
From: Jonas Hahnfeld [mailto:Hahnfeld at itc.rwth-aachen.de] 
Sent: Wednesday, January 6, 2016 7:30 AM
To: sfantao at us.ibm.com; hfinkel at anl.gov; Peyton, Jonathan L; Cownie, James H; a.bataev at hotmail.com; Narayanaswamy, Ravi; chandlerc at gmail.com
Cc: f.brygidyn at samsung.com; alexe at us.ibm.com; openmp-commits at lists.llvm.org; Hahnfeld at itc.rwth-aachen.de; hyviquel at gmail.com; caomhin at us.ibm.com; cbertol at us.ibm.com; andreybokhanko at gmail.com; sergos.gnu at gmail.com
Subject: Re: [PATCH] D14031: [OpenMP] Initial implementation of OpenMP offloading library - libomptarget.

Hahnfeld added a comment.

I just came across an interesting problem...


================
Comment at: libomptarget/src/omptarget.cpp:723-726
@@ +722,6 @@
+  DeviceTy &Device = Devices[device_id];  if (!Device.IsInit) {
+    DP("uninit device: ignore");
+    return;
+  }
+
----------------
I think this assumption may be wrong: The standard defines that each device has an initial data environment (section 1.4.2).

Therefore a `#pragma omp target update` may be a first (and valid) statement which means that it has to be init here as well. Currently the library will in such a case return at this point and ignore the data transfer.


http://reviews.llvm.org/D14031





More information about the Openmp-commits mailing list