|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1 |
|
| #
046d5b91 |
| 15-Sep-2022 |
Joseph Huber <[email protected]> |
[Libomptarget] Revert changes to AMDGPU plugin destructors
These patches exposed a lot of problems in the AMD toolchain. Rather than keep it broken we should revert it to its old semi-functional sta
[Libomptarget] Revert changes to AMDGPU plugin destructors
These patches exposed a lot of problems in the AMD toolchain. Rather than keep it broken we should revert it to its old semi-functional state. This will prevent us from using device destructors but should remove some new bugs. In the future this interface should be changed once these problems are addressed more correctly.
This reverts commit ed0f21811544320f829124efbb6a38ee12eb9155.
This reverts commit 2b7203a35972e98b8521f92d2791043dc539ae88.
Fixes #57536
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D133997
show more ...
|
|
Revision tags: llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1 |
|
| #
cb24013b |
| 28-Jul-2022 |
Jon Chesterfield <[email protected]> |
[openmp][amdgpu] Tear down amdgpu plugin accurately
Moves DeviceInfo global to heap to accurately control lifetime. Moves calls from libomptarget to deinit_plugin later, plugins need to stay alive u
[openmp][amdgpu] Tear down amdgpu plugin accurately
Moves DeviceInfo global to heap to accurately control lifetime. Moves calls from libomptarget to deinit_plugin later, plugins need to stay alive until very shortly before libomptarget is destructed.
Leaving the deinit_plugin calls where initially inserted hits use after free from the dynamic_module.c offloading test (verified with valgrind that the new location is sound with respect to this)
Reviewed By: tianshilei1992
Differential Revision: https://reviews.llvm.org/D130714
(cherry picked from commit ed0f21811544320f829124efbb6a38ee12eb9155)
show more ...
|
| #
410bfa00 |
| 28-Jul-2022 |
Jon Chesterfield <[email protected]> |
[openmp] Introduce optional plugin init/deinit functions
Will allow plugins to migrate away from using global variables to manage lifetime, which will fix a segfault discovered in relation to D12743
[openmp] Introduce optional plugin init/deinit functions
Will allow plugins to migrate away from using global variables to manage lifetime, which will fix a segfault discovered in relation to D127432
Reviewed By: jhuber6
Differential Revision: https://reviews.llvm.org/D130712
(cherry picked from commit 1f9d3974e444f95ddb600a6964ed14ded559e89c)
show more ...
|
|
Revision tags: llvmorg-16-init, llvmorg-14.0.6 |
|
| #
fbcb1ee7 |
| 10-Jun-2022 |
Joseph Huber <[email protected]> |
[Libomptarget] Add support for offloading binaries in libomptarget
The previous path changed the linker wrapper to embed the offloading binary format inside the target image instead. This will allow
[Libomptarget] Add support for offloading binaries in libomptarget
The previous path changed the linker wrapper to embed the offloading binary format inside the target image instead. This will allow us to more generically bundle metadata with these images, such as requires clauses or the target architecture it was compiled for.
I wasn't sure how to handle this best, so I introduced a new type that replaces the old `__tgt_device_image` struct that we can expand inside the runtime library. I made the new `__tgt_device_binary` struct pretty much the same for now. In the future we could change this struct to pretty much be the `OffloadBinary` class in the future.
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D127432
show more ...
|
| #
c9353eb4 |
| 27-Jun-2022 |
Joseph Huber <[email protected]> |
[Libomptarget] Use new tripcount argument in the runtime.
The previous patch added an argument to the `__tgt_target_kernel` runtime function which includes the tripcount used for the loop clause. Th
[Libomptarget] Use new tripcount argument in the runtime.
The previous patch added an argument to the `__tgt_target_kernel` runtime function which includes the tripcount used for the loop clause. This was originally passed in via the `__kmpc_push_target_tripcount` function. Now we move this logic to the kernel launch itself and remove the need for the push function.
Depends on D128816
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D128817
show more ...
|
| #
d27d0a67 |
| 01-Jul-2022 |
Joseph Huber <[email protected]> |
[Libomptarget][NFC] Make Libomptarget use the LLVM naming convention
Libomptarget grew out of a project that was originally not in LLVM. As we develop libomptarget this has led to an increasingly la
[Libomptarget][NFC] Make Libomptarget use the LLVM naming convention
Libomptarget grew out of a project that was originally not in LLVM. As we develop libomptarget this has led to an increasingly large clash between the naming conventions used. This patch fixes most of the variable names that did not confrom to the LLVM standard, that is `VariableName` for variables and `functionName` for functions.
This patch was primarily done using my editor's linting messages, if there are any issues I missed arising from the automation let me know.
Reviewed By: saiislam
Differential Revision: https://reviews.llvm.org/D128997
show more ...
|
|
Revision tags: llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2 |
|
| #
10aa83ff |
| 17-Feb-2022 |
Johannes Doerfert <[email protected]> |
[OpenMP] Allow to explicitly deinitialize device resources
There are two problems this patch tries to address: 1) We currently free resources in a random order wrt. plugin and libomptarget destru
[OpenMP] Allow to explicitly deinitialize device resources
There are two problems this patch tries to address: 1) We currently free resources in a random order wrt. plugin and libomptarget destruction. This patch should ensure the CUDA plugin is less fragile if something during the deinitialization goes wrong. 2) We need to support (hard) pause runtime calls eventually. This patch allows us to free all associated resources, though we cannot reinitialize the device yet.
Follow up patch will associate one event pool per device/context.
Differential Revision: https://reviews.llvm.org/D120089
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init |
|
| #
f44e41af |
| 27-Jan-2022 |
Sri Hari Krishna Narayanan <[email protected]> |
Runtime for Interop directive
This implements the runtime portion of the interop directive. It expects the frontend and IRBuilder portions to be in place for proper execution. It currently works onl
Runtime for Interop directive
This implements the runtime portion of the interop directive. It expects the frontend and IRBuilder portions to be in place for proper execution. It currently works only for GPUs and has several TODOs that should be addressed going forward.
Reviewed By: RaviNarayanaswamy
Differential Revision: https://reviews.llvm.org/D106674
show more ...
|
|
Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3 |
|
| #
1e447d03 |
| 19-Jan-2022 |
Johannes Doerfert <[email protected]> |
[OpenMP] Introduce an environment variable to disable atomic map clauses
Atomic handling of map clauses was introduced to comply with the OpenMP standard (see D104418). However, many apps won't need
[OpenMP] Introduce an environment variable to disable atomic map clauses
Atomic handling of map clauses was introduced to comply with the OpenMP standard (see D104418). However, many apps won't need this feature which can be costly in certain situations. To allow for applications to opt-out we now introduce the `LIBOMPTARGET_MAP_FORCE_ATOMIC` environment flag that voids the atomicity guarantee of the standard for map clauses again, shifting the burden to the user.
This patch also de-duplicates the code that introduces the events used to enforce atomicity as a cleanup.
Differential Revision: https://reviews.llvm.org/D117627
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
| #
52da6f56 |
| 10-Nov-2021 |
Joachim Protze <[email protected]> |
Revert "[openmp] Add OMPT initialization in libomptarget"
Reverting initial OMPT for target implementation in favor of a different implementation.
This reverts commit 3bc8ce5dd718beef0031bf4b070ac4
Revert "[openmp] Add OMPT initialization in libomptarget"
Reverting initial OMPT for target implementation in favor of a different implementation.
This reverts commit 3bc8ce5dd718beef0031bf4b070ac4026e6910d7.
show more ...
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3 |
|
| #
c3aecf87 |
| 04-Sep-2021 |
Ye Luo <[email protected]> |
[OpenMP][libomptarget] Change device vector elements to unique_ptr type
Using std::vector<DeviceTy> requires implementing copy constructor and copied assign operator for DeviceTy. Indeed DeviceTy sh
[OpenMP][libomptarget] Change device vector elements to unique_ptr type
Using std::vector<DeviceTy> requires implementing copy constructor and copied assign operator for DeviceTy. Indeed DeviceTy should never be copied. After changing to std::vector<std::unique_ptr<DeviceTy>>, All the unsafe copy constructor and copy assign operator implementations can be removed. Compilers mark them deleted due to mutex or underlying objects and this is the desired behavior.
Differential Revision: https://reviews.llvm.org/D109276
show more ...
|
| #
29df4ab3 |
| 28-Aug-2021 |
Shilei Tian <[email protected]> |
[OpenMP][Offloading] Add support for event related interfaces
This patch adds the support form event related interfaces, which will be used later to fix data race. See D104418 for more details.
Rev
[OpenMP][Offloading] Add support for event related interfaces
This patch adds the support form event related interfaces, which will be used later to fix data race. See D104418 for more details.
Reviewed By: jdoerfert, ye-luo
Differential Revision: https://reviews.llvm.org/D108528
show more ...
|
|
Revision tags: llvmorg-13.0.0-rc2 |
|
| #
3bc8ce5d |
| 04-Aug-2021 |
Lechen Yu <[email protected]> |
[openmp] Add OMPT initialization in libomptarget
When loading libomptarget, the init function in libomptarget/src/rtl.cpp will search for the libomptarget_start_tool function using libdl. libomptarg
[openmp] Add OMPT initialization in libomptarget
When loading libomptarget, the init function in libomptarget/src/rtl.cpp will search for the libomptarget_start_tool function using libdl. libomptarget_start_tool will pass those OMPT callbacks related to target constructs to libomptarget
Differential Revision: https://reviews.llvm.org/D99803
show more ...
|
|
Revision tags: llvmorg-13.0.0-rc1, llvmorg-14-init |
|
| #
313c5239 |
| 28-Jul-2021 |
Jose M Monsalve Diaz <[email protected]> |
[OpenMP][Tool] Introducing the `llvm-omp-device-info` tool
This patch introduces the `llvm-omp-device-info` tool, which uses the omptarget library and interface to query the device info from all the
[OpenMP][Tool] Introducing the `llvm-omp-device-info` tool
This patch introduces the `llvm-omp-device-info` tool, which uses the omptarget library and interface to query the device info from all the available devices as seen by OpenMP. This is inspired by PGI's `pgaccelinfo`
Since omptarget usually requires a description structure with executable kernels, I split the initialization of the RTLs and Devices to be able to initialize all possible devices and query each of them.
This revision relies on the patch that introduces the print device info.
A limitation is that the order in which the devices are initialized, and the corresponding device ID is not necesarily the one seen by OpenMP.
The changes are as follows: 1. Separate the RTL initialization that was performed in `RegisterLib` to its own `initRTLonce` function 2. Create an `initAllRTLs` method that initializes all available RTLs at runtime 3. Created the `llvm-deviceinfo.cpp` tool that uses `omptarget` to query each device and prints its information.
Example Output: ``` Device (0): print_device_info not implemented
Device (1): print_device_info not implemented
Device (2): print_device_info not implemented
Device (3): print_device_info not implemented
Device (4): CUDA Driver Version: 11000 CUDA Device Number: 0 Device Name: Quadro P1000 Global Memory Size: 4236312576 bytes Number of Multiprocessors: 5 Concurrent Copy and Execution: Yes Total Constant Memory: 65536 bytes Max Shared Memory per Block: 49152 bytes Registers per Block: 65536 Warp Size: 32 Threads Maximum Threads per Block: 1024 Maximum Block Dimensions: 1024, 1024, 64 Maximum Grid Dimensions: 2147483647 x 65535 x 65535 Maximum Memory Pitch: 2147483647 bytes Texture Alignment: 512 bytes Clock Rate: 1480500 kHz Execution Timeout: Yes Integrated Device: No Can Map Host Memory: Yes Compute Mode: DEFAULT Concurrent Kernels: Yes ECC Enabled: No Memory Clock Rate: 2505000 kHz Memory Bus Width: 128 bits L2 Cache Size: 1048576 bytes Max Threads Per SMP: 2048 Async Engines: Yes (2) Unified Addressing: Yes Managed Memory: Yes Concurrent Managed Memory: Yes Preemption Supported: Yes Cooperative Launch: Yes Multi-Device Boars: No Compute Capabilities: 61 ```
Reviewed By: tianshilei1992
Differential Revision: https://reviews.llvm.org/D106752
show more ...
|
| #
d2f85d09 |
| 28-Jul-2021 |
Jose M Monsalve Diaz <[email protected]> |
[OpenMP][Libomptarget] Adding `print_device_info` to RTL and `omptarget`
This patch introduces a function in the device's plugin to print the device information. This patch relates to another patch
[OpenMP][Libomptarget] Adding `print_device_info` to RTL and `omptarget`
This patch introduces a function in the device's plugin to print the device information. This patch relates to another patch that introduces a CLI tool to obtain the device information from the omplibrary directly. It is inspired by PGI's pgaccelinfo.
The modifications are as follows: 1. Introduce the optional `void __tgt_rtl_print_device_info(RTLdevID)` function into the RTL. 2. Introduce the `bool __tgt_print_device_info(devID)` function into `omptarget` interface. Returns false if the RTL is not implemented 3. Added `bool printDeviceInfo(RTLDevID)` to the `DeviceTy` 4. Implement the `__tgt_rtl_print_device_info` for CUDA. Added additional CUDA Runtime calls.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D106751
show more ...
|
|
Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1 |
|
| #
2b6f2008 |
| 21-Apr-2021 |
Joseph Huber <[email protected]> |
[OpenMP] Add function for setting LIBOMPTARGET_INFO at runtime
Summary: This patch adds a new runtime function __tgt_set_info_flag that allows the user to set the information level at runtime withou
[OpenMP] Add function for setting LIBOMPTARGET_INFO at runtime
Summary: This patch adds a new runtime function __tgt_set_info_flag that allows the user to set the information level at runtime without using the environment variable. Using this will require an extern function, but will eventually be added into an auxilliary library for OpenMP support functions.
This patch required moving the current InfoLevel to a global variable which must be instantiated by each plugin.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D100774
show more ...
|
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3 |
|
| #
542d9c21 |
| 24-Feb-2021 |
Manoel Roemmer <[email protected]> |
[libomptarget] Load images in order of registration
This makes sure that images are loaded in the order in which they are registered with libomptarget.
If a target can load multiple images and thes
[libomptarget] Load images in order of registration
This makes sure that images are loaded in the order in which they are registered with libomptarget.
If a target can load multiple images and these images depend on each other (for example if one image contains the programs target regions and one image contains library code), then the order in which images are loaded can be important for symbol resolution (for example, in the VE plugin). In this case: because the same code exist in the host binaries, the order in which the host linker loads them (which is also the order in which images are registered with libomptarget) is the order in which the images have to be loaded onto the device.
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D95530
show more ...
|
|
Revision tags: llvmorg-12.0.0-rc2 |
|
| #
758b8499 |
| 10-Feb-2021 |
Johannes Doerfert <[email protected]> |
[OpenMP] Unify omptarget API and usage wrt. `__tgt_async_info`
This patch unifies our libomptarget API in two ways: - always pass a `__tgt_async_info` object, the Queue member decides if it is
[OpenMP] Unify omptarget API and usage wrt. `__tgt_async_info`
This patch unifies our libomptarget API in two ways: - always pass a `__tgt_async_info` object, the Queue member decides if it is in use or not. - (almost) always synchronize in the interface layer and not in the omptarget layer.
A side effect is that we now put all constructor and static initializer kernels in a stream too, if the device utilizes `__tgt_async_info`.
The patch contains a TODO which can be addressed as we add support for asynchronous malloc and free in the plugin API. This is the only `synchronizeAsyncInfo` left in the omptarget layer.
Site note: On a V100 system the GridMini performance for small sizes more than doubled.
Reviewed By: tianshilei1992
Differential Revision: https://reviews.llvm.org/D96379
show more ...
|
| #
94272876 |
| 10-Feb-2021 |
Johannes Doerfert <[email protected]> |
[OpenMP][NFC] Unify `target` API with other by passing a `__tgt_async_info` pointer
Reviewed By: tianshilei1992
Differential Revision: https://reviews.llvm.org/D96430
|
| #
44f3022c |
| 10-Feb-2021 |
Johannes Doerfert <[email protected]> |
[OpenMP][NFC] Pass a DeviceTy, not the device number to `target`
This unifies the API of `target` relative to `targetUpdateData` and such.
Reviewed By: tianshilei1992, grokos
Differential Revision
[OpenMP][NFC] Pass a DeviceTy, not the device number to `target`
This unifies the API of `target` relative to `targetUpdateData` and such.
Reviewed By: tianshilei1992, grokos
Differential Revision: https://reviews.llvm.org/D96429
show more ...
|
| #
9cd1e222 |
| 10-Feb-2021 |
Johannes Doerfert <[email protected]> |
[OpenMP][NFC] Clang format libomptarget code (src & include)
The struct and enum alignments are kept by disabling clang-format for that code region.
Reviewed By: tianshilei1992, JonChesterfield, gr
[OpenMP][NFC] Clang format libomptarget code (src & include)
The struct and enum alignments are kept by disabling clang-format for that code region.
Reviewed By: tianshilei1992, JonChesterfield, grokos
Differential Revision: https://reviews.llvm.org/D96428
show more ...
|
|
Revision tags: llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init |
|
| #
683719bc |
| 26-Jan-2021 |
Atmn <[email protected]> |
[OpenMP][Libomptarget] Introduce changes to support remote plugin
In order to support remote execution, we need to be able to send the target binary description to the remote host for registration (
[OpenMP][Libomptarget] Introduce changes to support remote plugin
In order to support remote execution, we need to be able to send the target binary description to the remote host for registration (and consequent deregistration). To support this, I added these two optional new functions to the plugin API: - `__tgt_rtl_register_lib` - `__tgt_rtl_unregister_lib`
These functions will be called to properly manage the instance of libomptarget running on the remote host.
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D93293
show more ...
|
| #
8c7fdc4c |
| 23-Jan-2021 |
Johannes Doerfert <[email protected]> |
[OpenMP] Add source location information to the libomptarget profile
In much of the libomptarget interface we have an ident_t object now, if it is not null we can use it to improve the profile outpu
[OpenMP] Add source location information to the libomptarget profile
In much of the libomptarget interface we have an ident_t object now, if it is not null we can use it to improve the profile output. For now, we simply use the ident_t "source information string" as generated by the FE.
Reviewed By: tianshilei1992
Differential Revision: https://reviews.llvm.org/D95282
show more ...
|
|
Revision tags: llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1 |
|
| #
175c336a |
| 09-Jan-2021 |
Shilei Tian <[email protected]> |
[OpenMP] Remove copy constructor of `RTLInfoTy`
Multiple `RTLInfoTy` objects are stored in a list `AllRTLs`. Since `RTLInfoTy` contains a `std::mutex`, it is by default not a copyable object. In ord
[OpenMP] Remove copy constructor of `RTLInfoTy`
Multiple `RTLInfoTy` objects are stored in a list `AllRTLs`. Since `RTLInfoTy` contains a `std::mutex`, it is by default not a copyable object. In order to support `AllRTLs.push_back(...)` which is currently used, a customized copy constructor is provided. Every time we need to add a new data member into `RTLInfoTy`, we should keep in mind not forgetting to add corresponding assignment in the copy constructor. In fact, the only use of the copy constructor is to push the object into the list, we can of course write it in a way that first emplace a new object back, and then use the reference to the last element. In this way we don't need the copy constructor anymore. If the element is invalid, we just need to pop it, and that's what this patch does.
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D94361
show more ...
|
|
Revision tags: llvmorg-11.0.1, llvmorg-11.0.1-rc2 |
|
| #
e007b328 |
| 10-Dec-2020 |
Giorgis Georgakoudis <[email protected]> |
[OpenMP] Add time profiling for libomptarget
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D93055
|