llvm-c166/offload/liboffload
Jan Trusiłło 99ad0059a8
[offload][l0] Synchronize seed upload in olMemFill L0 slow path (#215270)
Fix Level Zero memory fills that cannot use
`zeCommandListAppendMemoryFill`, such as non-power-of-two patterns.

The replication fallback previously submitted a temporary host vector
whose lifetime could end before the asynchronous copy completed, which
caused unit test failures. This PR changes the replication fallback to
simply use `dataSubmit()` + `synchronize()` for the seed upload.

The software fill is also moved to L0SyncQueueTy so it's only possible
with a synchronous queue.

Assisted-by: Codex
2026-08-27 16:15:42 +02:00
..
API [offload][l0] Synchronize seed upload in olMemFill L0 slow path (#215270) 2026-08-27 16:15:42 +02:00
include
src [offload] Split strictness for threads and blocks (#211400) 2026-08-19 23:31:10 -07:00
CMakeLists.txt [Offload] Add rpath to LLVM libs if dynamically linked (#215557) 2026-08-26 07:46:13 -05:00
exports Reland #118503: [Offload] Introduce offload-tblgen and initial new API implementation (#118614) 2024-12-05 09:34:04 +01:00
README.md

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.