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

Jonas Hahnfeld via Openmp-commits openmp-commits at lists.llvm.org
Wed Jan 6 07:29:38 PST 2016


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