Files
clang-p2996/offload/include/Shared/PluginAPI.inc
Johannes Doerfert 330d8983d2 [Offload] Move /openmp/libomptarget to /offload (#75125)
In a nutshell, this moves our libomptarget code to populate the offload
subproject.

With this commit, users need to enable the new LLVM/Offload subproject
as a runtime in their cmake configuration.
No further changes are expected for downstream code.

Tests and other components still depend on OpenMP and have also not been
renamed. The results below are for a build in which OpenMP and Offload
are enabled runtimes. In addition to the pure `git mv`, we needed to
adjust some CMake files. Nothing is intended to change semantics.

```
ninja check-offload
```
Works with the X86 and AMDGPU offload tests

```
ninja check-openmp
```
Still works but doesn't build offload tests anymore.

```
ls install/lib
```
Shows all expected libraries, incl.
- `libomptarget.devicertl.a`
- `libomptarget-nvptx-sm_90.bc`
- `libomptarget.rtl.amdgpu.so` -> `libomptarget.rtl.amdgpu.so.18git`
- `libomptarget.so` -> `libomptarget.so.18git`

Fixes: https://github.com/llvm/llvm-project/issues/75124

---------

Co-authored-by: Saiyedul Islam <Saiyedul.Islam@amd.com>
2024-04-22 09:51:33 -07:00

52 lines
1.8 KiB
C++

//===-- Shared/PluginAPI.inc - Target independent plugin API ----*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file defines the names of the interface functions between target
// independent offload runtime library and target dependent plugins.
//
//===----------------------------------------------------------------------===//
// No include guards!
PLUGIN_API_HANDLE(init_plugin);
PLUGIN_API_HANDLE(is_valid_binary);
PLUGIN_API_HANDLE(is_data_exchangable);
PLUGIN_API_HANDLE(number_of_devices);
PLUGIN_API_HANDLE(init_device);
PLUGIN_API_HANDLE(load_binary);
PLUGIN_API_HANDLE(get_global);
PLUGIN_API_HANDLE(get_function);
PLUGIN_API_HANDLE(data_alloc);
PLUGIN_API_HANDLE(data_submit);
PLUGIN_API_HANDLE(data_submit_async);
PLUGIN_API_HANDLE(data_retrieve);
PLUGIN_API_HANDLE(data_retrieve_async);
PLUGIN_API_HANDLE(data_exchange);
PLUGIN_API_HANDLE(data_exchange_async);
PLUGIN_API_HANDLE(data_delete);
PLUGIN_API_HANDLE(launch_kernel);
PLUGIN_API_HANDLE(init_requires);
PLUGIN_API_HANDLE(synchronize);
PLUGIN_API_HANDLE(query_async);
PLUGIN_API_HANDLE(set_info_flag);
PLUGIN_API_HANDLE(print_device_info);
PLUGIN_API_HANDLE(create_event);
PLUGIN_API_HANDLE(record_event);
PLUGIN_API_HANDLE(wait_event);
PLUGIN_API_HANDLE(sync_event);
PLUGIN_API_HANDLE(destroy_event);
PLUGIN_API_HANDLE(init_async_info);
PLUGIN_API_HANDLE(init_device_info);
PLUGIN_API_HANDLE(data_lock);
PLUGIN_API_HANDLE(data_unlock);
PLUGIN_API_HANDLE(data_notify_mapped);
PLUGIN_API_HANDLE(data_notify_unmapped);
PLUGIN_API_HANDLE(set_device_offset);
PLUGIN_API_HANDLE(initialize_record_replay);
PLUGIN_API_HANDLE(use_auto_zero_copy);