diff --git a/projects/clr/rocclr/runtime/device/cpu/cpudevice.cpp b/projects/clr/rocclr/runtime/device/cpu/cpudevice.cpp index a305a9f961..bf39c6a7dd 100644 --- a/projects/clr/rocclr/runtime/device/cpu/cpudevice.cpp +++ b/projects/clr/rocclr/runtime/device/cpu/cpudevice.cpp @@ -266,7 +266,7 @@ Device::init() info.executionCapabilities_ = CL_EXEC_KERNEL | CL_EXEC_NATIVE_KERNEL; // Enable SVM only for OpenCL 2.0 - if ((OPENCL_MAJOR >= 2) && (CPU_OPENCL_VERSION >= 200)) { + if (((OPENCL_MAJOR >= 2) && (CPU_OPENCL_VERSION >= 200)) || OCL_FORCE_CPU_SVM) { info.svmCapabilities_ = CL_DEVICE_SVM_COARSE_GRAIN_BUFFER | CL_DEVICE_SVM_FINE_GRAIN_BUFFER | CL_DEVICE_SVM_FINE_GRAIN_SYSTEM | diff --git a/projects/clr/rocclr/runtime/utils/flags.hpp b/projects/clr/rocclr/runtime/utils/flags.hpp index 05a4710960..a32e4132aa 100644 --- a/projects/clr/rocclr/runtime/utils/flags.hpp +++ b/projects/clr/rocclr/runtime/utils/flags.hpp @@ -170,6 +170,9 @@ release(bool, HSAIL_IMAGE_HANDLE_ENABLE, false, \ "Pass image/sampler SRD as pointer instead of blob") \ debug(bool, GPU_FORCE_SINGLE_FP_DENORM, false, \ "Forces reporting CL_FP_DENORM bit for single precision") \ +debug(bool, OCL_FORCE_CPU_SVM, false, \ + "force svm support for CPU") \ + namespace amd {