Files
llvm-project/offload/liboffload
Kevin Sala Penades f14644d085 [offload] Add mechanism to return info to kernel replay tool (#192611)
This commit adds a mechanism to return information about a kernel replay
to outer replay tool. This mechanism allows verifying the replay memory
output when using different launch configurations (e.g., different number
of teams or threads) than the one used for recording.

It also adds a new KernelExtraArgsTy structure that is only generated by
the offload/libomptarget runtime components (unlike KernelArgsTy). These
runtime arguments can be used by future extensions, including extensions
not related to kernel record replay.
2026-04-17 09:45:33 -07:00
..

Liboffload

This directory contains the implementation of the work-in-progress new API for Offload. It builds on top of the existing plugin implementations but provides a single level of abstraction suitable for implementation of many offloading language runtimes, rather than just OpenMP.

Testing liboffload

The main test suite for liboffload can be run with the check-offload-unit target, which runs the offload.unittests executable. The test suite will automatically run on every available device, but can be restricted to a single platform (CUDA, AMDGPU) with a command line argument:

$ ./offload.unittests --platform=CUDA

Tracing of Offload API calls can be enabled by setting the OFFLOAD_TRACE environment variable. This works with any program that uses liboffload.

$ OFFLOAD_TRACE=1 ./offload.unittests
---> olInit(nullptr)-> OL_SUCCESS
# etc

The host plugin is not currently supported.

Modifying liboffload

The main header (OffloadAPI.h) and some implementation details are autogenerated with tablegen. See the API definition README for implementation details.