From e5fa6843f171e29d601b51b8eb2c105323eefd12 Mon Sep 17 00:00:00 2001
From: foreman
Date: Fri, 10 Nov 2017 11:30:16 -0500
Subject: [PATCH] P4 to Git Change 1481211 by gandryey@gera-lnx-rcf on
2017/11/10 11:23:52
SWDEV-133810 - PAL support for Linux Pro w/OpenCL 1.2 support
- Fix a crash in multiple device/context test
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#64 edit
[ROCm/clr commit: 0cf1fd6eaedada6c29289d523ed5f1f1a4a159e4]
---
projects/clr/rocclr/runtime/device/pal/palvirtual.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/projects/clr/rocclr/runtime/device/pal/palvirtual.cpp b/projects/clr/rocclr/runtime/device/pal/palvirtual.cpp
index 4aa483cbe1..383c96c42e 100644
--- a/projects/clr/rocclr/runtime/device/pal/palvirtual.cpp
+++ b/projects/clr/rocclr/runtime/device/pal/palvirtual.cpp
@@ -738,13 +738,15 @@ bool VirtualGPU::create(bool profiling, uint deviceQueueSize, uint rtCUs,
amd::CommandQueue::Priority priority) {
device::BlitManager::Setup blitSetup;
+ // Resize the list of device resources always,
+ // because destructor calls eraseResourceList() even if create() failed
+ dev().resizeResoureList(index());
+
if (index() >= GPU_MAX_COMMAND_QUEUES) {
// Cap the maximum number of concurrent Virtual GPUs
return false;
}
- dev().resizeResoureList(index());
-
// Virtual GPU will have profiling enabled
state_.profiling_ = profiling;