From d3d97c5010ed3be44fe10480f0b3858edbc43ebd Mon Sep 17 00:00:00 2001 From: foreman Date: Wed, 6 Sep 2017 12:08:13 -0400 Subject: [PATCH] P4 to Git Change 1455765 by gandryey@gera-w8 on 2017/09/06 11:57:19 SWDEV-131497 - [CQE OCL][Vega10][OclTst][QR][DTB-Blocker] 'Spir' test of OCLTST is crashing randomly 3/10 times; Faulty CL# 1451293 - The test doesn't release command queues, which may cause a crash on the device destruction. Force the app's queue destruction if the app didn't release them. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#54 edit --- rocclr/runtime/device/pal/paldevice.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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_;