From 1d802b041367685faaad5ea6a14edcaaf89951a4 Mon Sep 17 00:00:00 2001 From: foreman Date: Wed, 29 May 2019 17:27:48 -0400 Subject: [PATCH] P4 to Git Change 1789157 by vsytchen@vsytchen-remote-ocl-win10 on 2019/05/29 16:23:11 SWDEV-185452 - Offline compilation failing on a VM, producing error CL_PLATFORM_NOT_FOUND_KHR 1. Don't load a platform if there are no devices available for it. If there is no platform that has visible devices, only allow the PAL platform to load. ReviewBoardURL = http://ocltc.amd.com/reviews/r/17419/diff/ Affected files ... ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_icd.cpp#34 edit ... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.cpp#19 edit ... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#309 edit --- rocclr/runtime/utils/flags.cpp | 7 +++++++ rocclr/runtime/utils/flags.hpp | 2 ++ 2 files changed, 9 insertions(+) diff --git a/rocclr/runtime/utils/flags.cpp b/rocclr/runtime/utils/flags.cpp index adf20b3d5d..50e0576845 100644 --- a/rocclr/runtime/utils/flags.cpp +++ b/rocclr/runtime/utils/flags.cpp @@ -66,6 +66,13 @@ namespace amd { #endif // __APPLE__ bool IS_HIP = false; + +#if defined(WITH_GPU_DEVICE) +bool IS_LEGACY = true; +#else +bool IS_LEGACY = false; +#endif + // static char* Flag::envstr_; diff --git a/rocclr/runtime/utils/flags.hpp b/rocclr/runtime/utils/flags.hpp index 24226ab715..14699238a5 100644 --- a/rocclr/runtime/utils/flags.hpp +++ b/rocclr/runtime/utils/flags.hpp @@ -188,6 +188,8 @@ namespace amd { extern bool IS_HIP; +extern bool IS_LEGACY; + //! \addtogroup Utils // @{