<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/offload/test/offloading, branch users/nico/python-2</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>[libomptarget] Add a test for OMP_TARGET_OFFLOAD=disabled (#146385)</title>
<updated>2025-06-30T18:29:36+00:00</updated>
<author>
<name>Ye Luo</name>
<email>yeluo@anl.gov</email>
</author>
<published>2025-06-30T18:29:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=536ba87726d8dea862d964678dbb761ca32e21fb'/>
<id>536ba87726d8dea862d964678dbb761ca32e21fb</id>
<content type='text'>
closes https://github.com/llvm/llvm-project/issues/144786</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
closes https://github.com/llvm/llvm-project/issues/144786</pre>
</div>
</content>
</entry>
<entry>
<title>[Offload][PGO] Fix new GPU PGO tests (#143645)</title>
<updated>2025-06-12T16:14:21+00:00</updated>
<author>
<name>Ethan Luis McDonough</name>
<email>ethanluismcdonough@gmail.com</email>
</author>
<published>2025-06-12T16:14:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=daee5eee8562d26d234f85152e803b6571b15ee2'/>
<id>daee5eee8562d26d234f85152e803b6571b15ee2</id>
<content type='text'>
`pgo_atomic_teams.c` and `pgo_atomic_threads.c` currently are set to run
on NVPTX despite the changes for that target not being upstreamed yet.
This patch also replaces instances of `llvm-profdata` with `%profdata`
in those tests.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`pgo_atomic_teams.c` and `pgo_atomic_threads.c` currently are set to run
on NVPTX despite the changes for that target not being upstreamed yet.
This patch also replaces instances of `llvm-profdata` with `%profdata`
in those tests.</pre>
</div>
</content>
</entry>
<entry>
<title>[OpenMP][GPU][FIX] Enable generic barriers in single threaded contexts (#140786)</title>
<updated>2025-05-21T02:33:54+00:00</updated>
<author>
<name>Johannes Doerfert</name>
<email>johannes@jdoerfert.de</email>
</author>
<published>2025-05-21T02:33:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=57a90edacdf4ef14c6a95531681e8218cd23c4ab'/>
<id>57a90edacdf4ef14c6a95531681e8218cd23c4ab</id>
<content type='text'>
The generic GPU barrier implementation checked if it was the main thread
in generic mode to identify single threaded regions. This doesn't work
since inside of a non-active (=sequential) parallel, that thread becomes
the main thread of a team, and is not the main thread in generic mode.
At least that is the implementation of the APIs today.

To identify single threaded regions we now check the team size
explicitly.

This exposed three other issues; one is, for now, expected and not a
bug, the second one is a bug and has a FIXME in the
single_threaded_for_barrier_hang_1.c file, and the final one is also
benign as described in the end.

The non-bug issue comes up if we ever initialize a thread state.
Afterwards we will never run any region in parallel. This is a little
conservative, but I guess thread states are really bad for performance
anyway.

The bug comes up if we optimize single_threaded_for_barrier_hang_1 and
execute it in Generic-SPMD mode. For some reason we loose all the
updates to b. This looks very much like a compiler bug, but could also
be another logic issue in the runtime. Needs to be investigated.

Issue number 3 comes up if we have nested parallels inside of a target
region. The clang SPMD-check logic gets confused, determines SPMD (which
is fine) but picks an unreasonable thread count. This is all benign, I
think, just weird:

```
  #pragma omp target teams
  #pragma omp parallel num_threads(64)
  #pragma omp parallel num_threads(10)
  {}
```
Was launched with 10 threads, not 64.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The generic GPU barrier implementation checked if it was the main thread
in generic mode to identify single threaded regions. This doesn't work
since inside of a non-active (=sequential) parallel, that thread becomes
the main thread of a team, and is not the main thread in generic mode.
At least that is the implementation of the APIs today.

To identify single threaded regions we now check the team size
explicitly.

This exposed three other issues; one is, for now, expected and not a
bug, the second one is a bug and has a FIXME in the
single_threaded_for_barrier_hang_1.c file, and the final one is also
benign as described in the end.

The non-bug issue comes up if we ever initialize a thread state.
Afterwards we will never run any region in parallel. This is a little
conservative, but I guess thread states are really bad for performance
anyway.

The bug comes up if we optimize single_threaded_for_barrier_hang_1 and
execute it in Generic-SPMD mode. For some reason we loose all the
updates to b. This looks very much like a compiler bug, but could also
be another logic issue in the runtime. Needs to be investigated.

Issue number 3 comes up if we have nested parallels inside of a target
region. The clang SPMD-check logic gets confused, determines SPMD (which
is fine) but picks an unreasonable thread count. This is all benign, I
think, just weird:

```
  #pragma omp target teams
  #pragma omp parallel num_threads(64)
  #pragma omp parallel num_threads(10)
  {}
```
Was launched with 10 threads, not 64.</pre>
</div>
</content>
</entry>
<entry>
<title>[PGO][Offload] Update PGO GPU tests (#132262)</title>
<updated>2025-05-14T22:17:52+00:00</updated>
<author>
<name>Ethan Luis McDonough</name>
<email>ethanluismcdonough@gmail.com</email>
</author>
<published>2025-05-14T22:17:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1043810769a5efcbf5d1f468dc48ddcc289c5b32'/>
<id>1043810769a5efcbf5d1f468dc48ddcc289c5b32</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Flang][OpenMP] Initial defaultmap implementation (#135226)</title>
<updated>2025-05-12T14:30:43+00:00</updated>
<author>
<name>agozillon</name>
<email>Andrew.Gozillon@amd.com</email>
</author>
<published>2025-05-12T14:30:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f687ed9ff717372a7c751a3bf4ef7e33eb481fd6'/>
<id>f687ed9ff717372a7c751a3bf4ef7e33eb481fd6</id>
<content type='text'>
This aims to implement most of the initial arguments for defaultmap
aside from firstprivate and none, and some of the more recent OpenMP 6
additions which will come in subsequent updates (with the OpenMP 6
variants needing parsing/semantic support first).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This aims to implement most of the initial arguments for defaultmap
aside from firstprivate and none, and some of the more recent OpenMP 6
additions which will come in subsequent updates (with the OpenMP 6
variants needing parsing/semantic support first).</pre>
</div>
</content>
</entry>
<entry>
<title>[Flang][OpenMP] Generate correct present checks for implicit maps of optional allocatables (#138210)</title>
<updated>2025-05-09T11:57:45+00:00</updated>
<author>
<name>agozillon</name>
<email>Andrew.Gozillon@amd.com</email>
</author>
<published>2025-05-09T11:57:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b291cfcad4815568dc1eaca58185d25dceed3f1c'/>
<id>b291cfcad4815568dc1eaca58185d25dceed3f1c</id>
<content type='text'>
Currently, we do not generate the appropriate checks to check if an
optional
allocatable argument is present before accessing relevant components of
it,
in particular when creating bounds, we must generate a presence check
and we
must make sure we do not generate/keep an load external to the presence
check
by utilising the raw address rather than the regular address of the info
data structure.

Similarly in cases for optional allocatables we must treat them like
non-allocatable
arguments and generate an intermediate allocation that we can have as a
location
in memory that we can access later in the lowering without causing
segfaults when
we perform "mapping" on it, even if the end result is an empty
allocatable
(basically, we shouldn't explode if someone tries to map a non-present
optional,
similar to C++ when mapping null data).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, we do not generate the appropriate checks to check if an
optional
allocatable argument is present before accessing relevant components of
it,
in particular when creating bounds, we must generate a presence check
and we
must make sure we do not generate/keep an load external to the presence
check
by utilising the raw address rather than the regular address of the info
data structure.

Similarly in cases for optional allocatables we must treat them like
non-allocatable
arguments and generate an intermediate allocation that we can have as a
location
in memory that we can access later in the lowering without causing
segfaults when
we perform "mapping" on it, even if the end result is an empty
allocatable
(basically, we shouldn't explode if someone tries to map a non-present
optional,
similar to C++ when mapping null data).</pre>
</div>
</content>
</entry>
<entry>
<title>[Offload] Fix handling of 'bare' mode when environment missing (#136794)</title>
<updated>2025-04-23T13:16:39+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2025-04-23T13:16:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=92bba68634ec48c738d45bc86b05b1390aa82f4b'/>
<id>92bba68634ec48c738d45bc86b05b1390aa82f4b</id>
<content type='text'>
Summary:
We treated the missing kernel environment as a unique mode, but it was
kind of this random bool that was doing the same thing and it explicitly
expects the kernel environment to be zero. It broke after the previous
change since it used to default to SPMD and didn't handle zero in any of
the other cases despite being used. This fixes that and queries for it
without needing to consume an error.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
We treated the missing kernel environment as a unique mode, but it was
kind of this random bool that was doing the same thing and it explicitly
expects the kernel environment to be zero. It broke after the previous
change since it used to default to SPMD and didn't handle zero in any of
the other cases despite being used. This fixes that and queries for it
without needing to consume an error.</pre>
</div>
</content>
</entry>
<entry>
<title>[Flang][OpenMP][MLIR] Check for presence of Box type before emitting store in MapInfoFinalization pass (#135477)</title>
<updated>2025-04-14T15:15:56+00:00</updated>
<author>
<name>agozillon</name>
<email>Andrew.Gozillon@amd.com</email>
</author>
<published>2025-04-14T15:15:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b2c9a58b8f28b353b3f0b4ef98fa704c463ba1a4'/>
<id>b2c9a58b8f28b353b3f0b4ef98fa704c463ba1a4</id>
<content type='text'>
Currently we don't check for the presence of descriptor/BoxTypes before
emitting stores which lower to memcpys, the issue with this is that
users can have optional arguments, where they don't provide an input,
making the argument effectively null. This can still be mapped and this
causes issues at the moment as we'll emit a memcpy for function
arguments to store to a local variable for certain edge cases, when we
perform this memcpy on a null input, we cause a segfault at runtime.

The fix to this is to simply create a branch around the store that
checks if the data we're copying from is actually present. If it is, we
proceed with the store, if it isn't we skip it.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently we don't check for the presence of descriptor/BoxTypes before
emitting stores which lower to memcpys, the issue with this is that
users can have optional arguments, where they don't provide an input,
making the argument effectively null. This can still be mapped and this
causes issues at the moment as we'll emit a memcpy for function
arguments to store to a local variable for certain edge cases, when we
perform this memcpy on a null input, we cause a segfault at runtime.

The fix to this is to simply create a branch around the store that
checks if the data we're copying from is actually present. If it is, we
proceed with the store, if it isn't we skip it.</pre>
</div>
</content>
</entry>
<entry>
<title>[PGO][Offload] Use %profdata in PGO tests (#135015)</title>
<updated>2025-04-09T14:40:46+00:00</updated>
<author>
<name>Joel E. Denny</name>
<email>jdenny.ornl@gmail.com</email>
</author>
<published>2025-04-09T14:40:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ad9f6d3ceef676093add49ed7e530171fd9b72d6'/>
<id>ad9f6d3ceef676093add49ed7e530171fd9b72d6</id>
<content type='text'>
So that the wrong llvm-profdata is not picked up from PATH.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
So that the wrong llvm-profdata is not picked up from PATH.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][OpenMP] Add codegen for teams reductions (#133310)</title>
<updated>2025-04-07T16:47:16+00:00</updated>
<author>
<name>Jan Leyonberg</name>
<email>jan_sjodin@yahoo.com</email>
</author>
<published>2025-04-07T16:47:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fbc8335311b27d73fb685d5ebfb702f7acf134d2'/>
<id>fbc8335311b27d73fb685d5ebfb702f7acf134d2</id>
<content type='text'>
This patch adds the lowering of teams reductions from the omp dialect to
LLVM-IR. Some minor cleanup was done in clang to remove an unused
parameter.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds the lowering of teams reductions from the omp dialect to
LLVM-IR. Some minor cleanup was done in clang to remove an unused
parameter.</pre>
</div>
</content>
</entry>
</feed>
