[all-commits] [llvm/llvm-project] 9e5d8b: [Offload] Improve `olDestroyQueue` logic (#153041)

Ross Brunton via All-commits all-commits at lists.llvm.org
Fri Aug 29 01:39:21 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9e5d8bd3d1ecd512be3dfa233bc41f32e26c750a
      https://github.com/llvm/llvm-project/commit/9e5d8bd3d1ecd512be3dfa233bc41f32e26c750a
  Author: Ross Brunton <ross at codeplay.com>
  Date:   2025-08-29 (Fri, 29 Aug 2025)

  Changed paths:
    M offload/liboffload/src/OffloadImpl.cpp
    M offload/plugins-nextgen/common/src/PluginInterface.cpp
    M offload/unittests/OffloadAPI/queue/olDestroyQueue.cpp

  Log Message:
  -----------
  [Offload] Improve `olDestroyQueue` logic (#153041)

Previously, `olDestroyQueue` would not actually destroy the queue,
instead leaving it for the device to clean up when it was destroyed.
Now, the queue is either released immediately if it is complete or put
into a list of "pending" queues if it is not. Whenever we create a new
queue, we check this list to see if any are now completed. If there are
any we release their resources and use them instead of pulling from
the pool.

This prevents long running programs that create and drop many queues
without syncing them from leaking memory all over the place.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list