From 20e1c977c9b93c19cbbf0bfec129fff5de8ab7f1 Mon Sep 17 00:00:00 2001
From: foreman
Date: Tue, 7 Aug 2018 17:29:56 -0400
Subject: [PATCH] P4 to Git Change 1590512 by gandryey@gera-lnx-rcf on
2018/08/07 17:06:25
SWDEV-160552 - [CQE OCL][DTB][BD][Perf][QR][G] Soft hang is observed with ProRender after few subtests due to base driver.
- Delete PAL platform object if runtime didn't find any supported device.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#101 edit
[ROCm/clr commit: 769cc7cddb1f6406a47d68789a73be2c40f300b7]
---
projects/clr/rocclr/runtime/device/pal/paldevice.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/projects/clr/rocclr/runtime/device/pal/paldevice.cpp b/projects/clr/rocclr/runtime/device/pal/paldevice.cpp
index 19ce2c1844..97a33aaf1d 100644
--- a/projects/clr/rocclr/runtime/device/pal/paldevice.cpp
+++ b/projects/clr/rocclr/runtime/device/pal/paldevice.cpp
@@ -1194,6 +1194,7 @@ bool Device::init() {
selectDeviceByName = GPU_DEVICE_NAME;
}
+ bool foundDevice = false;
// Loop through all active devices and initialize the device info structure
for (; ordinal < numDevices; ++ordinal) {
// Create the GPU device object
@@ -1204,11 +1205,15 @@ bool Device::init() {
}
if (result && ((nullptr == selectDeviceByName) || ('\0' == selectDeviceByName[0]) ||
(strstr(selectDeviceByName, d->info().name_) != nullptr))) {
+ foundDevice = true;
d->registerDevice();
} else {
delete d;
}
}
+ if (!foundDevice) {
+ Device::tearDown();
+ }
return true;
}