File: README.md

package info (click to toggle)
llvm-toolchain-21 1%3A21.1.8-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,236,764 kB
  • sloc: cpp: 7,619,776; ansic: 1,433,958; asm: 1,058,748; python: 252,197; f90: 94,671; objc: 70,753; lisp: 42,813; pascal: 18,401; sh: 8,601; ml: 5,111; perl: 4,720; makefile: 3,721; awk: 3,523; javascript: 2,272; xml: 892; fortran: 770
file content (34 lines) | stat: -rw-r--r-- 1,123 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# 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:

```sh
$ ./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.

```sh
$ OFFLOAD_TRACE=1 ./offload.unittests
---> olInit()-> 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](API/README.md)
for implementation details.