Files
compute-runtime/opencl/test/unit_test/test_macros/test_checks_ocl.cpp
Andrzej Swierczynski 0dfcfff89c Return error when device does not support Intermediate Language Programs
clGetDeviceInfo, clGetProgramInfo, clCreateProgramWithIL and
clSetProgramSpecializationConstant return errors when Intermediate
Language Programs are not supported

Related-To: NEO-4368

Change-Id: I0bdc218c3cc57ea7ac698cd1db6c85687a8f9f4c
Signed-off-by: Andrzej Swierczynski <andrzej.swierczynski@intel.com>
2020-04-28 18:30:06 +02:00

28 lines
677 B
C++

/*
* Copyright (C) 2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "opencl/test/unit_test/test_macros/test_checks_ocl.h"
#include "shared/source/device/device_info.h"
#include "opencl/source/cl_device/cl_device.h"
#include "opencl/source/context/context.h"
using namespace NEO;
bool TestChecks::supportsSvm(const ClDevice *pClDevice) {
return supportsSvm(&pClDevice->getDevice());
}
bool TestChecks::supportsImages(const Context *pContext) {
return pContext->getDevice(0)->getSharedDeviceInfo().imageSupport;
}
bool TestChecks::supportsOcl21(const Context *pContext) {
return pContext->getDevice(0)->getEnabledClVersion() >= 21;
}