9 Commits

Author SHA1 Message Date
Johannes Doerfert
2e7f47d4a8
[OpenMP][NFC] Move out plugin API and APITypes into standalone headers (#73868) 2023-11-29 16:04:19 -08:00
Johannes Doerfert
9c33bf62a7 [OpenMP][NFC] Remove unused (un)register_lib plugin API
These APIs have not been hooked up for a while. No need to carry them.
2023-11-27 11:07:57 -08:00
Johannes Doerfert
f48c4d8aa1 [OpenMP] Be more forgiving during record and replay
When we record and replay kernels we should not error out early if there
is a chance the program might still run fine. This patch will:
1) Fallback to the allocation heuristic if the VAMap doesn't work.
2) Adjust the memory start to match the required address if possible.
3) Adjust the (guessed) pointer arguments if the memory start adjustment
   is impossible. This will allow kernels without indirect accesses to
   work while indirect accesses will most likely fail.
2023-11-20 17:15:34 -08:00
Konstantinos Parasyris
b34d31d2e1
[OpenMP] Fix record-replay allocation order for kernel environment (#71863) 2023-11-09 12:51:22 -08:00
Konstantinos Parasyris
d6a3d6b96d
[openmp] Fixed Support for VA for record-replay. (#70396)
The commit was discussed in phabricator
(https://reviews.llvm.org/D157186).

Record replay currently fails on AMD as it conflicts with the heap
memory allocator introduced in #69806. The workaround is setting
`LIBOMPTARGET_HEAP_SIZE=0` during both record and replay run.
2023-10-29 12:27:19 -07:00
Konstantinos Parasyris
01828c4323
[OpenMP] record-replay use static-cast (#70516)
[OpenMP] Fixes #69905
2023-10-27 16:46:34 -07:00
koparasy
73cb01dc8a [OpenMP] Support for OpenMP-Offload Record Replay
Enable record-replay for OpenMP offload kernels.  On recording the initialization
is performed on device initialization by reading env variables. (This is similar to
the way rr used to operate). The primary change takes place in the replay phase
with the replay tool explicitly initializing the record-replay functionality.

Differential Revision: https://reviews.llvm.org/D156174

Fix
2023-08-05 00:46:06 -07:00
Joseph Huber
b280e12a3d [Libomptarget][NFC] Address a few warnings in libomptarget
Summary:
Fix a few minor warnings that show up in `libomptarget`.
2023-01-23 08:56:03 -06:00
Giorgis Georgakoudis
94c772dc92 [OpenMP] Support kernel record and replay
This patch adds functionality for recording and replaying the execution of OpenMP offload kernels, based on an original implementation by Steve Rangel. The patch extends libomptarget to extract a json description of the kernel, the device image binary, and a device memory snapshot before and after the execution of a recorded kernel. Kernel recording/replaying in libomptarget is controlled through env vars (LIBOMPTARGET_RECORD, LIBOMPTARGET_REPLAY). It provides a tool, llvm-omp-kernel-replay, for replaying a kernel using the extracted information with the ability to verify replayed execution using the post-execution device memory snapshot, also supporting changing the number of teams/threads for replaying.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D138931
2023-01-17 16:29:03 -08:00