diff --git a/rocclr/runtime/device/pal/paldevice.cpp b/rocclr/runtime/device/pal/paldevice.cpp index 2b9c087534..3044c6fa1a 100644 --- a/rocclr/runtime/device/pal/paldevice.cpp +++ b/rocclr/runtime/device/pal/paldevice.cpp @@ -657,6 +657,11 @@ Device::~Device() { delete globalScratchBuf_; globalScratchBuf_ = nullptr; + // Release all queues if the app didn't release them + while (vgpus().size() > 1) { + delete vgpus()[1]; + } + // Destroy transfer queue delete xferQueue_;