From 7335e429cbbd82e120d248804327fd0ade70cb48 Mon Sep 17 00:00:00 2001 From: foreman Date: Wed, 30 Aug 2017 15:37:01 -0400 Subject: [PATCH] P4 to Git Change 1453366 by asalmanp@asalmanp-ocl-stg on 2017/08/30 15:16:37 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SWDEV-128844 - OpenCL conformance test 2.0/gl/test_gl.exe fails to run on Vega10 Before switching to PAL on gfx9, we didn’t need to pass any argument for running Conformance tests and the first GPU device was selected automatically to run the tests. But after switching to PAL, we need to explicitly pass either “gpu” or “GPU_DEVICE_TYPE_GPU” as an argument to run Conformance tests otherwise the tests are failing (clGetDeviceIDs failure) The reason for this issue is that the logic for creating device and null devices (offline devices) changed after switching to PAL for gfx9+ devices. To fix this issue, don’t assign an offline device as "default" device. ReviewBoardURL = http://ocltc.amd.com/reviews/r/13360/diff/2/ Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#212 edit --- rocclr/runtime/device/device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rocclr/runtime/device/device.cpp b/rocclr/runtime/device/device.cpp index 62322d9af7..64d49d35dd 100644 --- a/rocclr/runtime/device/device.cpp +++ b/rocclr/runtime/device/device.cpp @@ -278,7 +278,7 @@ void Device::registerDevice() { } if (info_.available_) { - if (!defaultIsAssigned) { + if (!defaultIsAssigned && online_) { defaultIsAssigned = true; info_.type_ |= CL_DEVICE_TYPE_DEFAULT; }