diff --git a/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp b/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp index 622fa9174a..8273ca2cb5 100644 --- a/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp +++ b/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp @@ -765,7 +765,7 @@ void GpuAgent::InitDma() { // Dedicated compute queue for PC Sampling CP-DMA commands. We need a dedicated queue that runs at // highest priority because we do not want the CP-DMA commands to be delayed/blocked due to // other dispatches/barriers that could be in the other AQL queues. - queues_[QueuePCSampling].reset(queue_lambda(HSA_QUEUE_PRIORITY_MAXIMUM)); + queues_[QueuePCSampling].reset([queue_lambda, this]() { return queue_lambda(HSA_QUEUE_PRIORITY_MAXIMUM); }); // Decide which engine to use for blits. auto blit_lambda = [this](bool use_xgmi, lazy_ptr& queue, bool isHostToDev) {