<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/openmp/libomptarget/test/offloading/struct_mapping_with_pointers.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[Offload] Move `/openmp/libomptarget` to `/offload` (#75125)</title>
<updated>2024-04-22T16:51:33+00:00</updated>
<author>
<name>Johannes Doerfert</name>
<email>johannes@jdoerfert.de</email>
</author>
<published>2024-04-22T16:51:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=330d8983d25d08580fc1642fea48b2473f47a9da'/>
<id>330d8983d25d08580fc1642fea48b2473f47a9da</id>
<content type='text'>
In a nutshell, this moves our libomptarget code to populate the offload
subproject.

With this commit, users need to enable the new LLVM/Offload subproject
as a runtime in their cmake configuration.
No further changes are expected for downstream code.

Tests and other components still depend on OpenMP and have also not been
renamed. The results below are for a build in which OpenMP and Offload
are enabled runtimes. In addition to the pure `git mv`, we needed to
adjust some CMake files. Nothing is intended to change semantics.

```
ninja check-offload
```
Works with the X86 and AMDGPU offload tests

```
ninja check-openmp
```
Still works but doesn't build offload tests anymore.

```
ls install/lib
```
Shows all expected libraries, incl.
- `libomptarget.devicertl.a`
- `libomptarget-nvptx-sm_90.bc`
- `libomptarget.rtl.amdgpu.so` -&gt; `libomptarget.rtl.amdgpu.so.18git`
- `libomptarget.so` -&gt; `libomptarget.so.18git`

Fixes: https://github.com/llvm/llvm-project/issues/75124

---------

Co-authored-by: Saiyedul Islam &lt;Saiyedul.Islam@amd.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In a nutshell, this moves our libomptarget code to populate the offload
subproject.

With this commit, users need to enable the new LLVM/Offload subproject
as a runtime in their cmake configuration.
No further changes are expected for downstream code.

Tests and other components still depend on OpenMP and have also not been
renamed. The results below are for a build in which OpenMP and Offload
are enabled runtimes. In addition to the pure `git mv`, we needed to
adjust some CMake files. Nothing is intended to change semantics.

```
ninja check-offload
```
Works with the X86 and AMDGPU offload tests

```
ninja check-openmp
```
Still works but doesn't build offload tests anymore.

```
ls install/lib
```
Shows all expected libraries, incl.
- `libomptarget.devicertl.a`
- `libomptarget-nvptx-sm_90.bc`
- `libomptarget.rtl.amdgpu.so` -&gt; `libomptarget.rtl.amdgpu.so.18git`
- `libomptarget.so` -&gt; `libomptarget.so.18git`

Fixes: https://github.com/llvm/llvm-project/issues/75124

---------

Co-authored-by: Saiyedul Islam &lt;Saiyedul.Islam@amd.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[OpenMP][libomptarget][Fix] Add missing array initialization (#76457)</title>
<updated>2023-12-27T17:58:41+00:00</updated>
<author>
<name>Gheorghe-Teodor Bercea</name>
<email>doru.bercea@amd.com</email>
</author>
<published>2023-12-27T17:58:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a01b58aef0e42fb1b52e358adf4c56678a884d37'/>
<id>a01b58aef0e42fb1b52e358adf4c56678a884d37</id>
<content type='text'>
Add missing array initialization as the array was not initialized and
the value zero was assumed.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add missing array initialization as the array was not initialized and
the value zero was assumed.</pre>
</div>
</content>
</entry>
<entry>
<title>[OpenMP][libomptarget][Fix] Disable test on NVIDIA platforms (#75949)</title>
<updated>2023-12-19T16:58:10+00:00</updated>
<author>
<name>Gheorghe-Teodor Bercea</name>
<email>doru.bercea@amd.com</email>
</author>
<published>2023-12-19T16:58:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=65909177e37ca2e3b821ea74c9876e7947b7be6f'/>
<id>65909177e37ca2e3b821ea74c9876e7947b7be6f</id>
<content type='text'>
The tests doesn't seem to work for NVIDIA so disabling it for now.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The tests doesn't seem to work for NVIDIA so disabling it for now.</pre>
</div>
</content>
</entry>
<entry>
<title>[OpenMP][libomptarget][Fix]Require presence of libomptarget-debug for newly added test (#75807)</title>
<updated>2023-12-18T15:07:52+00:00</updated>
<author>
<name>Gheorghe-Teodor Bercea</name>
<email>doru.bercea@amd.com</email>
</author>
<published>2023-12-18T15:07:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cd1038a46a337042da7685973332481eb9c37707'/>
<id>cd1038a46a337042da7685973332481eb9c37707</id>
<content type='text'>
Require presence of libomptarget-debug fixes https://github.com/llvm/llvm-project/pull/75642</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Require presence of libomptarget-debug fixes https://github.com/llvm/llvm-project/pull/75642</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang][OpenMP] Fix mapping of structs to device (#75642)</title>
<updated>2023-12-18T14:47:59+00:00</updated>
<author>
<name>Gheorghe-Teodor Bercea</name>
<email>doru.bercea@amd.com</email>
</author>
<published>2023-12-18T14:47:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4ef6587715bec4520332528c4a71fe5a9ac10477'/>
<id>4ef6587715bec4520332528c4a71fe5a9ac10477</id>
<content type='text'>
Fix mapping of structs to device.

The following example fails:

```
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;

struct Descriptor {
  int *datum;
  long int x;
  int xi;
  long int arr[1][30];
};

int main() {
  Descriptor dat = Descriptor();
  dat.datum = (int *)malloc(sizeof(int)*10);
  dat.xi = 3;
  dat.arr[0][0] = 1;

  #pragma omp target enter data map(to: dat.datum[:10]) map(to: dat)

  #pragma omp target
  {
    dat.xi = 4;
    dat.datum[dat.arr[0][0]] = dat.xi;
  }

  #pragma omp target exit data map(from: dat)

 return 0;
}
```

This is a rework of the previous attempt:
https://github.com/llvm/llvm-project/pull/72410</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix mapping of structs to device.

The following example fails:

```
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;

struct Descriptor {
  int *datum;
  long int x;
  int xi;
  long int arr[1][30];
};

int main() {
  Descriptor dat = Descriptor();
  dat.datum = (int *)malloc(sizeof(int)*10);
  dat.xi = 3;
  dat.arr[0][0] = 1;

  #pragma omp target enter data map(to: dat.datum[:10]) map(to: dat)

  #pragma omp target
  {
    dat.xi = 4;
    dat.datum[dat.arr[0][0]] = dat.xi;
  }

  #pragma omp target exit data map(from: dat)

 return 0;
}
```

This is a rework of the previous attempt:
https://github.com/llvm/llvm-project/pull/72410</pre>
</div>
</content>
</entry>
</feed>
