llvm-project
565a0759 - [flang][cuda][rt] Track asynchronous allocation stream for deallocation (#137073)

Commit
1 year ago
[flang][cuda][rt] Track asynchronous allocation stream for deallocation (#137073) When an asynchronous allocation is made, we call `cudaMallocAsync` with a stream. For deallocation, we need to call `cudaFreeAsync` with the same stream. in order to achieve that, we need to track the allocation and their respective stream. This patch adds a simple sorted array of asynchronous allocations. A binary search is performed to retrieve the allocation when deallocation is needed.
Author
Parents
Loading