[PATCH] D137649: [Clang][OpenMP] Warn and discard write to host for const variable

2022-11-08 Thread Jan-Patrick Lehr via Phabricator via cfe-commits
jplehr created this revision.
Herald added subscribers: guansong, yaxunl.
Herald added a project: All.
jplehr requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: cfe-commits, sstefan1.
Herald added a project: clang.

Resolves a potential segmentation fault in target offload when a constant
variable is mapped as tofrom to the device but placed into constant
memory on the host.

Sema checks if targets of map from: or tofrom: are const-qualified and
warns.
CodeGen changes the map to to: for such variables to remove the write
back to host.
OpenMP Clarification: https://github.com/OpenMP/spec/issues/2158


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D137649

Files:
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/lib/CodeGen/CGOpenMPRuntime.cpp
  clang/lib/Sema/SemaOpenMP.cpp
  clang/test/OpenMP/distribute_firstprivate_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_reduction_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp
  clang/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp
  clang/test/OpenMP/distribute_simd_aligned_messages.cpp
  clang/test/OpenMP/distribute_simd_firstprivate_messages.cpp
  clang/test/OpenMP/distribute_simd_lastprivate_messages.cpp
  clang/test/OpenMP/distribute_simd_linear_messages.cpp
  clang/test/OpenMP/distribute_simd_reduction_messages.cpp
  clang/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp
  clang/test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp
  clang/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp
  clang/test/OpenMP/teams_distribute_simd_aligned_messages.cpp
  clang/test/OpenMP/teams_distribute_simd_linear_messages.cpp

Index: clang/test/OpenMP/teams_distribute_simd_linear_messages.cpp
===
--- clang/test/OpenMP/teams_distribute_simd_linear_messages.cpp
+++ clang/test/OpenMP/teams_distribute_simd_linear_messages.cpp
@@ -259,7 +259,7 @@
 
 
 #pragma omp target
-#pragma omp teams distribute simd linear (a, b) // expected-error {{incomplete type 'S1' where a complete type is required}} expected-error {{linear variable with incomplete type 'S1'}} expected-error {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
+#pragma omp teams distribute simd linear (a, b) // expected-error {{incomplete type 'S1' where a complete type is required}} expected-error {{linear variable with incomplete type 'S1'}} expected-error {{argument of a linear clause should be of integral or pointer type, not 'S2'}} expected-warning {{discarding implicit write to const-qualified variable 'b' from target map clause}}
   for (int k = 0; k < argc; ++k) ++k;
 
 #pragma omp target
Index: clang/test/OpenMP/teams_distribute_simd_aligned_messages.cpp
===
--- clang/test/OpenMP/teams_distribute_simd_aligned_messages.cpp
+++ clang/test/OpenMP/teams_distribute_simd_aligned_messages.cpp
@@ -254,7 +254,7 @@
   for (int k = 0; k < argc; ++k) ++k;
 
 #pragma omp target
-#pragma omp teams distribute simd aligned (a, b) // expected-error {{argument of aligned clause should be array, pointer, reference to array or reference to pointer, not 'S1'}} expected-error {{argument of aligned clause should be array, pointer, reference to array or reference to pointer, not 'S2'}} expected-error {{incomplete type 'S1' where a complete type is required}}
+#pragma omp teams distribute simd aligned (a, b) // expected-error {{argument of aligned clause should be array, pointer, reference to array or reference to pointer, not 'S1'}} expected-error {{argument of aligned clause should be array, pointer, reference to array or reference to pointer, not 'S2'}} expected-error {{incomplete type 'S1' where a complete type is required}} expected-warning {{discarding implicit write to const-qualified variable 'b' from target map clause}}
   for (int k = 0; k < argc; ++k) ++k;
 
 #pragma omp target
Index: clang/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp
===
--- clang/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp
+++ clang/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp
@@ -259,7 +259,7 @@
 
 
 #pragma omp target
-#pragma omp teams distribute parallel for simd linear (a, b) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{argument of a linear clause should be of integral or pointer type, not 'S2'}} expected-error {{incomplete type 'S1' where a complete type is required}}
+#pragma omp teams distribute parallel for simd linear (a, b) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{argument of a li

[PATCH] D155794: [OpenMP][OpenMPIRBuilder] Migrate setPropertyExecutionMode() from Clang to OpenMPIRBuilder.

2023-07-20 Thread Jan-Patrick Lehr via Phabricator via cfe-commits
jplehr added a comment.

Not an expert here, only some minor comments.




Comment at: clang/lib/CodeGen/CodeGenModule.h:1008
 
+  std::vector *getLLVMCompilerUsed() {
+return &LLVMCompilerUsed;

Return a reference instead of pointer here?



Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:1506
+  void
+  setPropertyExecutionMode(StringRef Name, bool Mode,
+   std::vector 
*LLVMCompilerUsed);

Rename to sth like `isSPMDMode` or so? To me `Mode` reads overly general.



Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:1507
+  setPropertyExecutionMode(StringRef Name, bool Mode,
+   std::vector 
*LLVMCompilerUsed);
+

Should this preferably be a reference instead of pointer?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155794/new/

https://reviews.llvm.org/D155794

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D155794: [OpenMP][OpenMPIRBuilder] Migrate setPropertyExecutionMode() from Clang to OpenMPIRBuilder.

2023-07-21 Thread Jan-Patrick Lehr via Phabricator via cfe-commits
jplehr added inline comments.



Comment at: clang/lib/CodeGen/CodeGenModule.h:1009
+  std::vector getLLVMCompilerUsed() {
+return static_cast &>(LLVMCompilerUsed);
+  }

I believe that this can be simplified to

```
std::vector &getLLVMCompilerUsed() {
  return LLVMCompilerUsed;
}
```



Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:1509
+  setPropertyExecutionMode(StringRef Name, bool isSPMDMode,
+   std::vector LLVMCompilerUsed);
+

```, bool IsSPMDMode, std::vector 
&LLVMCompilerUsed);```



Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:4905
+StringRef Name, bool isSPMDMode,
+std::vector LLVMCompilerUsed) {
+  auto *GVMode = new llvm::GlobalVariable(

```, std::vector &LLVMCompilerUsed) {



Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:4914
+  GVMode->setVisibility(llvm::GlobalVariable::ProtectedVisibility);
+  assert(!GVMode->isDeclaration() &&
+ "Only globals with definition can force usage.");

Can this assertion ever be not be met? I'm just curious, given that you create 
that `GVMode` yourself.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155794/new/

https://reviews.llvm.org/D155794

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D155776: [NFC] Add checks for self-assignment.

2023-07-24 Thread Jan-Patrick Lehr via Phabricator via cfe-commits
jplehr added a comment.

Hi,
it seems that this broke the AMDGPU OpenMP buildbot 
https://lab.llvm.org/buildbot/#/builders/193/builds/35271
Happy to help if you need more info etc.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155776/new/

https://reviews.llvm.org/D155776

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D153276: [clang][Interp] Reject reinterpret_cast expressions

2023-07-26 Thread Jan-Patrick Lehr via Phabricator via cfe-commits
jplehr added a comment.

Hi,
this seems to have broken the OpenMP AMDGPU buildbot 
(https://lab.llvm.org/buildbot/#/builders/193/builds/35471)
I'm happy to help if needed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153276/new/

https://reviews.llvm.org/D153276

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D153276: [clang][Interp] Reject reinterpret_cast expressions

2023-07-26 Thread Jan-Patrick Lehr via Phabricator via cfe-commits
jplehr added a comment.

Wow, thanks for the quick fix!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153276/new/

https://reviews.llvm.org/D153276

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D155794: [OpenMP][OpenMPIRBuilder] Migrate setPropertyExecutionMode() from Clang to OpenMPIRBuilder.

2023-07-26 Thread Jan-Patrick Lehr via Phabricator via cfe-commits
jplehr added inline comments.



Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:4914
+  GVMode->setVisibility(llvm::GlobalVariable::ProtectedVisibility);
+  assert(!GVMode->isDeclaration() &&
+ "Only globals with definition can force usage.");

raghavendhra wrote:
> jplehr wrote:
> > Can this assertion ever be not be met? I'm just curious, given that you 
> > create that `GVMode` yourself.
> Adopted this assert from Clang Codegen addCompilerUsedGlobal() which is 
> called inside setPropertyExecutionMode() in CGOpenMPRuntimeGPU.cpp
> 
> Actual definition of addCompilerusedGlobal() in CodeGenModule.cpp
> 
> void CodeGenModule::addCompilerUsedGlobal(llvm::GlobalValue *GV) {
>   assert(!GV->isDeclaration() &&
>  "Only globals with definition can force usage.");
>   LLVMCompilerUsed.emplace_back(GV);
> }
Sorry for the confusion I potentially created: I mainly wanted to understand if 
that case can ever happen.
I'm not really familiar with this part of the compiler.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155794/new/

https://reviews.llvm.org/D155794

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D154856: [MemProf] Use new option/pass for profile feedback and matching

2023-07-11 Thread Jan-Patrick Lehr via Phabricator via cfe-commits
jplehr added a comment.

The preparation patch (https://reviews.llvm.org/D154872) caused the AMD GPU 
OpenMP buildbot to fail.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154856/new/

https://reviews.llvm.org/D154856

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D136103: OpenMP asynchronous memory copy support

2023-03-28 Thread Jan-Patrick Lehr via Phabricator via cfe-commits
jplehr updated this revision to Diff 508955.
jplehr added a comment.
Herald added a subscriber: sunshaoce.

Rebase to make ready for land


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136103/new/

https://reviews.llvm.org/D136103

Files:
  openmp/libomptarget/include/interop.h
  openmp/libomptarget/src/api.cpp
  openmp/libomptarget/src/exports
  openmp/libomptarget/src/private.h
  openmp/libomptarget/test/api/omp_target_memcpy_async1.c
  openmp/libomptarget/test/api/omp_target_memcpy_async2.c
  openmp/libomptarget/test/api/omp_target_memcpy_rect_async1.c
  openmp/libomptarget/test/api/omp_target_memcpy_rect_async2.c

Index: openmp/libomptarget/test/api/omp_target_memcpy_rect_async2.c
===
--- /dev/null
+++ openmp/libomptarget/test/api/omp_target_memcpy_rect_async2.c
@@ -0,0 +1,89 @@
+// RUN: %libomptarget-compile-run-and-check-nvptx64-nvidia-cuda
+
+#include 
+#include 
+
+#define NUM_DIMS 3
+
+int main () {
+  int d = omp_get_default_device ();
+  int id = omp_get_initial_device ();
+  int a[128], b[64], c[128], e[16], q[128], i;
+  void *p;
+  
+  if (d < 0 || d >= omp_get_num_devices ())
+d = id;
+
+  p = omp_target_alloc (130 * sizeof (int), d);
+  if (p == NULL)
+return 0;
+  
+  for (i = 0; i < 128; i++)
+q[i] = 0;
+  if (omp_target_memcpy (p, q, 128 * sizeof (int), 0, 0, d, id) != 0)
+abort ();
+  
+  size_t volume[NUM_DIMS] = { 2, 2, 3 };
+  size_t dst_offsets[NUM_DIMS] = { 0, 0, 0 };
+  size_t src_offsets[NUM_DIMS] = { 0, 0, 0 };
+  size_t dst_dimensions[NUM_DIMS] = { 3, 4, 5 };
+  size_t src_dimensions[NUM_DIMS] = { 2, 3, 4 };
+  
+  for (i = 0; i < 128; i++)
+a[i] = 42;
+  for (i = 0; i < 64; i++)
+b[i] = 24;
+  for (i = 0; i < 128; i++)
+c[i] = 0;
+  for (i = 0; i < 16; i++)
+e[i] = 77;
+
+  omp_depend_t obj[2];
+  
+#pragma omp parallel num_threads(5)
+#pragma omp single
+  {
+#pragma omp task depend (out: p)
+omp_target_memcpy (p, a, 128 * sizeof (int), 0, 0, d, id);
+
+#pragma omp task depend(inout: p)
+omp_target_memcpy (p, b, 64 * sizeof (int), 0, 0, d, id);
+
+#pragma omp task depend(out: c)
+for (i = 0; i < 128; i++)
+  c[i] = i + 1;
+
+#pragma omp depobj(obj[0]) depend(inout: p)
+#pragma omp depobj(obj[1]) depend(in: c)
+
+/*  This produces: 1 2 3 - - 5 6 7 - - at positions 0..9 and
+	13 14 15 - - 17 18 19 - - at positions 20..29.  */
+omp_target_memcpy_rect_async (p, c, sizeof (int), NUM_DIMS, volume,
+  dst_offsets, src_offsets, dst_dimensions,
+  src_dimensions, d, id, 2, obj);
+
+#pragma omp task depend(in: p)
+omp_target_memcpy (p, e, 16 * sizeof (int), 0, 0, d, id);
+  }
+  
+#pragma omp taskwait
+  
+  if (omp_target_memcpy (q, p, 128 * sizeof(int), 0, 0, id, d) != 0)
+abort ();
+  
+  for (i = 0; i < 16; ++i)
+if (q[i] != 77)
+  abort ();
+  if (q[20] != 13 || q[21] != 14 || q[22] != 15 || q[25] != 17 || q[26] != 18
+  || q[27] != 19)
+abort ();
+  for (i = 28; i < 64; ++i)
+if (q[i] != 24)
+  abort ();
+  for (i = 64; i < 128; ++i)
+   if (q[i] != 42)
+ abort ();
+  
+  omp_target_free (p, d);
+  return 0;
+}
Index: openmp/libomptarget/test/api/omp_target_memcpy_rect_async1.c
===
--- /dev/null
+++ openmp/libomptarget/test/api/omp_target_memcpy_rect_async1.c
@@ -0,0 +1,66 @@
+// RUN: %libomptarget-compile-run-and-check-nvptx64-nvidia-cuda
+
+#include 
+#include 
+#include 
+
+#define NUM_DIMS 3
+
+int main() {
+  int d = omp_get_default_device ();
+  int id = omp_get_initial_device ();
+  int q[128], q2[128], i;
+  void *p;
+  
+  if (d < 0 || d >= omp_get_num_devices ())
+d = id;
+  
+  p = omp_target_alloc (130 * sizeof (int), d);
+  if (p == NULL)
+return 0;
+
+  if (omp_target_memcpy_rect_async (NULL, NULL, 0, 0, NULL, NULL, NULL, NULL,
+NULL, d, id, 0, NULL) < 3
+  || omp_target_memcpy_rect_async (NULL, NULL, 0, 0, NULL, NULL, NULL, NULL,
+   NULL, id, d, 0, NULL) < 3
+  || omp_target_memcpy_rect_async (NULL, NULL, 0, 0, NULL, NULL, NULL, NULL,
+   NULL, id, id, 0, NULL) < 3)
+abort ();
+ 
+  for (i = 0; i < 128; i++)
+q[i] = 0;
+  if (omp_target_memcpy (p, q, 128 * sizeof (int), 0, 0, d, id) != 0)
+abort ();
+  
+  for (i = 0; i < 128; i++)
+q[i] = i + 1;
+  
+  size_t volume[NUM_DIMS] = { 1, 2, 3 };
+  size_t dst_offsets[NUM_DIMS] = { 0, 0, 0 };
+  size_t src_offsets[NUM_DIMS] = { 0, 0, 0 };
+  size_t dst_dimensions[NUM_DIMS] = { 3, 4, 5 };
+  size_t src_dimensions[NUM_DIMS] = { 2, 3, 4 };
+  
+  if (omp_target_memcpy_rect_async (p, q, sizeof (int), NUM_DIMS, volume,
+dst_offsets, src_offsets, dst_dimensions,
+src_dimensions, d, id, 0, NULL) != 0)
+abort ();
+  
+#pragma omp taskwait
+  
+  for (i = 0; i < 128; i++)
+q2[i] = 0;
+  if (omp_target_memcpy (q2, p, 128 * sizeof (int), 0, 0, id, d) != 0)
+   

[PATCH] D136103: OpenMP asynchronous memory copy support

2023-03-28 Thread Jan-Patrick Lehr via Phabricator via cfe-commits
jplehr updated this revision to Diff 509023.
jplehr added a comment.

Rebased and enabled tests for generic devices.
Resulted in one test failure

Failed Tests (3):
libomptarget :: amdgcn-amd-amdhsa :: api/omp_target_memcpy_rect_async1.c
libomptarget :: x86_64-pc-linux-gnu :: api/omp_target_memcpy_rect_async1.c
libomptarget :: x86_64-pc-linux-gnu-LTO :: api/omp_target_memcpy_rect_async1.c#


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136103/new/

https://reviews.llvm.org/D136103

Files:
  openmp/libomptarget/include/interop.h
  openmp/libomptarget/src/api.cpp
  openmp/libomptarget/src/exports
  openmp/libomptarget/src/private.h
  openmp/libomptarget/test/api/omp_target_memcpy_async1.c
  openmp/libomptarget/test/api/omp_target_memcpy_async2.c
  openmp/libomptarget/test/api/omp_target_memcpy_rect_async1.c
  openmp/libomptarget/test/api/omp_target_memcpy_rect_async2.c

Index: openmp/libomptarget/test/api/omp_target_memcpy_rect_async2.c
===
--- /dev/null
+++ openmp/libomptarget/test/api/omp_target_memcpy_rect_async2.c
@@ -0,0 +1,89 @@
+// RUN: %libomptarget-compile-and-run-generic
+
+#include 
+#include 
+
+#define NUM_DIMS 3
+
+int main() {
+  int d = omp_get_default_device();
+  int id = omp_get_initial_device();
+  int a[128], b[64], c[128], e[16], q[128], i;
+  void *p;
+
+  if (d < 0 || d >= omp_get_num_devices())
+d = id;
+
+  p = omp_target_alloc(130 * sizeof(int), d);
+  if (p == NULL)
+return 0;
+
+  for (i = 0; i < 128; i++)
+q[i] = 0;
+  if (omp_target_memcpy(p, q, 128 * sizeof(int), 0, 0, d, id) != 0)
+abort();
+
+  size_t volume[NUM_DIMS] = {2, 2, 3};
+  size_t dst_offsets[NUM_DIMS] = {0, 0, 0};
+  size_t src_offsets[NUM_DIMS] = {0, 0, 0};
+  size_t dst_dimensions[NUM_DIMS] = {3, 4, 5};
+  size_t src_dimensions[NUM_DIMS] = {2, 3, 4};
+
+  for (i = 0; i < 128; i++)
+a[i] = 42;
+  for (i = 0; i < 64; i++)
+b[i] = 24;
+  for (i = 0; i < 128; i++)
+c[i] = 0;
+  for (i = 0; i < 16; i++)
+e[i] = 77;
+
+  omp_depend_t obj[2];
+
+#pragma omp parallel num_threads(5)
+#pragma omp single
+  {
+#pragma omp task depend(out : p)
+omp_target_memcpy(p, a, 128 * sizeof(int), 0, 0, d, id);
+
+#pragma omp task depend(inout : p)
+omp_target_memcpy(p, b, 64 * sizeof(int), 0, 0, d, id);
+
+#pragma omp task depend(out : c)
+for (i = 0; i < 128; i++)
+  c[i] = i + 1;
+
+#pragma omp depobj(obj[0]) depend(inout : p)
+#pragma omp depobj(obj[1]) depend(in : c)
+
+/*  This produces: 1 2 3 - - 5 6 7 - - at positions 0..9 and
+13 14 15 - - 17 18 19 - - at positions 20..29.  */
+omp_target_memcpy_rect_async(p, c, sizeof(int), NUM_DIMS, volume,
+ dst_offsets, src_offsets, dst_dimensions,
+ src_dimensions, d, id, 2, obj);
+
+#pragma omp task depend(in : p)
+omp_target_memcpy(p, e, 16 * sizeof(int), 0, 0, d, id);
+  }
+
+#pragma omp taskwait
+
+  if (omp_target_memcpy(q, p, 128 * sizeof(int), 0, 0, id, d) != 0)
+abort();
+
+  for (i = 0; i < 16; ++i)
+if (q[i] != 77)
+  abort();
+  if (q[20] != 13 || q[21] != 14 || q[22] != 15 || q[25] != 17 || q[26] != 18 ||
+  q[27] != 19)
+abort();
+  for (i = 28; i < 64; ++i)
+if (q[i] != 24)
+  abort();
+  for (i = 64; i < 128; ++i)
+if (q[i] != 42)
+  abort();
+
+  omp_target_free(p, d);
+  return 0;
+}
Index: openmp/libomptarget/test/api/omp_target_memcpy_rect_async1.c
===
--- /dev/null
+++ openmp/libomptarget/test/api/omp_target_memcpy_rect_async1.c
@@ -0,0 +1,66 @@
+// RUN: %libomptarget-compile-and-run-generic
+
+#include 
+#include 
+#include 
+
+#define NUM_DIMS 3
+
+int main() {
+  int d = omp_get_default_device();
+  int id = omp_get_initial_device();
+  int q[128], q2[128], i;
+  void *p;
+
+  if (d < 0 || d >= omp_get_num_devices())
+d = id;
+
+  p = omp_target_alloc(130 * sizeof(int), d);
+  if (p == NULL)
+return 0;
+
+  if (omp_target_memcpy_rect_async(NULL, NULL, 0, 0, NULL, NULL, NULL, NULL,
+   NULL, d, id, 0, NULL) < 3 ||
+  omp_target_memcpy_rect_async(NULL, NULL, 0, 0, NULL, NULL, NULL, NULL,
+   NULL, id, d, 0, NULL) < 3 ||
+  omp_target_memcpy_rect_async(NULL, NULL, 0, 0, NULL, NULL, NULL, NULL,
+   NULL, id, id, 0, NULL) < 3)
+abort();
+
+  for (i = 0; i < 128; i++)
+q[i] = 0;
+  if (omp_target_memcpy(p, q, 128 * sizeof(int), 0, 0, d, id) != 0)
+abort();
+
+  for (i = 0; i < 128; i++)
+q[i] = i + 1;
+
+  size_t volume[NUM_DIMS] = {1, 2, 3};
+  size_t dst_offsets[NUM_DIMS] = {0, 0, 0};
+  size_t src_offsets[NUM_DIMS] = {0, 0, 0};
+  size_t dst_dimensions[NUM_DIMS] = {3, 4, 5};
+  size_t src_dimensions[NUM_DIMS] = {2, 3, 4};
+
+  if (omp_target_memcpy_rect_async(p, q, sizeof(int), NUM_DIMS, volume,
+

[PATCH] D136103: OpenMP asynchronous memory copy support

2023-03-30 Thread Jan-Patrick Lehr via Phabricator via cfe-commits
jplehr updated this revision to Diff 509581.
jplehr added a comment.

Fix bug to corectly support the maximally supported dimensions as required by 
the spec.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136103/new/

https://reviews.llvm.org/D136103

Files:
  openmp/libomptarget/include/interop.h
  openmp/libomptarget/src/api.cpp
  openmp/libomptarget/src/exports
  openmp/libomptarget/src/private.h
  openmp/libomptarget/test/api/omp_target_memcpy_async1.c
  openmp/libomptarget/test/api/omp_target_memcpy_async2.c
  openmp/libomptarget/test/api/omp_target_memcpy_rect_async1.c
  openmp/libomptarget/test/api/omp_target_memcpy_rect_async2.c

Index: openmp/libomptarget/test/api/omp_target_memcpy_rect_async2.c
===
--- /dev/null
+++ openmp/libomptarget/test/api/omp_target_memcpy_rect_async2.c
@@ -0,0 +1,89 @@
+// RUN: %libomptarget-compile-and-run-generic
+
+#include 
+#include 
+
+#define NUM_DIMS 3
+
+int main() {
+  int d = omp_get_default_device();
+  int id = omp_get_initial_device();
+  int a[128], b[64], c[128], e[16], q[128], i;
+  void *p;
+
+  if (d < 0 || d >= omp_get_num_devices())
+d = id;
+
+  p = omp_target_alloc(130 * sizeof(int), d);
+  if (p == NULL)
+return 0;
+
+  for (i = 0; i < 128; i++)
+q[i] = 0;
+  if (omp_target_memcpy(p, q, 128 * sizeof(int), 0, 0, d, id) != 0)
+abort();
+
+  size_t volume[NUM_DIMS] = {2, 2, 3};
+  size_t dst_offsets[NUM_DIMS] = {0, 0, 0};
+  size_t src_offsets[NUM_DIMS] = {0, 0, 0};
+  size_t dst_dimensions[NUM_DIMS] = {3, 4, 5};
+  size_t src_dimensions[NUM_DIMS] = {2, 3, 4};
+
+  for (i = 0; i < 128; i++)
+a[i] = 42;
+  for (i = 0; i < 64; i++)
+b[i] = 24;
+  for (i = 0; i < 128; i++)
+c[i] = 0;
+  for (i = 0; i < 16; i++)
+e[i] = 77;
+
+  omp_depend_t obj[2];
+
+#pragma omp parallel num_threads(5)
+#pragma omp single
+  {
+#pragma omp task depend(out : p)
+omp_target_memcpy(p, a, 128 * sizeof(int), 0, 0, d, id);
+
+#pragma omp task depend(inout : p)
+omp_target_memcpy(p, b, 64 * sizeof(int), 0, 0, d, id);
+
+#pragma omp task depend(out : c)
+for (i = 0; i < 128; i++)
+  c[i] = i + 1;
+
+#pragma omp depobj(obj[0]) depend(inout : p)
+#pragma omp depobj(obj[1]) depend(in : c)
+
+/*  This produces: 1 2 3 - - 5 6 7 - - at positions 0..9 and
+13 14 15 - - 17 18 19 - - at positions 20..29.  */
+omp_target_memcpy_rect_async(p, c, sizeof(int), NUM_DIMS, volume,
+ dst_offsets, src_offsets, dst_dimensions,
+ src_dimensions, d, id, 2, obj);
+
+#pragma omp task depend(in : p)
+omp_target_memcpy(p, e, 16 * sizeof(int), 0, 0, d, id);
+  }
+
+#pragma omp taskwait
+
+  if (omp_target_memcpy(q, p, 128 * sizeof(int), 0, 0, id, d) != 0)
+abort();
+
+  for (i = 0; i < 16; ++i)
+if (q[i] != 77)
+  abort();
+  if (q[20] != 13 || q[21] != 14 || q[22] != 15 || q[25] != 17 || q[26] != 18 ||
+  q[27] != 19)
+abort();
+  for (i = 28; i < 64; ++i)
+if (q[i] != 24)
+  abort();
+  for (i = 64; i < 128; ++i)
+if (q[i] != 42)
+  abort();
+
+  omp_target_free(p, d);
+  return 0;
+}
Index: openmp/libomptarget/test/api/omp_target_memcpy_rect_async1.c
===
--- /dev/null
+++ openmp/libomptarget/test/api/omp_target_memcpy_rect_async1.c
@@ -0,0 +1,66 @@
+// RUN: %libomptarget-compile-and-run-generic
+
+#include 
+#include 
+#include 
+
+#define NUM_DIMS 3
+
+int main() {
+  int d = omp_get_default_device();
+  int id = omp_get_initial_device();
+  int q[128], q2[128], i;
+  void *p;
+
+  if (d < 0 || d >= omp_get_num_devices())
+d = id;
+
+  p = omp_target_alloc(130 * sizeof(int), d);
+  if (p == NULL)
+return 0;
+
+  if (omp_target_memcpy_rect_async(NULL, NULL, 0, 0, NULL, NULL, NULL, NULL,
+   NULL, d, id, 0, NULL) < 3 ||
+  omp_target_memcpy_rect_async(NULL, NULL, 0, 0, NULL, NULL, NULL, NULL,
+   NULL, id, d, 0, NULL) < 3 ||
+  omp_target_memcpy_rect_async(NULL, NULL, 0, 0, NULL, NULL, NULL, NULL,
+   NULL, id, id, 0, NULL) < 3)
+abort();
+
+  for (i = 0; i < 128; i++)
+q[i] = 0;
+  if (omp_target_memcpy(p, q, 128 * sizeof(int), 0, 0, d, id) != 0)
+abort();
+
+  for (i = 0; i < 128; i++)
+q[i] = i + 1;
+
+  size_t volume[NUM_DIMS] = {1, 2, 3};
+  size_t dst_offsets[NUM_DIMS] = {0, 0, 0};
+  size_t src_offsets[NUM_DIMS] = {0, 0, 0};
+  size_t dst_dimensions[NUM_DIMS] = {3, 4, 5};
+  size_t src_dimensions[NUM_DIMS] = {2, 3, 4};
+
+  if (omp_target_memcpy_rect_async(p, q, sizeof(int), NUM_DIMS, volume,
+   dst_offsets, src_offsets, dst_dimensions,
+   src_dimensions, d, id, 0, NULL) != 0)
+abort();
+
+#pragma omp taskwait
+
+  for (i = 0; i < 128; i++)
+q2[i] = 0;
+  if 

[PATCH] D136103: OpenMP asynchronous memory copy support

2023-03-30 Thread Jan-Patrick Lehr via Phabricator via cfe-commits
jplehr updated this revision to Diff 509583.
jplehr added a comment.

Removed accidentally added code


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136103/new/

https://reviews.llvm.org/D136103

Files:
  openmp/libomptarget/include/interop.h
  openmp/libomptarget/src/api.cpp
  openmp/libomptarget/src/exports
  openmp/libomptarget/src/private.h
  openmp/libomptarget/test/api/omp_target_memcpy_async1.c
  openmp/libomptarget/test/api/omp_target_memcpy_async2.c
  openmp/libomptarget/test/api/omp_target_memcpy_rect_async1.c
  openmp/libomptarget/test/api/omp_target_memcpy_rect_async2.c

Index: openmp/libomptarget/test/api/omp_target_memcpy_rect_async2.c
===
--- /dev/null
+++ openmp/libomptarget/test/api/omp_target_memcpy_rect_async2.c
@@ -0,0 +1,89 @@
+// RUN: %libomptarget-compile-and-run-generic
+
+#include 
+#include 
+
+#define NUM_DIMS 3
+
+int main() {
+  int d = omp_get_default_device();
+  int id = omp_get_initial_device();
+  int a[128], b[64], c[128], e[16], q[128], i;
+  void *p;
+
+  if (d < 0 || d >= omp_get_num_devices())
+d = id;
+
+  p = omp_target_alloc(130 * sizeof(int), d);
+  if (p == NULL)
+return 0;
+
+  for (i = 0; i < 128; i++)
+q[i] = 0;
+  if (omp_target_memcpy(p, q, 128 * sizeof(int), 0, 0, d, id) != 0)
+abort();
+
+  size_t volume[NUM_DIMS] = {2, 2, 3};
+  size_t dst_offsets[NUM_DIMS] = {0, 0, 0};
+  size_t src_offsets[NUM_DIMS] = {0, 0, 0};
+  size_t dst_dimensions[NUM_DIMS] = {3, 4, 5};
+  size_t src_dimensions[NUM_DIMS] = {2, 3, 4};
+
+  for (i = 0; i < 128; i++)
+a[i] = 42;
+  for (i = 0; i < 64; i++)
+b[i] = 24;
+  for (i = 0; i < 128; i++)
+c[i] = 0;
+  for (i = 0; i < 16; i++)
+e[i] = 77;
+
+  omp_depend_t obj[2];
+
+#pragma omp parallel num_threads(5)
+#pragma omp single
+  {
+#pragma omp task depend(out : p)
+omp_target_memcpy(p, a, 128 * sizeof(int), 0, 0, d, id);
+
+#pragma omp task depend(inout : p)
+omp_target_memcpy(p, b, 64 * sizeof(int), 0, 0, d, id);
+
+#pragma omp task depend(out : c)
+for (i = 0; i < 128; i++)
+  c[i] = i + 1;
+
+#pragma omp depobj(obj[0]) depend(inout : p)
+#pragma omp depobj(obj[1]) depend(in : c)
+
+/*  This produces: 1 2 3 - - 5 6 7 - - at positions 0..9 and
+13 14 15 - - 17 18 19 - - at positions 20..29.  */
+omp_target_memcpy_rect_async(p, c, sizeof(int), NUM_DIMS, volume,
+ dst_offsets, src_offsets, dst_dimensions,
+ src_dimensions, d, id, 2, obj);
+
+#pragma omp task depend(in : p)
+omp_target_memcpy(p, e, 16 * sizeof(int), 0, 0, d, id);
+  }
+
+#pragma omp taskwait
+
+  if (omp_target_memcpy(q, p, 128 * sizeof(int), 0, 0, id, d) != 0)
+abort();
+
+  for (i = 0; i < 16; ++i)
+if (q[i] != 77)
+  abort();
+  if (q[20] != 13 || q[21] != 14 || q[22] != 15 || q[25] != 17 || q[26] != 18 ||
+  q[27] != 19)
+abort();
+  for (i = 28; i < 64; ++i)
+if (q[i] != 24)
+  abort();
+  for (i = 64; i < 128; ++i)
+if (q[i] != 42)
+  abort();
+
+  omp_target_free(p, d);
+  return 0;
+}
Index: openmp/libomptarget/test/api/omp_target_memcpy_rect_async1.c
===
--- /dev/null
+++ openmp/libomptarget/test/api/omp_target_memcpy_rect_async1.c
@@ -0,0 +1,66 @@
+// RUN: %libomptarget-compile-and-run-generic
+
+#include 
+#include 
+#include 
+
+#define NUM_DIMS 3
+
+int main() {
+  int d = omp_get_default_device();
+  int id = omp_get_initial_device();
+  int q[128], q2[128], i;
+  void *p;
+
+  if (d < 0 || d >= omp_get_num_devices())
+d = id;
+
+  p = omp_target_alloc(130 * sizeof(int), d);
+  if (p == NULL)
+return 0;
+
+  if (omp_target_memcpy_rect_async(NULL, NULL, 0, 0, NULL, NULL, NULL, NULL,
+   NULL, d, id, 0, NULL) < 3 ||
+  omp_target_memcpy_rect_async(NULL, NULL, 0, 0, NULL, NULL, NULL, NULL,
+   NULL, id, d, 0, NULL) < 3 ||
+  omp_target_memcpy_rect_async(NULL, NULL, 0, 0, NULL, NULL, NULL, NULL,
+   NULL, id, id, 0, NULL) < 3)
+abort();
+
+  for (i = 0; i < 128; i++)
+q[i] = 0;
+  if (omp_target_memcpy(p, q, 128 * sizeof(int), 0, 0, d, id) != 0)
+abort();
+
+  for (i = 0; i < 128; i++)
+q[i] = i + 1;
+
+  size_t volume[NUM_DIMS] = {1, 2, 3};
+  size_t dst_offsets[NUM_DIMS] = {0, 0, 0};
+  size_t src_offsets[NUM_DIMS] = {0, 0, 0};
+  size_t dst_dimensions[NUM_DIMS] = {3, 4, 5};
+  size_t src_dimensions[NUM_DIMS] = {2, 3, 4};
+
+  if (omp_target_memcpy_rect_async(p, q, sizeof(int), NUM_DIMS, volume,
+   dst_offsets, src_offsets, dst_dimensions,
+   src_dimensions, d, id, 0, NULL) != 0)
+abort();
+
+#pragma omp taskwait
+
+  for (i = 0; i < 128; i++)
+q2[i] = 0;
+  if (omp_target_memcpy(q2, p, 128 * sizeof(int), 0, 0, id, d)

[PATCH] D136103: OpenMP asynchronous memory copy support

2023-03-30 Thread Jan-Patrick Lehr via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4753a4e31169: [OpenMP] asynchronous memory copy support 
(authored by jz10, committed by jplehr).

Changed prior to commit:
  https://reviews.llvm.org/D136103?vs=509583&id=509775#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136103/new/

https://reviews.llvm.org/D136103

Files:
  openmp/libomptarget/include/interop.h
  openmp/libomptarget/src/api.cpp
  openmp/libomptarget/src/exports
  openmp/libomptarget/src/private.h
  openmp/libomptarget/test/api/omp_target_memcpy_async1.c
  openmp/libomptarget/test/api/omp_target_memcpy_async2.c
  openmp/libomptarget/test/api/omp_target_memcpy_rect_async1.c
  openmp/libomptarget/test/api/omp_target_memcpy_rect_async2.c

Index: openmp/libomptarget/test/api/omp_target_memcpy_rect_async2.c
===
--- /dev/null
+++ openmp/libomptarget/test/api/omp_target_memcpy_rect_async2.c
@@ -0,0 +1,89 @@
+// RUN: %libomptarget-compile-and-run-generic
+
+#include 
+#include 
+
+#define NUM_DIMS 3
+
+int main() {
+  int d = omp_get_default_device();
+  int id = omp_get_initial_device();
+  int a[128], b[64], c[128], e[16], q[128], i;
+  void *p;
+
+  if (d < 0 || d >= omp_get_num_devices())
+d = id;
+
+  p = omp_target_alloc(130 * sizeof(int), d);
+  if (p == NULL)
+return 0;
+
+  for (i = 0; i < 128; i++)
+q[i] = 0;
+  if (omp_target_memcpy(p, q, 128 * sizeof(int), 0, 0, d, id) != 0)
+abort();
+
+  size_t volume[NUM_DIMS] = {2, 2, 3};
+  size_t dst_offsets[NUM_DIMS] = {0, 0, 0};
+  size_t src_offsets[NUM_DIMS] = {0, 0, 0};
+  size_t dst_dimensions[NUM_DIMS] = {3, 4, 5};
+  size_t src_dimensions[NUM_DIMS] = {2, 3, 4};
+
+  for (i = 0; i < 128; i++)
+a[i] = 42;
+  for (i = 0; i < 64; i++)
+b[i] = 24;
+  for (i = 0; i < 128; i++)
+c[i] = 0;
+  for (i = 0; i < 16; i++)
+e[i] = 77;
+
+  omp_depend_t obj[2];
+
+#pragma omp parallel num_threads(5)
+#pragma omp single
+  {
+#pragma omp task depend(out : p)
+omp_target_memcpy(p, a, 128 * sizeof(int), 0, 0, d, id);
+
+#pragma omp task depend(inout : p)
+omp_target_memcpy(p, b, 64 * sizeof(int), 0, 0, d, id);
+
+#pragma omp task depend(out : c)
+for (i = 0; i < 128; i++)
+  c[i] = i + 1;
+
+#pragma omp depobj(obj[0]) depend(inout : p)
+#pragma omp depobj(obj[1]) depend(in : c)
+
+/*  This produces: 1 2 3 - - 5 6 7 - - at positions 0..9 and
+13 14 15 - - 17 18 19 - - at positions 20..29.  */
+omp_target_memcpy_rect_async(p, c, sizeof(int), NUM_DIMS, volume,
+ dst_offsets, src_offsets, dst_dimensions,
+ src_dimensions, d, id, 2, obj);
+
+#pragma omp task depend(in : p)
+omp_target_memcpy(p, e, 16 * sizeof(int), 0, 0, d, id);
+  }
+
+#pragma omp taskwait
+
+  if (omp_target_memcpy(q, p, 128 * sizeof(int), 0, 0, id, d) != 0)
+abort();
+
+  for (i = 0; i < 16; ++i)
+if (q[i] != 77)
+  abort();
+  if (q[20] != 13 || q[21] != 14 || q[22] != 15 || q[25] != 17 || q[26] != 18 ||
+  q[27] != 19)
+abort();
+  for (i = 28; i < 64; ++i)
+if (q[i] != 24)
+  abort();
+  for (i = 64; i < 128; ++i)
+if (q[i] != 42)
+  abort();
+
+  omp_target_free(p, d);
+  return 0;
+}
Index: openmp/libomptarget/test/api/omp_target_memcpy_rect_async1.c
===
--- /dev/null
+++ openmp/libomptarget/test/api/omp_target_memcpy_rect_async1.c
@@ -0,0 +1,66 @@
+// RUN: %libomptarget-compile-and-run-generic
+
+#include 
+#include 
+#include 
+
+#define NUM_DIMS 3
+
+int main() {
+  int d = omp_get_default_device();
+  int id = omp_get_initial_device();
+  int q[128], q2[128], i;
+  void *p;
+
+  if (d < 0 || d >= omp_get_num_devices())
+d = id;
+
+  p = omp_target_alloc(130 * sizeof(int), d);
+  if (p == NULL)
+return 0;
+
+  if (omp_target_memcpy_rect_async(NULL, NULL, 0, 0, NULL, NULL, NULL, NULL,
+   NULL, d, id, 0, NULL) < 3 ||
+  omp_target_memcpy_rect_async(NULL, NULL, 0, 0, NULL, NULL, NULL, NULL,
+   NULL, id, d, 0, NULL) < 3 ||
+  omp_target_memcpy_rect_async(NULL, NULL, 0, 0, NULL, NULL, NULL, NULL,
+   NULL, id, id, 0, NULL) < 3)
+abort();
+
+  for (i = 0; i < 128; i++)
+q[i] = 0;
+  if (omp_target_memcpy(p, q, 128 * sizeof(int), 0, 0, d, id) != 0)
+abort();
+
+  for (i = 0; i < 128; i++)
+q[i] = i + 1;
+
+  size_t volume[NUM_DIMS] = {1, 2, 3};
+  size_t dst_offsets[NUM_DIMS] = {0, 0, 0};
+  size_t src_offsets[NUM_DIMS] = {0, 0, 0};
+  size_t dst_dimensions[NUM_DIMS] = {3, 4, 5};
+  size_t src_dimensions[NUM_DIMS] = {2, 3, 4};
+
+  if (omp_target_memcpy_rect_async(p, q, sizeof(int), NUM_DIMS, volume,
+   dst_offsets, src_offsets, dst_dimensions,
+   src_dimension

[PATCH] D140722: [OpenMP] Prefix outlined and reduction func names with original func's name

2023-03-31 Thread Jan-Patrick Lehr via Phabricator via cfe-commits
jplehr added a comment.

In D140722#4219182 , 
@nextsilicon-itay-bookstein wrote:

> Minor fix to the clang/CodeGen/ppc64le-varargs-f128.c test.
>
> @jdoerfert Does the PR CI run these, or are there build bots that cover the 
> different target-offloading variants? Can I somehow check this prior to 
> merging without having all hardware variants on-hand?

There is a buildbot for AMDGPU and the x86 fallback. Not sure about the status 
of the NVPTX openmp offloading buildbot.
What hardware do you have access to? I could potentially give it a try on 
AMDGPU prior to merging.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140722/new/

https://reviews.llvm.org/D140722

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D140722: [OpenMP] Prefix outlined and reduction func names with original func's name

2023-04-17 Thread Jan-Patrick Lehr via Phabricator via cfe-commits
jplehr added a comment.

I'll get back to this soon, enjoyed vacation. ;)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140722/new/

https://reviews.llvm.org/D140722

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D150860: [OpenMP] Change clang emitTargetDataCalls to use OMPIRBuilder

2023-06-01 Thread Jan-Patrick Lehr via Phabricator via cfe-commits
jplehr added inline comments.



Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:10412
+  CGF.Builder.GetInsertPoint());
+  llvm::OpenMPIRBuilder::LocationDescription ompLoc(CodeGenIP);
 

capitalize here?



Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:10424
+  llvm::Value *IfCondVal = nullptr;
+  bool CondConstant;
+  if (IfCond) {

I think this can (and should be?) moved into the if in the following line as it 
is not used outside that scope


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150860/new/

https://reviews.llvm.org/D150860

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D140722: [OpenMP] Prefix outlined and reduction func names with original func's name

2023-04-18 Thread Jan-Patrick Lehr via Phabricator via cfe-commits
jplehr added a comment.

Tested on AMDGPU (gfx90a)

  -- OpenMP tools dir in libomptarget: 
/home/janplehr/git/trunk17.0/build/llvm-project/runtimes/runtimes-bins/openmp/runtime/src
  -- LIBOMPTARGET: Building offloading runtime library libomptarget.
  -- LIBOMPTARGET: Not building aarch64 offloading plugin: machine not found in 
the system.
  -- LIBOMPTARGET: Building AMDGPU plugin linked against libhsa
  -- LIBOMPTARGET: Not building CUDA offloading plugin: 
LIBOMPTARGET_BUILD_CUDA_PLUGIN is false
  -- LIBOMPTARGET: Not building PPC64 offloading plugin: machine not found in 
the system.
  -- LIBOMPTARGET: Not building PPC64le offloading plugin: machine not found in 
the system.
  -- LIBOMPTARGET: Not building nec-aurora plugin: libveo or libveosinfo not 
found.
  -- LIBOMPTARGET: Building x86_64 offloading plugin.
  -- LIBOMPTARGET: Not building aarch64 NextGen offloading plugin: machine not 
found in the system.
  -- LIBOMPTARGET: Building AMDGPU NextGen plugin linked against libhsa
  -- LIBOMPTARGET: Not building CUDA NextGen offloading plugin: 
LIBOMPTARGET_BUILD_CUDA_PLUGIN is false
  -- LIBOMPTARGET: Not building PPC64 NextGen offloading plugin: machine not 
found in the system.
  -- LIBOMPTARGET: Not building PPC64le NextGen offloading plugin: machine not 
found in the system.
  -- LIBOMPTARGET: Building x86_64 NextGen offloading plugin.

**Before**
Testing Time: 44.63s

  Unsupported: 123
  Passed : 657

**After**
Testing Time: 38.74s

  Unsupported: 123
  Passed : 657


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140722/new/

https://reviews.llvm.org/D140722

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D145441: [AMDGPU] Define data layout entries for buffers

2023-05-03 Thread Jan-Patrick Lehr via Phabricator via cfe-commits
jplehr added a comment.

Hey Krzysztof,
I believe this broke the openmp offload buildbot 
https://lab.llvm.org/buildbot/#/builders/193/builds/30576


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145441/new/

https://reviews.llvm.org/D145441

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D137649: [Clang][OpenMP] Warn and discard write to host for const variable

2022-12-12 Thread Jan-Patrick Lehr via Phabricator via cfe-commits
jplehr planned changes to this revision.
jplehr added a comment.

We had another clarifying example on the github issue, which currently is not 
correctly covered by this patch. I'm currently reworking.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137649/new/

https://reviews.llvm.org/D137649

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits