diff options
author | Shilei Tian <i@tianshilei.me> | 2021-12-27 11:31:59 -0500 |
---|---|---|
committer | Shilei Tian <i@tianshilei.me> | 2021-12-27 11:32:14 -0500 |
commit | a697a0a4b669a2b99cc973fe5f5164df309d285c (patch) | |
tree | d95054bbfd7750400850ca864124276bc815315a /llvm/lib/Analysis/ValueTracking.cpp | |
parent | 7171af744543433ac75b232eb7dfdaef7efd4d7a (diff) | |
download | llvm-a697a0a4b669a2b99cc973fe5f5164df309d285c.zip llvm-a697a0a4b669a2b99cc973fe5f5164df309d285c.tar.gz llvm-a697a0a4b669a2b99cc973fe5f5164df309d285c.tar.bz2 |
[OpenMP][Plugin] Introduce generic resource pool
Currently CUDA streams are managed by `StreamManagerTy`. It works very well. Now
we have the need that some resources, such as CUDA stream and event, will be
hold by `libomptarget`. It is always good to buffer those resources. What's more
important, given the way that `libomptarget` and plugins are connected, we cannot
make sure whether plugins are still alive when `libomptarget` is destroyed. That
leads to an issue that those resouces hold by `libomptarget` might not be
released correctly. As a result, we need an unified management of all the resources
that can be shared between `libomptarget` and plugins.
`ResourcePoolTy` is designed to manage the type of resource for one device.
It has to work with an allocator which is supposed to provide `create` and
`destroy`. In this way, when the plugin is destroyed, we can make sure that
all resources allocated from native runtime library will be released correctly,
no matter whether `libomptarget` starts its destroy.
Reviewed By: ye-luo
Differential Revision: https://reviews.llvm.org/D111954
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
0 files changed, 0 insertions, 0 deletions