Remove duplicated fields from ClDeviceInfo

Related-To: NEO-3938

Change-Id: Ic13d69eaf2ba54794f82d78b058c960f27a6c29d
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2020-03-12 09:33:20 +01:00
committed by sys_ocldev
parent 196409f24c
commit 3b149b69a7
46 changed files with 371 additions and 430 deletions

View File

@@ -3485,7 +3485,7 @@ void *clHostMemAllocINTEL(
return nullptr;
}
if (size > neoContext->getDevice(0u)->getDeviceInfo().maxMemAllocSize && !unifiedMemoryProperties.allocationFlags.flags.allowUnrestrictedSize) {
if (size > neoContext->getDevice(0u)->getSharedDeviceInfo().maxMemAllocSize && !unifiedMemoryProperties.allocationFlags.flags.allowUnrestrictedSize) {
err.set(CL_INVALID_BUFFER_SIZE);
return nullptr;
}
@@ -3521,7 +3521,7 @@ void *clDeviceMemAllocINTEL(
return nullptr;
}
if (size > neoContext->getDevice(0u)->getDeviceInfo().maxMemAllocSize && !unifiedMemoryProperties.allocationFlags.flags.allowUnrestrictedSize) {
if (size > neoContext->getDevice(0u)->getSharedDeviceInfo().maxMemAllocSize && !unifiedMemoryProperties.allocationFlags.flags.allowUnrestrictedSize) {
err.set(CL_INVALID_BUFFER_SIZE);
return nullptr;
}
@@ -3560,7 +3560,7 @@ void *clSharedMemAllocINTEL(
return nullptr;
}
if (size > neoContext->getDevice(0u)->getDeviceInfo().maxMemAllocSize && !unifiedMemoryProperties.allocationFlags.flags.allowUnrestrictedSize) {
if (size > neoContext->getDevice(0u)->getSharedDeviceInfo().maxMemAllocSize && !unifiedMemoryProperties.allocationFlags.flags.allowUnrestrictedSize) {
err.set(CL_INVALID_BUFFER_SIZE);
return nullptr;
}
@@ -4088,7 +4088,7 @@ void *CL_API_CALL clSVMAlloc(cl_context context,
}
auto pDevice = pContext->getDevice(0);
if ((size == 0) || (size > pDevice->getDeviceInfo().maxMemAllocSize)) {
if ((size == 0) || (size > pDevice->getSharedDeviceInfo().maxMemAllocSize)) {
TRACING_EXIT(clSVMAlloc, &pAlloc);
return pAlloc;
}
@@ -4731,7 +4731,7 @@ cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties(cl_context conte
auto commandQueueProperties = getCmdQueueProperties<cl_command_queue_properties>(properties);
uint32_t maxOnDeviceQueueSize = pDevice->getDeviceInfo().queueOnDeviceMaxSize;
uint32_t maxOnDeviceQueues = pDevice->getDeviceInfo().maxOnDeviceQueues;
uint32_t maxOnDeviceQueues = pDevice->getSharedDeviceInfo().maxOnDeviceQueues;
if (commandQueueProperties & static_cast<cl_command_queue_properties>(CL_QUEUE_ON_DEVICE)) {
if (!(commandQueueProperties & static_cast<cl_command_queue_properties>(CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE))) {

View File

@@ -8,6 +8,7 @@ set(RUNTIME_SRCS_DEVICE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/cl_device.cpp
${CMAKE_CURRENT_SOURCE_DIR}/cl_device.h
${CMAKE_CURRENT_SOURCE_DIR}/cl_device_get_cap.inl
${CMAKE_CURRENT_SOURCE_DIR}/cl_device_vector.h
${CMAKE_CURRENT_SOURCE_DIR}/device_caps.cpp
${CMAKE_CURRENT_SOURCE_DIR}/device_info.cpp

View File

@@ -50,7 +50,7 @@ ClDevice::ClDevice(Device &device, Platform *platform) : device(device), platfor
subDevices.push_back(std::move(pClSubDevice));
}
}
if (deviceInfo.debuggerActive) {
if (getSharedDeviceInfo().debuggerActive) {
auto osInterface = device.getRootDeviceEnvironment().osInterface.get();
getSourceLevelDebugger()->notifyNewDevice(osInterface ? osInterface->getDeviceHandle() : 0);
}
@@ -58,7 +58,7 @@ ClDevice::ClDevice(Device &device, Platform *platform) : device(device), platfor
ClDevice::~ClDevice() {
if (deviceInfo.debuggerActive) {
if (getSharedDeviceInfo().debuggerActive) {
getSourceLevelDebugger()->notifyDeviceDestruction();
}
@@ -97,6 +97,10 @@ unique_ptr_if_unused<ClDevice> ClDevice::releaseApi() {
return this->decRefApi();
}
const DeviceInfo &ClDevice::getSharedDeviceInfo() const {
return device.getDeviceInfo();
}
ClDevice *ClDevice::getDeviceById(uint32_t deviceId) {
UNRECOVERABLE_IF(deviceId >= getNumAvailableDevices());
if (subDevices.empty()) {

View File

@@ -10,7 +10,7 @@
#include "shared/source/utilities/reference_tracked_object.h"
#include "opencl/source/api/cl_types.h"
#include "opencl/source/device/device_info_map.h"
#include "opencl/source/device/device_info.h"
#include "opencl/source/helpers/base_object.h"
#include "engine_node.h"
@@ -108,12 +108,12 @@ class ClDevice : public BaseObject<_cl_device_id> {
Device &getDevice() const noexcept { return device; }
const ClDeviceInfo &getDeviceInfo() const { return deviceInfo; }
const DeviceInfo &getSharedDeviceInfo() const;
ClDevice *getDeviceById(uint32_t deviceId);
const std::string &peekCompilerExtensions() const;
std::unique_ptr<SyncBufferHandler> syncBufferHandler;
protected:
void copyCommonCapsFromDevice();
void initializeCaps();
void initializeExtraCaps();
void setupFp64Flags();
@@ -134,12 +134,4 @@ class ClDevice : public BaseObject<_cl_device_id> {
std::string compilerExtensions;
};
template <cl_device_info Param>
inline void ClDevice::getCap(const void *&src,
size_t &size,
size_t &retSize) {
src = &DeviceInfoTable::Map<Param>::getValue(deviceInfo);
retSize = size = DeviceInfoTable::Map<Param>::size;
}
} // namespace NEO

View File

@@ -0,0 +1,21 @@
/*
* Copyright (C) 2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "opencl/source/device/cl_device.h"
#include "opencl/source/device/device_info_map.h"
namespace NEO {
template <cl_device_info Param>
inline void ClDevice::getCap(const void *&src,
size_t &size,
size_t &retSize) {
src = &DeviceInfoTable::Map<Param>::getValue(*this);
retSize = size = DeviceInfoTable::Map<Param>::size;
}
} // namespace NEO

View File

@@ -179,51 +179,10 @@ void Device::initializeCaps() {
}
}
void ClDevice::copyCommonCapsFromDevice() {
auto &sourceDeviceInfo = device.getDeviceInfo();
deviceInfo.maxSubGroups = sourceDeviceInfo.maxSubGroups;
deviceInfo.debuggerActive = sourceDeviceInfo.debuggerActive;
deviceInfo.errorCorrectionSupport = sourceDeviceInfo.errorCorrectionSupport;
deviceInfo.force32BitAddressess = sourceDeviceInfo.force32BitAddressess;
deviceInfo.imageSupport = sourceDeviceInfo.imageSupport;
deviceInfo.vmeAvcSupportsPreemption = sourceDeviceInfo.vmeAvcSupportsPreemption;
deviceInfo.ilVersion = sourceDeviceInfo.ilVersion;
deviceInfo.profilingTimerResolution = sourceDeviceInfo.profilingTimerResolution;
deviceInfo.addressBits = sourceDeviceInfo.addressBits;
deviceInfo.computeUnitsUsedForScratch = sourceDeviceInfo.computeUnitsUsedForScratch;
deviceInfo.globalMemCachelineSize = sourceDeviceInfo.globalMemCachelineSize;
deviceInfo.maxClockFrequency = sourceDeviceInfo.maxClockFrequency;
deviceInfo.maxFrontEndThreads = sourceDeviceInfo.maxFrontEndThreads;
deviceInfo.maxOnDeviceQueues = sourceDeviceInfo.maxOnDeviceQueues;
deviceInfo.maxReadImageArgs = sourceDeviceInfo.maxReadImageArgs;
deviceInfo.maxSamplers = sourceDeviceInfo.maxSamplers;
deviceInfo.maxWriteImageArgs = sourceDeviceInfo.maxWriteImageArgs;
deviceInfo.numThreadsPerEU = sourceDeviceInfo.numThreadsPerEU;
deviceInfo.vendorId = sourceDeviceInfo.vendorId;
deviceInfo.globalMemSize = sourceDeviceInfo.globalMemSize;
deviceInfo.image2DMaxHeight = static_cast<size_t>(sourceDeviceInfo.image2DMaxHeight);
deviceInfo.image2DMaxWidth = static_cast<size_t>(sourceDeviceInfo.image2DMaxWidth);
deviceInfo.image3DMaxDepth = static_cast<size_t>(sourceDeviceInfo.image3DMaxDepth);
deviceInfo.imageMaxArraySize = static_cast<size_t>(sourceDeviceInfo.imageMaxArraySize);
deviceInfo.imageMaxBufferSize = static_cast<size_t>(sourceDeviceInfo.imageMaxBufferSize);
deviceInfo.localMemSize = sourceDeviceInfo.localMemSize;
deviceInfo.maxMemAllocSize = sourceDeviceInfo.maxMemAllocSize;
deviceInfo.maxNumEUsPerSubSlice = static_cast<size_t>(sourceDeviceInfo.maxNumEUsPerSubSlice);
deviceInfo.maxParameterSize = static_cast<size_t>(sourceDeviceInfo.maxParameterSize);
deviceInfo.maxWorkGroupSize = static_cast<size_t>(sourceDeviceInfo.maxWorkGroupSize);
deviceInfo.maxWorkItemSizes[0] = static_cast<size_t>(sourceDeviceInfo.maxWorkItemSizes[0]);
deviceInfo.maxWorkItemSizes[1] = static_cast<size_t>(sourceDeviceInfo.maxWorkItemSizes[1]);
deviceInfo.maxWorkItemSizes[2] = static_cast<size_t>(sourceDeviceInfo.maxWorkItemSizes[2]);
deviceInfo.outProfilingTimerResolution = static_cast<size_t>(sourceDeviceInfo.outProfilingTimerResolution);
deviceInfo.printfBufferSize = static_cast<size_t>(sourceDeviceInfo.printfBufferSize);
}
void ClDevice::initializeCaps() {
copyCommonCapsFromDevice();
auto &hwInfo = getHardwareInfo();
auto hwInfoConfig = HwInfoConfig::get(hwInfo.platform.eProductFamily);
auto &sharedDeviceInfo = getSharedDeviceInfo();
deviceExtensions.clear();
deviceExtensions.append(deviceExtensionsList);
@@ -405,7 +364,7 @@ void ClDevice::initializeCaps() {
// OpenCL 1.2 requires 128MB minimum
deviceInfo.maxConstantBufferSize = deviceInfo.maxMemAllocSize;
deviceInfo.maxConstantBufferSize = sharedDeviceInfo.maxMemAllocSize;
deviceInfo.maxWorkItemDimensions = 3;
@@ -415,13 +374,13 @@ void ClDevice::initializeCaps() {
auto simdSizeUsed = DebugManager.flags.UseMaxSimdSizeToDeduceMaxWorkgroupSize.get() ? 32u : hwHelper.getMinimalSIMDSize();
// calculate a maximum number of subgroups in a workgroup (for the required SIMD size)
deviceInfo.maxNumOfSubGroups = static_cast<uint32_t>(deviceInfo.maxWorkGroupSize / simdSizeUsed);
deviceInfo.maxNumOfSubGroups = static_cast<uint32_t>(sharedDeviceInfo.maxWorkGroupSize / simdSizeUsed);
deviceInfo.singleFpConfig |= defaultFpFlags;
deviceInfo.halfFpConfig = defaultFpFlags;
printDebugString(DebugManager.flags.PrintDebugMessages.get(), stderr, "computeUnitsUsedForScratch: %d\n", deviceInfo.computeUnitsUsedForScratch);
printDebugString(DebugManager.flags.PrintDebugMessages.get(), stderr, "computeUnitsUsedForScratch: %d\n", sharedDeviceInfo.computeUnitsUsedForScratch);
printDebugString(DebugManager.flags.PrintDebugMessages.get(), stderr, "hwInfo: {%d, %d}: (%d, %d, %d)\n",
systemInfo.EUCount,
@@ -450,7 +409,7 @@ void ClDevice::initializeCaps() {
(CL_DEVICE_SVM_FINE_GRAIN_BUFFER | CL_DEVICE_SVM_ATOMICS));
deviceInfo.preemptionSupported = false;
deviceInfo.maxGlobalVariableSize = 64 * 1024;
deviceInfo.globalVariablePreferredTotalSize = static_cast<size_t>(deviceInfo.maxMemAllocSize);
deviceInfo.globalVariablePreferredTotalSize = static_cast<size_t>(sharedDeviceInfo.maxMemAllocSize);
deviceInfo.planarYuvMaxWidth = 16384;
deviceInfo.planarYuvMaxHeight = 16352;

View File

@@ -12,6 +12,7 @@
#include "shared/source/os_interface/os_time.h"
#include "opencl/source/device/cl_device.h"
#include "opencl/source/device/cl_device_get_cap.inl"
#include "opencl/source/device/cl_device_vector.h"
#include "opencl/source/device/device_info_map.h"
#include "opencl/source/helpers/cl_device_helpers.h"
@@ -26,16 +27,16 @@ template <cl_device_info Param>
inline void ClDevice::getStr(const void *&src,
size_t &size,
size_t &retSize) {
src = Map<Param>::getValue(deviceInfo);
retSize = size = strlen(Map<Param>::getValue(deviceInfo)) + 1;
src = Map<Param>::getValue(*this);
retSize = size = strlen(Map<Param>::getValue(*this)) + 1;
}
template <>
inline void ClDevice::getCap<CL_DEVICE_MAX_WORK_ITEM_SIZES>(const void *&src,
size_t &size,
size_t &retSize) {
src = deviceInfo.maxWorkItemSizes;
retSize = size = sizeof(deviceInfo.maxWorkItemSizes);
src = getSharedDeviceInfo().maxWorkItemSizes;
retSize = size = sizeof(getSharedDeviceInfo().maxWorkItemSizes);
}
template <>
@@ -50,8 +51,8 @@ template <>
inline void ClDevice::getCap<CL_DEVICE_SUB_GROUP_SIZES_INTEL>(const void *&src,
size_t &size,
size_t &retSize) {
src = device.getDeviceInfo().maxSubGroups.begin();
retSize = size = (device.getDeviceInfo().maxSubGroups.size() * sizeof(size_t));
src = getSharedDeviceInfo().maxSubGroups.begin();
retSize = size = (getSharedDeviceInfo().maxSubGroups.size() * sizeof(size_t));
}
cl_int ClDevice::getDeviceInfo(cl_device_info paramName,
@@ -184,7 +185,7 @@ cl_int ClDevice::getDeviceInfo(cl_device_info paramName,
break;
}
default:
if (getDeviceInfoForImage(paramName, src, srcSize, retSize) && !deviceInfo.imageSupport) {
if (getDeviceInfoForImage(paramName, src, srcSize, retSize) && !getSharedDeviceInfo().imageSupport) {
src = &value;
break;
}

View File

@@ -17,33 +17,19 @@
// clang-format off
struct ClDeviceInfo {
StackVec<size_t, 3> maxSubGroups;
cl_device_type deviceType;
size_t maxWorkGroupSize;
size_t maxNumEUsPerSubSlice;
size_t maxSliceCount;
cl_ulong maxMemAllocSize;
size_t imageMaxBufferSize;
size_t image2DMaxWidth;
size_t image2DMaxHeight;
size_t image3DMaxWidth;
size_t image3DMaxHeight;
size_t image3DMaxDepth;
size_t imageMaxArraySize;
size_t maxBufferSize;
size_t maxArraySize;
size_t maxParameterSize;
cl_device_fp_config singleFpConfig;
cl_device_fp_config halfFpConfig;
cl_device_fp_config doubleFpConfig;
cl_ulong globalMemCacheSize;
cl_ulong globalMemSize;
cl_ulong maxConstantBufferSize;
size_t maxGlobalVariableSize;
size_t globalVariablePreferredTotalSize;
cl_ulong localMemSize;
double profilingTimerResolution;
size_t outProfilingTimerResolution;
cl_device_exec_capabilities executionCapabilities;
cl_command_queue_properties queueOnHostProperties;
cl_command_queue_properties queueOnDeviceProperties;
@@ -57,19 +43,15 @@ struct ClDeviceInfo {
const char *clCVersion;
const char *spirVersions;
const char *deviceExtensions;
size_t printfBufferSize;
cl_device_id parentDevice;
cl_device_affinity_domain partitionAffinityDomain;
cl_uint partitionMaxSubDevices;
cl_device_partition_property partitionProperties[2];
cl_device_partition_property partitionType[3];
cl_device_svm_capabilities svmCapabilities;
const char *ilVersion;
double platformHostTimerResolution;
size_t planarYuvMaxWidth;
size_t planarYuvMaxHeight;
size_t maxWorkItemSizes[3];
cl_uint vendorId;
cl_uint maxComputUnits;
cl_uint maxWorkItemDimensions;
cl_uint maxNumOfSubGroups;
@@ -88,14 +70,7 @@ struct ClDeviceInfo {
cl_uint nativeVectorWidthFloat;
cl_uint nativeVectorWidthDouble;
cl_uint nativeVectorWidthHalf;
cl_uint numThreadsPerEU;
cl_uint maxClockFrequency;
cl_uint addressBits;
cl_bool imageSupport;
cl_uint maxReadImageArgs;
cl_uint maxWriteImageArgs;
cl_uint maxReadWriteImageArgs;
cl_uint maxSamplers;
cl_uint imagePitchAlignment;
cl_uint imageBaseAddressAlignment;
cl_uint maxPipeArgs;
@@ -104,17 +79,14 @@ struct ClDeviceInfo {
cl_uint memBaseAddressAlign;
cl_uint minDataTypeAlignSize;
cl_device_mem_cache_type globalMemCacheType;
cl_uint globalMemCachelineSize;
cl_uint maxConstantArgs;
cl_device_local_mem_type localMemType;
cl_bool errorCorrectionSupport;
cl_bool endianLittle;
cl_bool deviceAvailable;
cl_bool compilerAvailable;
cl_bool linkerAvailable;
cl_uint queueOnDevicePreferredSize;
cl_uint queueOnDeviceMaxSize;
cl_uint maxOnDeviceQueues;
cl_uint maxOnDeviceEvents;
cl_bool preferredInteropUserSync;
cl_uint referenceCount;
@@ -122,22 +94,17 @@ struct ClDeviceInfo {
cl_uint preferredGlobalAtomicAlignment;
cl_uint preferredLocalAtomicAlignment;
cl_bool hostUnifiedMemory;
uint32_t computeUnitsUsedForScratch;
uint32_t maxFrontEndThreads;
cl_bool vmeAvcSupportsPreemption;
cl_bool vmeAvcSupportsTextureSampler;
cl_uint vmeAvcVersion;
cl_uint vmeVersion;
cl_uint internalDriverVersion;
cl_uint grfSize;
bool force32BitAddressess;
bool preemptionSupported;
/* Extensions supported */
bool nv12Extension;
bool vmeExtension;
bool platformLP;
bool packedYuvExtension;
bool debuggerActive;
/*Unified Shared Memory Capabilites*/
cl_unified_shared_memory_capabilities_intel hostMemCapabilities;
cl_unified_shared_memory_capabilities_intel deviceMemCapabilities;
@@ -149,17 +116,27 @@ struct ClDeviceInfo {
struct DeviceInfo {
StackVec<size_t, 3> maxSubGroups;
bool debuggerActive;
bool errorCorrectionSupport;
bool force32BitAddressess;
bool imageSupport;
bool sharedSystemAllocationsSupport;
bool vmeAvcSupportsPreemption;
const char *ilVersion;
double profilingTimerResolution;
uint64_t globalMemSize;
uint64_t localMemSize;
uint64_t maxMemAllocSize;
const char *ilVersion;
size_t image2DMaxHeight;
size_t image2DMaxWidth;
size_t image3DMaxDepth;
size_t imageMaxArraySize;
size_t imageMaxBufferSize;
size_t maxNumEUsPerSubSlice;
size_t maxParameterSize;
size_t maxWorkGroupSize;
size_t maxWorkItemSizes[3];
size_t outProfilingTimerResolution;
size_t printfBufferSize;
uint32_t addressBits;
uint32_t computeUnitsUsedForScratch;
uint32_t errorCorrectionSupport;
uint32_t globalMemCachelineSize;
uint32_t imageSupport;
uint32_t maxClockFrequency;
uint32_t maxFrontEndThreads;
uint32_t maxOnDeviceQueues;
@@ -168,18 +145,8 @@ struct DeviceInfo {
uint32_t maxWriteImageArgs;
uint32_t numThreadsPerEU;
uint32_t vendorId;
uint64_t globalMemSize;
uint64_t image2DMaxHeight;
uint64_t image2DMaxWidth;
uint64_t image3DMaxDepth;
uint64_t imageMaxArraySize;
uint64_t imageMaxBufferSize;
uint64_t localMemSize;
uint64_t maxMemAllocSize;
uint64_t maxNumEUsPerSubSlice;
uint64_t maxParameterSize;
uint64_t maxWorkGroupSize;
uint64_t maxWorkItemSizes[3];
uint64_t outProfilingTimerResolution;
uint64_t printfBufferSize;
uint32_t vmeAvcSupportsPreemption;
bool debuggerActive;
bool force32BitAddressess;
bool sharedSystemAllocationsSupport;
};

View File

@@ -7,6 +7,7 @@
#pragma once
#include "opencl/extensions/public/cl_ext_private.h"
#include "opencl/source/device/cl_device.h"
#include "opencl/source/device/device_info.h"
#include "CL/cl_ext_intel.h"
@@ -14,14 +15,26 @@
#include <CL/cl_ext.h>
namespace DeviceInfoTable {
template <cl_device_info Param, typename _Type, _Type ClDeviceInfo::*val>
struct ClMapBase {
enum { param = Param };
typedef _Type Type;
enum { size = sizeof(Type) };
static const Type &getValue(const NEO::ClDevice &clDevice) {
return clDevice.getDeviceInfo().*val;
}
};
template <cl_device_info Param, typename _Type, _Type DeviceInfo::*val>
struct MapBase {
enum { param = Param };
typedef _Type Type;
enum { size = sizeof(Type) };
static const Type &getValue(const ClDeviceInfo &deviceInfo) {
return deviceInfo.*val;
static const Type &getValue(const NEO::ClDevice &clDevice) {
return clDevice.getSharedDeviceInfo().*val;
}
};
@@ -37,110 +50,112 @@ struct Map {};
//////////////////////////////////////////////////////
// clang-format off
// please keep alphabetical order
template<> struct Map<CL_DEVICE_ADDRESS_BITS > : public MapBase<CL_DEVICE_ADDRESS_BITS, unsigned int, &ClDeviceInfo::addressBits> {};
template<> struct Map<CL_DEVICE_AVAILABLE > : public MapBase<CL_DEVICE_AVAILABLE, uint32_t, &ClDeviceInfo::deviceAvailable> {};
template<> struct Map<CL_DEVICE_AVC_ME_SUPPORTS_PREEMPTION_INTEL > : public MapBase<CL_DEVICE_AVC_ME_SUPPORTS_PREEMPTION_INTEL, uint32_t, &ClDeviceInfo::vmeAvcSupportsPreemption> {};
template<> struct Map<CL_DEVICE_AVC_ME_SUPPORTS_TEXTURE_SAMPLER_USE_INTEL > : public MapBase<CL_DEVICE_AVC_ME_SUPPORTS_TEXTURE_SAMPLER_USE_INTEL, uint32_t, &ClDeviceInfo::vmeAvcSupportsTextureSampler> {};
template<> struct Map<CL_DEVICE_AVC_ME_VERSION_INTEL > : public MapBase<CL_DEVICE_AVC_ME_VERSION_INTEL, uint32_t, &ClDeviceInfo::vmeAvcVersion> {};
template<> struct Map<CL_DEVICE_BUILT_IN_KERNELS > : public MapBase<CL_DEVICE_BUILT_IN_KERNELS, const char *, &ClDeviceInfo::builtInKernels> {};
template<> struct Map<CL_DEVICE_COMPILER_AVAILABLE > : public MapBase<CL_DEVICE_COMPILER_AVAILABLE, uint32_t, &ClDeviceInfo::compilerAvailable> {};
template<> struct Map<CL_DEVICE_CROSS_DEVICE_SHARED_MEM_CAPABILITIES_INTEL > : public MapBase<CL_DEVICE_CROSS_DEVICE_SHARED_MEM_CAPABILITIES_INTEL, uint64_t, &ClDeviceInfo::crossDeviceSharedMemCapabilities> {};
template<> struct Map<CL_DEVICE_DEVICE_MEM_CAPABILITIES_INTEL > : public MapBase<CL_DEVICE_DEVICE_MEM_CAPABILITIES_INTEL, uint64_t, &ClDeviceInfo::deviceMemCapabilities> {};
template<> struct Map<CL_DEVICE_DOUBLE_FP_CONFIG > : public MapBase<CL_DEVICE_DOUBLE_FP_CONFIG, uint64_t, &ClDeviceInfo::doubleFpConfig> {};
template<> struct Map<CL_DEVICE_DRIVER_VERSION_INTEL > : public MapBase<CL_DEVICE_DRIVER_VERSION_INTEL, uint32_t, &ClDeviceInfo::internalDriverVersion> {};
template<> struct Map<CL_DEVICE_ENDIAN_LITTLE > : public MapBase<CL_DEVICE_ENDIAN_LITTLE, uint32_t, &ClDeviceInfo::endianLittle> {};
template<> struct Map<CL_DEVICE_ERROR_CORRECTION_SUPPORT > : public MapBase<CL_DEVICE_ERROR_CORRECTION_SUPPORT, uint32_t, &ClDeviceInfo::errorCorrectionSupport> {};
template<> struct Map<CL_DEVICE_EXECUTION_CAPABILITIES > : public MapBase<CL_DEVICE_EXECUTION_CAPABILITIES, uint64_t, &ClDeviceInfo::executionCapabilities> {};
template<> struct Map<CL_DEVICE_EXTENSIONS > : public MapBase<CL_DEVICE_EXTENSIONS, const char *, &ClDeviceInfo::deviceExtensions> {};
template<> struct Map<CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE > : public MapBase<CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE, unsigned int, &ClDeviceInfo::globalMemCachelineSize> {};
template<> struct Map<CL_DEVICE_GLOBAL_MEM_CACHE_SIZE > : public MapBase<CL_DEVICE_GLOBAL_MEM_CACHE_SIZE, uint64_t, &ClDeviceInfo::globalMemCacheSize> {};
template<> struct Map<CL_DEVICE_GLOBAL_MEM_CACHE_TYPE > : public MapBase<CL_DEVICE_GLOBAL_MEM_CACHE_TYPE, uint32_t, &ClDeviceInfo::globalMemCacheType> {};
template<> struct Map<CL_DEVICE_GLOBAL_MEM_SIZE > : public MapBase<CL_DEVICE_GLOBAL_MEM_SIZE, uint64_t, &ClDeviceInfo::globalMemSize> {};
template<> struct Map<CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE > : public MapBase<CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE, size_t, &ClDeviceInfo::globalVariablePreferredTotalSize> {};
template<> struct Map<CL_DEVICE_HALF_FP_CONFIG > : public MapBase<CL_DEVICE_HALF_FP_CONFIG, uint64_t, &ClDeviceInfo::halfFpConfig> {};
template<> struct Map<CL_DEVICE_HOST_MEM_CAPABILITIES_INTEL > : public MapBase<CL_DEVICE_HOST_MEM_CAPABILITIES_INTEL, uint64_t, &ClDeviceInfo::hostMemCapabilities> {};
template<> struct Map<CL_DEVICE_HOST_UNIFIED_MEMORY > : public MapBase<CL_DEVICE_HOST_UNIFIED_MEMORY, uint32_t, &ClDeviceInfo::hostUnifiedMemory> {};
template<> struct Map<CL_DEVICE_IL_VERSION > : public MapBase<CL_DEVICE_IL_VERSION, const char *, &ClDeviceInfo::ilVersion> {};
template<> struct Map<CL_DEVICE_IMAGE2D_MAX_HEIGHT > : public MapBase<CL_DEVICE_IMAGE2D_MAX_HEIGHT, size_t, &ClDeviceInfo::image2DMaxHeight> {};
template<> struct Map<CL_DEVICE_IMAGE2D_MAX_WIDTH > : public MapBase<CL_DEVICE_IMAGE2D_MAX_WIDTH, size_t, &ClDeviceInfo::image2DMaxWidth> {};
template<> struct Map<CL_DEVICE_IMAGE3D_MAX_DEPTH > : public MapBase<CL_DEVICE_IMAGE3D_MAX_DEPTH, size_t, &ClDeviceInfo::image3DMaxDepth> {};
template<> struct Map<CL_DEVICE_IMAGE3D_MAX_HEIGHT > : public MapBase<CL_DEVICE_IMAGE3D_MAX_HEIGHT, size_t, &ClDeviceInfo::image3DMaxHeight> {};
template<> struct Map<CL_DEVICE_IMAGE3D_MAX_WIDTH > : public MapBase<CL_DEVICE_IMAGE3D_MAX_WIDTH, size_t, &ClDeviceInfo::image3DMaxWidth> {};
template<> struct Map<CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT > : public MapBase<CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT, uint32_t, &ClDeviceInfo::imageBaseAddressAlignment> {};
template<> struct Map<CL_DEVICE_IMAGE_MAX_ARRAY_SIZE > : public MapBase<CL_DEVICE_IMAGE_MAX_ARRAY_SIZE, size_t, &ClDeviceInfo::imageMaxArraySize> {};
template<> struct Map<CL_DEVICE_IMAGE_MAX_BUFFER_SIZE > : public MapBase<CL_DEVICE_IMAGE_MAX_BUFFER_SIZE, size_t, &ClDeviceInfo::imageMaxBufferSize> {};
template<> struct Map<CL_DEVICE_IMAGE_PITCH_ALIGNMENT > : public MapBase<CL_DEVICE_IMAGE_PITCH_ALIGNMENT, uint32_t, &ClDeviceInfo::imagePitchAlignment> {};
template<> struct Map<CL_DEVICE_IMAGE_SUPPORT > : public MapBase<CL_DEVICE_IMAGE_SUPPORT, uint32_t, &ClDeviceInfo::imageSupport> {};
template<> struct Map<CL_DEVICE_LINKER_AVAILABLE > : public MapBase<CL_DEVICE_LINKER_AVAILABLE, uint32_t, &ClDeviceInfo::linkerAvailable> {};
template<> struct Map<CL_DEVICE_LOCAL_MEM_SIZE > : public MapBase<CL_DEVICE_LOCAL_MEM_SIZE, uint64_t, &ClDeviceInfo::localMemSize> {};
template<> struct Map<CL_DEVICE_LOCAL_MEM_TYPE > : public MapBase<CL_DEVICE_LOCAL_MEM_TYPE, uint32_t, &ClDeviceInfo::localMemType> {};
template<> struct Map<CL_DEVICE_MAX_CLOCK_FREQUENCY > : public MapBase<CL_DEVICE_MAX_CLOCK_FREQUENCY, uint32_t, &ClDeviceInfo::maxClockFrequency> {};
template<> struct Map<CL_DEVICE_MAX_COMPUTE_UNITS > : public MapBase<CL_DEVICE_MAX_COMPUTE_UNITS, uint32_t, &ClDeviceInfo::maxComputUnits> {};
template<> struct Map<CL_DEVICE_MAX_CONSTANT_ARGS > : public MapBase<CL_DEVICE_MAX_CONSTANT_ARGS, uint32_t, &ClDeviceInfo::maxConstantArgs> {};
template<> struct Map<CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE > : public MapBase<CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE, uint64_t, &ClDeviceInfo::maxConstantBufferSize> {};
template<> struct Map<CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE > : public MapBase<CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE, size_t, &ClDeviceInfo::maxGlobalVariableSize> {};
template<> struct Map<CL_DEVICE_MAX_MEM_ALLOC_SIZE > : public MapBase<CL_DEVICE_MAX_MEM_ALLOC_SIZE, uint64_t, &ClDeviceInfo::maxMemAllocSize> {};
template<> struct Map<CL_DEVICE_MAX_NUM_SUB_GROUPS > : public MapBase<CL_DEVICE_MAX_NUM_SUB_GROUPS, uint32_t, &ClDeviceInfo::maxNumOfSubGroups> {};
template<> struct Map<CL_DEVICE_MAX_ON_DEVICE_EVENTS > : public MapBase<CL_DEVICE_MAX_ON_DEVICE_EVENTS, uint32_t, &ClDeviceInfo::maxOnDeviceEvents> {};
template<> struct Map<CL_DEVICE_MAX_ON_DEVICE_QUEUES > : public MapBase<CL_DEVICE_MAX_ON_DEVICE_QUEUES, uint32_t, &ClDeviceInfo::maxOnDeviceQueues> {};
template<> struct Map<CL_DEVICE_MAX_PARAMETER_SIZE > : public MapBase<CL_DEVICE_MAX_PARAMETER_SIZE, size_t, &ClDeviceInfo::maxParameterSize> {};
template<> struct Map<CL_DEVICE_MAX_PIPE_ARGS > : public MapBase<CL_DEVICE_MAX_PIPE_ARGS, uint32_t, &ClDeviceInfo::maxPipeArgs> {};
template<> struct Map<CL_DEVICE_MAX_READ_IMAGE_ARGS > : public MapBase<CL_DEVICE_MAX_READ_IMAGE_ARGS, uint32_t, &ClDeviceInfo::maxReadImageArgs> {};
template<> struct Map<CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS > : public MapBase<CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS, uint32_t, &ClDeviceInfo::maxReadWriteImageArgs> {};
template<> struct Map<CL_DEVICE_MAX_SAMPLERS > : public MapBase<CL_DEVICE_MAX_SAMPLERS, uint32_t, &ClDeviceInfo::maxSamplers> {};
template<> struct Map<CL_DEVICE_MAX_WORK_GROUP_SIZE > : public MapBase<CL_DEVICE_MAX_WORK_GROUP_SIZE, size_t, &ClDeviceInfo::maxWorkGroupSize> {};
template<> struct Map<CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS > : public MapBase<CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS, uint32_t, &ClDeviceInfo::maxWorkItemDimensions> {};
template<> struct Map<CL_DEVICE_MAX_WRITE_IMAGE_ARGS > : public MapBase<CL_DEVICE_MAX_WRITE_IMAGE_ARGS, uint32_t, &ClDeviceInfo::maxWriteImageArgs> {};
template<> struct Map<CL_DEVICE_MEM_BASE_ADDR_ALIGN > : public MapBase<CL_DEVICE_MEM_BASE_ADDR_ALIGN, uint32_t, &ClDeviceInfo::memBaseAddressAlign> {};
template<> struct Map<CL_DEVICE_ME_VERSION_INTEL > : public MapBase<CL_DEVICE_ME_VERSION_INTEL, uint32_t, &ClDeviceInfo::vmeVersion> {};
template<> struct Map<CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE > : public MapBase<CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE, uint32_t, &ClDeviceInfo::minDataTypeAlignSize> {};
template<> struct Map<CL_DEVICE_NAME > : public MapBase<CL_DEVICE_NAME, const char *, &ClDeviceInfo::name> {};
template<> struct Map<CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR > : public MapBase<CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR, uint32_t, &ClDeviceInfo::nativeVectorWidthChar> {};
template<> struct Map<CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE > : public MapBase<CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE, uint32_t, &ClDeviceInfo::nativeVectorWidthDouble> {};
template<> struct Map<CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT > : public MapBase<CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT, uint32_t, &ClDeviceInfo::nativeVectorWidthFloat> {};
template<> struct Map<CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF > : public MapBase<CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF, uint32_t, &ClDeviceInfo::nativeVectorWidthHalf> {};
template<> struct Map<CL_DEVICE_NATIVE_VECTOR_WIDTH_INT > : public MapBase<CL_DEVICE_NATIVE_VECTOR_WIDTH_INT, uint32_t, &ClDeviceInfo::nativeVectorWidthInt> {};
template<> struct Map<CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG > : public MapBase<CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG, uint32_t, &ClDeviceInfo::nativeVectorWidthLong> {};
template<> struct Map<CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT > : public MapBase<CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT, uint32_t, &ClDeviceInfo::nativeVectorWidthShort> {};
template<> struct Map<CL_DEVICE_OPENCL_C_VERSION > : public MapBase<CL_DEVICE_OPENCL_C_VERSION, const char *, &ClDeviceInfo::clCVersion> {};
template<> struct Map<CL_DEVICE_PARENT_DEVICE > : public MapBase<CL_DEVICE_PARENT_DEVICE, cl_device_id, &ClDeviceInfo::parentDevice> {};
template<> struct Map<CL_DEVICE_PARTITION_AFFINITY_DOMAIN > : public MapBase<CL_DEVICE_PARTITION_AFFINITY_DOMAIN, uint64_t, &ClDeviceInfo::partitionAffinityDomain> {};
template<> struct Map<CL_DEVICE_PARTITION_MAX_SUB_DEVICES > : public MapBase<CL_DEVICE_PARTITION_MAX_SUB_DEVICES, uint32_t, &ClDeviceInfo::partitionMaxSubDevices> {};
template<> struct Map<CL_DEVICE_PARTITION_PROPERTIES > : public MapBase<CL_DEVICE_PARTITION_PROPERTIES, cl_device_partition_property[2], &ClDeviceInfo::partitionProperties> {};
template<> struct Map<CL_DEVICE_PARTITION_TYPE > : public MapBase<CL_DEVICE_PARTITION_TYPE, cl_device_partition_property[3], &ClDeviceInfo::partitionType> {};
template<> struct Map<CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS > : public MapBase<CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS, uint32_t, &ClDeviceInfo::pipeMaxActiveReservations> {};
template<> struct Map<CL_DEVICE_PIPE_MAX_PACKET_SIZE > : public MapBase<CL_DEVICE_PIPE_MAX_PACKET_SIZE, uint32_t, &ClDeviceInfo::pipeMaxPacketSize> {};
template<> struct Map<CL_DEVICE_PLANAR_YUV_MAX_HEIGHT_INTEL > : public MapBase<CL_DEVICE_PLANAR_YUV_MAX_HEIGHT_INTEL, size_t, &ClDeviceInfo::planarYuvMaxHeight> {};
template<> struct Map<CL_DEVICE_PLANAR_YUV_MAX_WIDTH_INTEL > : public MapBase<CL_DEVICE_PLANAR_YUV_MAX_WIDTH_INTEL, size_t, &ClDeviceInfo::planarYuvMaxWidth> {};
template<> struct Map<CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT > : public MapBase<CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT, uint32_t, &ClDeviceInfo::preferredGlobalAtomicAlignment> {};
template<> struct Map<CL_DEVICE_PREFERRED_INTEROP_USER_SYNC > : public MapBase<CL_DEVICE_PREFERRED_INTEROP_USER_SYNC, uint32_t, &ClDeviceInfo::preferredInteropUserSync> {};
template<> struct Map<CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT > : public MapBase<CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT, uint32_t, &ClDeviceInfo::preferredLocalAtomicAlignment> {};
template<> struct Map<CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT > : public MapBase<CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT, uint32_t, &ClDeviceInfo::preferredPlatformAtomicAlignment> {};
template<> struct Map<CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR > : public MapBase<CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR, uint32_t, &ClDeviceInfo::preferredVectorWidthChar> {};
template<> struct Map<CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE > : public MapBase<CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE, uint32_t, &ClDeviceInfo::preferredVectorWidthDouble> {};
template<> struct Map<CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT > : public MapBase<CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT, uint32_t, &ClDeviceInfo::preferredVectorWidthFloat> {};
template<> struct Map<CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF > : public MapBase<CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF, uint32_t, &ClDeviceInfo::preferredVectorWidthHalf> {};
template<> struct Map<CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT > : public MapBase<CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT, uint32_t, &ClDeviceInfo::preferredVectorWidthInt> {};
template<> struct Map<CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG > : public MapBase<CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG, uint32_t, &ClDeviceInfo::preferredVectorWidthLong> {};
template<> struct Map<CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT > : public MapBase<CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT, uint32_t, &ClDeviceInfo::preferredVectorWidthShort> {};
template<> struct Map<CL_DEVICE_PRINTF_BUFFER_SIZE > : public MapBase<CL_DEVICE_PRINTF_BUFFER_SIZE, size_t, &ClDeviceInfo::printfBufferSize> {};
template<> struct Map<CL_DEVICE_PROFILE > : public MapBase<CL_DEVICE_PROFILE, const char *, &ClDeviceInfo::profile> {};
template<> struct Map<CL_DEVICE_PROFILING_TIMER_RESOLUTION > : public MapBase<CL_DEVICE_PROFILING_TIMER_RESOLUTION, size_t, &ClDeviceInfo::outProfilingTimerResolution> {};
template<> struct Map<CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE > : public MapBase<CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE, uint32_t, &ClDeviceInfo::queueOnDeviceMaxSize> {};
template<> struct Map<CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE > : public MapBase<CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE, uint32_t, &ClDeviceInfo::queueOnDevicePreferredSize> {};
template<> struct Map<CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES > : public MapBase<CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES, uint64_t, &ClDeviceInfo::queueOnDeviceProperties> {};
template<> struct Map<CL_DEVICE_QUEUE_ON_HOST_PROPERTIES > : public MapBase<CL_DEVICE_QUEUE_ON_HOST_PROPERTIES, uint64_t, &ClDeviceInfo::queueOnHostProperties> {};
template<> struct Map<CL_DEVICE_SHARED_SYSTEM_MEM_CAPABILITIES_INTEL > : public MapBase<CL_DEVICE_SHARED_SYSTEM_MEM_CAPABILITIES_INTEL, uint64_t, &ClDeviceInfo::sharedSystemMemCapabilities> {};
template<> struct Map<CL_DEVICE_SINGLE_DEVICE_SHARED_MEM_CAPABILITIES_INTEL > : public MapBase<CL_DEVICE_SINGLE_DEVICE_SHARED_MEM_CAPABILITIES_INTEL, uint64_t, &ClDeviceInfo::singleDeviceSharedMemCapabilities> {};
template<> struct Map<CL_DEVICE_SINGLE_FP_CONFIG > : public MapBase<CL_DEVICE_SINGLE_FP_CONFIG, uint64_t, &ClDeviceInfo::singleFpConfig> {};
template<> struct Map<CL_DEVICE_SLICE_COUNT_INTEL > : public MapBase<CL_DEVICE_SLICE_COUNT_INTEL, size_t, &ClDeviceInfo::maxSliceCount> {};
template<> struct Map<CL_DEVICE_SPIR_VERSIONS > : public MapBase<CL_DEVICE_SPIR_VERSIONS, const char *, &ClDeviceInfo::spirVersions> {};
template<> struct Map<CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS > : public MapBase<CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS, uint32_t, &ClDeviceInfo::independentForwardProgress> {};
template<> struct Map<CL_DEVICE_SVM_CAPABILITIES > : public MapBase<CL_DEVICE_SVM_CAPABILITIES, uint64_t, &ClDeviceInfo::svmCapabilities> {};
template<> struct Map<CL_DEVICE_TYPE > : public MapBase<CL_DEVICE_TYPE, uint64_t, &ClDeviceInfo::deviceType> {};
template<> struct Map<CL_DEVICE_VENDOR > : public MapBase<CL_DEVICE_VENDOR, const char *, &ClDeviceInfo::vendor> {};
template<> struct Map<CL_DEVICE_VENDOR_ID > : public MapBase<CL_DEVICE_VENDOR_ID, uint32_t, &ClDeviceInfo::vendorId> {};
template<> struct Map<CL_DEVICE_VERSION > : public MapBase<CL_DEVICE_VERSION, const char *, &ClDeviceInfo::clVersion> {};
template<> struct Map<CL_DRIVER_VERSION > : public MapBase<CL_DRIVER_VERSION, const char *, &ClDeviceInfo::driverVersion> {};
template<> struct Map<CL_DEVICE_ADDRESS_BITS > : public MapBase<CL_DEVICE_ADDRESS_BITS, unsigned int, &DeviceInfo::addressBits> {};
template<> struct Map<CL_DEVICE_AVC_ME_SUPPORTS_PREEMPTION_INTEL> : public MapBase<CL_DEVICE_AVC_ME_SUPPORTS_PREEMPTION_INTEL, uint32_t, &DeviceInfo::vmeAvcSupportsPreemption> {};
template<> struct Map<CL_DEVICE_ERROR_CORRECTION_SUPPORT > : public MapBase<CL_DEVICE_ERROR_CORRECTION_SUPPORT, uint32_t, &DeviceInfo::errorCorrectionSupport> {};
template<> struct Map<CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE > : public MapBase<CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE, unsigned int, &DeviceInfo::globalMemCachelineSize> {};
template<> struct Map<CL_DEVICE_GLOBAL_MEM_SIZE > : public MapBase<CL_DEVICE_GLOBAL_MEM_SIZE, uint64_t, &DeviceInfo::globalMemSize> {};
template<> struct Map<CL_DEVICE_IL_VERSION > : public MapBase<CL_DEVICE_IL_VERSION, const char *, &DeviceInfo::ilVersion> {};
template<> struct Map<CL_DEVICE_IMAGE2D_MAX_HEIGHT > : public MapBase<CL_DEVICE_IMAGE2D_MAX_HEIGHT, size_t, &DeviceInfo::image2DMaxHeight> {};
template<> struct Map<CL_DEVICE_IMAGE2D_MAX_WIDTH > : public MapBase<CL_DEVICE_IMAGE2D_MAX_WIDTH, size_t, &DeviceInfo::image2DMaxWidth> {};
template<> struct Map<CL_DEVICE_IMAGE3D_MAX_DEPTH > : public MapBase<CL_DEVICE_IMAGE3D_MAX_DEPTH, size_t, &DeviceInfo::image3DMaxDepth> {};
template<> struct Map<CL_DEVICE_IMAGE_MAX_ARRAY_SIZE > : public MapBase<CL_DEVICE_IMAGE_MAX_ARRAY_SIZE, size_t, &DeviceInfo::imageMaxArraySize> {};
template<> struct Map<CL_DEVICE_IMAGE_MAX_BUFFER_SIZE > : public MapBase<CL_DEVICE_IMAGE_MAX_BUFFER_SIZE, size_t, &DeviceInfo::imageMaxBufferSize> {};
template<> struct Map<CL_DEVICE_IMAGE_SUPPORT > : public MapBase<CL_DEVICE_IMAGE_SUPPORT, uint32_t, &DeviceInfo::imageSupport> {};
template<> struct Map<CL_DEVICE_LOCAL_MEM_SIZE > : public MapBase<CL_DEVICE_LOCAL_MEM_SIZE, uint64_t, &DeviceInfo::localMemSize> {};
template<> struct Map<CL_DEVICE_MAX_CLOCK_FREQUENCY > : public MapBase<CL_DEVICE_MAX_CLOCK_FREQUENCY, uint32_t, &DeviceInfo::maxClockFrequency> {};
template<> struct Map<CL_DEVICE_MAX_MEM_ALLOC_SIZE > : public MapBase<CL_DEVICE_MAX_MEM_ALLOC_SIZE, uint64_t, &DeviceInfo::maxMemAllocSize> {};
template<> struct Map<CL_DEVICE_MAX_ON_DEVICE_QUEUES > : public MapBase<CL_DEVICE_MAX_ON_DEVICE_QUEUES, uint32_t, &DeviceInfo::maxOnDeviceQueues> {};
template<> struct Map<CL_DEVICE_MAX_PARAMETER_SIZE > : public MapBase<CL_DEVICE_MAX_PARAMETER_SIZE, size_t, &DeviceInfo::maxParameterSize> {};
template<> struct Map<CL_DEVICE_MAX_READ_IMAGE_ARGS > : public MapBase<CL_DEVICE_MAX_READ_IMAGE_ARGS, uint32_t, &DeviceInfo::maxReadImageArgs> {};
template<> struct Map<CL_DEVICE_MAX_SAMPLERS > : public MapBase<CL_DEVICE_MAX_SAMPLERS, uint32_t, &DeviceInfo::maxSamplers> {};
template<> struct Map<CL_DEVICE_MAX_WORK_GROUP_SIZE > : public MapBase<CL_DEVICE_MAX_WORK_GROUP_SIZE, size_t, &DeviceInfo::maxWorkGroupSize> {};
template<> struct Map<CL_DEVICE_MAX_WRITE_IMAGE_ARGS > : public MapBase<CL_DEVICE_MAX_WRITE_IMAGE_ARGS, uint32_t, &DeviceInfo::maxWriteImageArgs> {};
template<> struct Map<CL_DEVICE_PRINTF_BUFFER_SIZE > : public MapBase<CL_DEVICE_PRINTF_BUFFER_SIZE, size_t, &DeviceInfo::printfBufferSize> {};
template<> struct Map<CL_DEVICE_PROFILING_TIMER_RESOLUTION > : public MapBase<CL_DEVICE_PROFILING_TIMER_RESOLUTION, size_t, &DeviceInfo::outProfilingTimerResolution> {};
template<> struct Map<CL_DEVICE_VENDOR_ID > : public MapBase<CL_DEVICE_VENDOR_ID, uint32_t, &DeviceInfo::vendorId> {};
template<> struct Map<CL_DEVICE_AVAILABLE > : public ClMapBase<CL_DEVICE_AVAILABLE, uint32_t, &ClDeviceInfo::deviceAvailable> {};
template<> struct Map<CL_DEVICE_AVC_ME_SUPPORTS_TEXTURE_SAMPLER_USE_INTEL > : public ClMapBase<CL_DEVICE_AVC_ME_SUPPORTS_TEXTURE_SAMPLER_USE_INTEL, uint32_t, &ClDeviceInfo::vmeAvcSupportsTextureSampler> {};
template<> struct Map<CL_DEVICE_AVC_ME_VERSION_INTEL > : public ClMapBase<CL_DEVICE_AVC_ME_VERSION_INTEL, uint32_t, &ClDeviceInfo::vmeAvcVersion> {};
template<> struct Map<CL_DEVICE_BUILT_IN_KERNELS > : public ClMapBase<CL_DEVICE_BUILT_IN_KERNELS, const char *, &ClDeviceInfo::builtInKernels> {};
template<> struct Map<CL_DEVICE_COMPILER_AVAILABLE > : public ClMapBase<CL_DEVICE_COMPILER_AVAILABLE, uint32_t, &ClDeviceInfo::compilerAvailable> {};
template<> struct Map<CL_DEVICE_CROSS_DEVICE_SHARED_MEM_CAPABILITIES_INTEL > : public ClMapBase<CL_DEVICE_CROSS_DEVICE_SHARED_MEM_CAPABILITIES_INTEL, uint64_t, &ClDeviceInfo::crossDeviceSharedMemCapabilities> {};
template<> struct Map<CL_DEVICE_DEVICE_MEM_CAPABILITIES_INTEL > : public ClMapBase<CL_DEVICE_DEVICE_MEM_CAPABILITIES_INTEL, uint64_t, &ClDeviceInfo::deviceMemCapabilities> {};
template<> struct Map<CL_DEVICE_DOUBLE_FP_CONFIG > : public ClMapBase<CL_DEVICE_DOUBLE_FP_CONFIG, uint64_t, &ClDeviceInfo::doubleFpConfig> {};
template<> struct Map<CL_DEVICE_DRIVER_VERSION_INTEL > : public ClMapBase<CL_DEVICE_DRIVER_VERSION_INTEL, uint32_t, &ClDeviceInfo::internalDriverVersion> {};
template<> struct Map<CL_DEVICE_ENDIAN_LITTLE > : public ClMapBase<CL_DEVICE_ENDIAN_LITTLE, uint32_t, &ClDeviceInfo::endianLittle> {};
template<> struct Map<CL_DEVICE_EXECUTION_CAPABILITIES > : public ClMapBase<CL_DEVICE_EXECUTION_CAPABILITIES, uint64_t, &ClDeviceInfo::executionCapabilities> {};
template<> struct Map<CL_DEVICE_EXTENSIONS > : public ClMapBase<CL_DEVICE_EXTENSIONS, const char *, &ClDeviceInfo::deviceExtensions> {};
template<> struct Map<CL_DEVICE_GLOBAL_MEM_CACHE_SIZE > : public ClMapBase<CL_DEVICE_GLOBAL_MEM_CACHE_SIZE, uint64_t, &ClDeviceInfo::globalMemCacheSize> {};
template<> struct Map<CL_DEVICE_GLOBAL_MEM_CACHE_TYPE > : public ClMapBase<CL_DEVICE_GLOBAL_MEM_CACHE_TYPE, uint32_t, &ClDeviceInfo::globalMemCacheType> {};
template<> struct Map<CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE > : public ClMapBase<CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE, size_t, &ClDeviceInfo::globalVariablePreferredTotalSize> {};
template<> struct Map<CL_DEVICE_HALF_FP_CONFIG > : public ClMapBase<CL_DEVICE_HALF_FP_CONFIG, uint64_t, &ClDeviceInfo::halfFpConfig> {};
template<> struct Map<CL_DEVICE_HOST_MEM_CAPABILITIES_INTEL > : public ClMapBase<CL_DEVICE_HOST_MEM_CAPABILITIES_INTEL, uint64_t, &ClDeviceInfo::hostMemCapabilities> {};
template<> struct Map<CL_DEVICE_HOST_UNIFIED_MEMORY > : public ClMapBase<CL_DEVICE_HOST_UNIFIED_MEMORY, uint32_t, &ClDeviceInfo::hostUnifiedMemory> {};
template<> struct Map<CL_DEVICE_IMAGE3D_MAX_HEIGHT > : public ClMapBase<CL_DEVICE_IMAGE3D_MAX_HEIGHT, size_t, &ClDeviceInfo::image3DMaxHeight> {};
template<> struct Map<CL_DEVICE_IMAGE3D_MAX_WIDTH > : public ClMapBase<CL_DEVICE_IMAGE3D_MAX_WIDTH, size_t, &ClDeviceInfo::image3DMaxWidth> {};
template<> struct Map<CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT > : public ClMapBase<CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT, uint32_t, &ClDeviceInfo::imageBaseAddressAlignment> {};
template<> struct Map<CL_DEVICE_IMAGE_PITCH_ALIGNMENT > : public ClMapBase<CL_DEVICE_IMAGE_PITCH_ALIGNMENT, uint32_t, &ClDeviceInfo::imagePitchAlignment> {};
template<> struct Map<CL_DEVICE_LINKER_AVAILABLE > : public ClMapBase<CL_DEVICE_LINKER_AVAILABLE, uint32_t, &ClDeviceInfo::linkerAvailable> {};
template<> struct Map<CL_DEVICE_LOCAL_MEM_TYPE > : public ClMapBase<CL_DEVICE_LOCAL_MEM_TYPE, uint32_t, &ClDeviceInfo::localMemType> {};
template<> struct Map<CL_DEVICE_MAX_COMPUTE_UNITS > : public ClMapBase<CL_DEVICE_MAX_COMPUTE_UNITS, uint32_t, &ClDeviceInfo::maxComputUnits> {};
template<> struct Map<CL_DEVICE_MAX_CONSTANT_ARGS > : public ClMapBase<CL_DEVICE_MAX_CONSTANT_ARGS, uint32_t, &ClDeviceInfo::maxConstantArgs> {};
template<> struct Map<CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE > : public ClMapBase<CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE, uint64_t, &ClDeviceInfo::maxConstantBufferSize> {};
template<> struct Map<CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE > : public ClMapBase<CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE, size_t, &ClDeviceInfo::maxGlobalVariableSize> {};
template<> struct Map<CL_DEVICE_MAX_NUM_SUB_GROUPS > : public ClMapBase<CL_DEVICE_MAX_NUM_SUB_GROUPS, uint32_t, &ClDeviceInfo::maxNumOfSubGroups> {};
template<> struct Map<CL_DEVICE_MAX_ON_DEVICE_EVENTS > : public ClMapBase<CL_DEVICE_MAX_ON_DEVICE_EVENTS, uint32_t, &ClDeviceInfo::maxOnDeviceEvents> {};
template<> struct Map<CL_DEVICE_MAX_PIPE_ARGS > : public ClMapBase<CL_DEVICE_MAX_PIPE_ARGS, uint32_t, &ClDeviceInfo::maxPipeArgs> {};
template<> struct Map<CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS > : public ClMapBase<CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS, uint32_t, &ClDeviceInfo::maxReadWriteImageArgs> {};
template<> struct Map<CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS > : public ClMapBase<CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS, uint32_t, &ClDeviceInfo::maxWorkItemDimensions> {};
template<> struct Map<CL_DEVICE_MEM_BASE_ADDR_ALIGN > : public ClMapBase<CL_DEVICE_MEM_BASE_ADDR_ALIGN, uint32_t, &ClDeviceInfo::memBaseAddressAlign> {};
template<> struct Map<CL_DEVICE_ME_VERSION_INTEL > : public ClMapBase<CL_DEVICE_ME_VERSION_INTEL, uint32_t, &ClDeviceInfo::vmeVersion> {};
template<> struct Map<CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE > : public ClMapBase<CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE, uint32_t, &ClDeviceInfo::minDataTypeAlignSize> {};
template<> struct Map<CL_DEVICE_NAME > : public ClMapBase<CL_DEVICE_NAME, const char *, &ClDeviceInfo::name> {};
template<> struct Map<CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR > : public ClMapBase<CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR, uint32_t, &ClDeviceInfo::nativeVectorWidthChar> {};
template<> struct Map<CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE > : public ClMapBase<CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE, uint32_t, &ClDeviceInfo::nativeVectorWidthDouble> {};
template<> struct Map<CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT > : public ClMapBase<CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT, uint32_t, &ClDeviceInfo::nativeVectorWidthFloat> {};
template<> struct Map<CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF > : public ClMapBase<CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF, uint32_t, &ClDeviceInfo::nativeVectorWidthHalf> {};
template<> struct Map<CL_DEVICE_NATIVE_VECTOR_WIDTH_INT > : public ClMapBase<CL_DEVICE_NATIVE_VECTOR_WIDTH_INT, uint32_t, &ClDeviceInfo::nativeVectorWidthInt> {};
template<> struct Map<CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG > : public ClMapBase<CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG, uint32_t, &ClDeviceInfo::nativeVectorWidthLong> {};
template<> struct Map<CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT > : public ClMapBase<CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT, uint32_t, &ClDeviceInfo::nativeVectorWidthShort> {};
template<> struct Map<CL_DEVICE_OPENCL_C_VERSION > : public ClMapBase<CL_DEVICE_OPENCL_C_VERSION, const char *, &ClDeviceInfo::clCVersion> {};
template<> struct Map<CL_DEVICE_PARENT_DEVICE > : public ClMapBase<CL_DEVICE_PARENT_DEVICE, cl_device_id, &ClDeviceInfo::parentDevice> {};
template<> struct Map<CL_DEVICE_PARTITION_AFFINITY_DOMAIN > : public ClMapBase<CL_DEVICE_PARTITION_AFFINITY_DOMAIN, uint64_t, &ClDeviceInfo::partitionAffinityDomain> {};
template<> struct Map<CL_DEVICE_PARTITION_MAX_SUB_DEVICES > : public ClMapBase<CL_DEVICE_PARTITION_MAX_SUB_DEVICES, uint32_t, &ClDeviceInfo::partitionMaxSubDevices> {};
template<> struct Map<CL_DEVICE_PARTITION_PROPERTIES > : public ClMapBase<CL_DEVICE_PARTITION_PROPERTIES, cl_device_partition_property[2], &ClDeviceInfo::partitionProperties> {};
template<> struct Map<CL_DEVICE_PARTITION_TYPE > : public ClMapBase<CL_DEVICE_PARTITION_TYPE, cl_device_partition_property[3], &ClDeviceInfo::partitionType> {};
template<> struct Map<CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS > : public ClMapBase<CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS, uint32_t, &ClDeviceInfo::pipeMaxActiveReservations> {};
template<> struct Map<CL_DEVICE_PIPE_MAX_PACKET_SIZE > : public ClMapBase<CL_DEVICE_PIPE_MAX_PACKET_SIZE, uint32_t, &ClDeviceInfo::pipeMaxPacketSize> {};
template<> struct Map<CL_DEVICE_PLANAR_YUV_MAX_HEIGHT_INTEL > : public ClMapBase<CL_DEVICE_PLANAR_YUV_MAX_HEIGHT_INTEL, size_t, &ClDeviceInfo::planarYuvMaxHeight> {};
template<> struct Map<CL_DEVICE_PLANAR_YUV_MAX_WIDTH_INTEL > : public ClMapBase<CL_DEVICE_PLANAR_YUV_MAX_WIDTH_INTEL, size_t, &ClDeviceInfo::planarYuvMaxWidth> {};
template<> struct Map<CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT > : public ClMapBase<CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT, uint32_t, &ClDeviceInfo::preferredGlobalAtomicAlignment> {};
template<> struct Map<CL_DEVICE_PREFERRED_INTEROP_USER_SYNC > : public ClMapBase<CL_DEVICE_PREFERRED_INTEROP_USER_SYNC, uint32_t, &ClDeviceInfo::preferredInteropUserSync> {};
template<> struct Map<CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT > : public ClMapBase<CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT, uint32_t, &ClDeviceInfo::preferredLocalAtomicAlignment> {};
template<> struct Map<CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT > : public ClMapBase<CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT, uint32_t, &ClDeviceInfo::preferredPlatformAtomicAlignment> {};
template<> struct Map<CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR > : public ClMapBase<CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR, uint32_t, &ClDeviceInfo::preferredVectorWidthChar> {};
template<> struct Map<CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE > : public ClMapBase<CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE, uint32_t, &ClDeviceInfo::preferredVectorWidthDouble> {};
template<> struct Map<CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT > : public ClMapBase<CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT, uint32_t, &ClDeviceInfo::preferredVectorWidthFloat> {};
template<> struct Map<CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF > : public ClMapBase<CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF, uint32_t, &ClDeviceInfo::preferredVectorWidthHalf> {};
template<> struct Map<CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT > : public ClMapBase<CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT, uint32_t, &ClDeviceInfo::preferredVectorWidthInt> {};
template<> struct Map<CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG > : public ClMapBase<CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG, uint32_t, &ClDeviceInfo::preferredVectorWidthLong> {};
template<> struct Map<CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT > : public ClMapBase<CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT, uint32_t, &ClDeviceInfo::preferredVectorWidthShort> {};
template<> struct Map<CL_DEVICE_PROFILE > : public ClMapBase<CL_DEVICE_PROFILE, const char *, &ClDeviceInfo::profile> {};
template<> struct Map<CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE > : public ClMapBase<CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE, uint32_t, &ClDeviceInfo::queueOnDeviceMaxSize> {};
template<> struct Map<CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE > : public ClMapBase<CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE, uint32_t, &ClDeviceInfo::queueOnDevicePreferredSize> {};
template<> struct Map<CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES > : public ClMapBase<CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES, uint64_t, &ClDeviceInfo::queueOnDeviceProperties> {};
template<> struct Map<CL_DEVICE_QUEUE_ON_HOST_PROPERTIES > : public ClMapBase<CL_DEVICE_QUEUE_ON_HOST_PROPERTIES, uint64_t, &ClDeviceInfo::queueOnHostProperties> {};
template<> struct Map<CL_DEVICE_SHARED_SYSTEM_MEM_CAPABILITIES_INTEL > : public ClMapBase<CL_DEVICE_SHARED_SYSTEM_MEM_CAPABILITIES_INTEL, uint64_t, &ClDeviceInfo::sharedSystemMemCapabilities> {};
template<> struct Map<CL_DEVICE_SINGLE_DEVICE_SHARED_MEM_CAPABILITIES_INTEL > : public ClMapBase<CL_DEVICE_SINGLE_DEVICE_SHARED_MEM_CAPABILITIES_INTEL, uint64_t, &ClDeviceInfo::singleDeviceSharedMemCapabilities> {};
template<> struct Map<CL_DEVICE_SINGLE_FP_CONFIG > : public ClMapBase<CL_DEVICE_SINGLE_FP_CONFIG, uint64_t, &ClDeviceInfo::singleFpConfig> {};
template<> struct Map<CL_DEVICE_SLICE_COUNT_INTEL > : public ClMapBase<CL_DEVICE_SLICE_COUNT_INTEL, size_t, &ClDeviceInfo::maxSliceCount> {};
template<> struct Map<CL_DEVICE_SPIR_VERSIONS > : public ClMapBase<CL_DEVICE_SPIR_VERSIONS, const char *, &ClDeviceInfo::spirVersions> {};
template<> struct Map<CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS > : public ClMapBase<CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS, uint32_t, &ClDeviceInfo::independentForwardProgress> {};
template<> struct Map<CL_DEVICE_SVM_CAPABILITIES > : public ClMapBase<CL_DEVICE_SVM_CAPABILITIES, uint64_t, &ClDeviceInfo::svmCapabilities> {};
template<> struct Map<CL_DEVICE_TYPE > : public ClMapBase<CL_DEVICE_TYPE, uint64_t, &ClDeviceInfo::deviceType> {};
template<> struct Map<CL_DEVICE_VENDOR > : public ClMapBase<CL_DEVICE_VENDOR, const char *, &ClDeviceInfo::vendor> {};
template<> struct Map<CL_DEVICE_VERSION > : public ClMapBase<CL_DEVICE_VERSION, const char *, &ClDeviceInfo::clVersion> {};
template<> struct Map<CL_DRIVER_VERSION > : public ClMapBase<CL_DRIVER_VERSION, const char *, &ClDeviceInfo::driverVersion> {};
// clang-format on
} // namespace DeviceInfoTable

View File

@@ -128,7 +128,7 @@ void DeviceQueueHw<GfxFamily>::addMediaStateClearCmds() {
addDcFlushToPipeControlWa(pipeControl);
PreambleHelper<GfxFamily>::programVFEState(&slbCS, device->getHardwareInfo(), 0, 0, device->getDeviceInfo().maxFrontEndThreads, aub_stream::EngineType::ENGINE_RCS);
PreambleHelper<GfxFamily>::programVFEState(&slbCS, device->getHardwareInfo(), 0, 0, device->getSharedDeviceInfo().maxFrontEndThreads, aub_stream::EngineType::ENGINE_RCS);
}
template <typename GfxFamily>

View File

@@ -105,7 +105,7 @@ Kernel::Kernel(Program *programArg, const KernelInfo &kernelInfoArg, const ClDev
program->retain();
imageTransformer.reset(new ImageTransformer);
maxKernelWorkGroupSize = static_cast<uint32_t>(device.getDeviceInfo().maxWorkGroupSize);
maxKernelWorkGroupSize = static_cast<uint32_t>(device.getSharedDeviceInfo().maxWorkGroupSize);
}
Kernel::~Kernel() {
@@ -276,7 +276,7 @@ cl_int Kernel::initialize() {
: 0;
if (privateSurfaceSize) {
privateSurfaceSize *= device.getDeviceInfo().computeUnitsUsedForScratch * getKernelInfo().getMaxSimdSize();
privateSurfaceSize *= device.getSharedDeviceInfo().computeUnitsUsedForScratch * getKernelInfo().getMaxSimdSize();
DEBUG_BREAK_IF(privateSurfaceSize == 0);
if ((is32Bit() || device.getMemoryManager()->peekForce32BitAllocations()) && (privateSurfaceSize > std::numeric_limits<uint32_t>::max())) {
retVal = CL_OUT_OF_RESOURCES;
@@ -2215,7 +2215,7 @@ void Kernel::provideInitializationHints() {
}
if (patchInfo.mediavfestate) {
auto scratchSize = patchInfo.mediavfestate->PerThreadScratchSpace;
scratchSize *= device.getDeviceInfo().computeUnitsUsedForScratch * getKernelInfo().getMaxSimdSize();
scratchSize *= device.getSharedDeviceInfo().computeUnitsUsedForScratch * getKernelInfo().getMaxSimdSize();
if (scratchSize > 0) {
context->providePerformanceHint(CL_CONTEXT_DIAGNOSTICS_LEVEL_BAD_INTEL, REGISTER_PRESSURE_TOO_HIGH,
kernelInfo.name.c_str(), scratchSize);

View File

@@ -23,6 +23,7 @@
#include "opencl/source/command_queue/command_queue.h"
#include "opencl/source/context/context.h"
#include "opencl/source/device/cl_device.h"
#include "opencl/source/device/cl_device_get_cap.inl"
#include "opencl/source/helpers/get_info_status_mapper.h"
#include "opencl/source/helpers/gmm_types_converter.h"
#include "opencl/source/helpers/memory_properties_flags_helpers.h"
@@ -198,7 +199,7 @@ Image *Image::create(Context *context,
*context, true);
imgInfo.preferRenderCompression &= !Image::isFormatRedescribable(surfaceFormat->OCLImageFormat);
if (!context->getDevice(0)->getDeviceInfo().imageSupport && !imgInfo.linearStorage) {
if (!context->getDevice(0)->getSharedDeviceInfo().imageSupport && !imgInfo.linearStorage) {
errcodeRet = CL_INVALID_OPERATION;
return nullptr;
}

View File

@@ -134,8 +134,9 @@ WorkSizeInfo::WorkSizeInfo(const DispatchInfo &dispatchInfo) {
this->simdSize = (uint32_t)dispatchInfo.getKernel()->getKernelInfo().getMaxSimdSize();
this->slmTotalSize = (uint32_t)dispatchInfo.getKernel()->slmTotalSize;
this->coreFamily = dispatchInfo.getKernel()->getDevice().getHardwareInfo().platform.eRenderCoreFamily;
this->numThreadsPerSubSlice = (uint32_t)dispatchInfo.getKernel()->getDevice().getDeviceInfo().maxNumEUsPerSubSlice * dispatchInfo.getKernel()->getDevice().getDeviceInfo().numThreadsPerEU;
this->localMemSize = (uint32_t)dispatchInfo.getKernel()->getDevice().getDeviceInfo().localMemSize;
this->numThreadsPerSubSlice = (uint32_t)dispatchInfo.getKernel()->getDevice().getSharedDeviceInfo().maxNumEUsPerSubSlice *
dispatchInfo.getKernel()->getDevice().getSharedDeviceInfo().numThreadsPerEU;
this->localMemSize = (uint32_t)dispatchInfo.getKernel()->getDevice().getSharedDeviceInfo().localMemSize;
setIfUseImg(dispatchInfo.getKernel());
setMinWorkGroupSize();
}

View File

@@ -38,7 +38,7 @@ PrintfHandler *PrintfHandler::create(const MultiDispatchInfo &multiDispatchInfo,
}
void PrintfHandler::prepareDispatch(const MultiDispatchInfo &multiDispatchInfo) {
auto printfSurfaceSize = device.getDeviceInfo().printfBufferSize;
auto printfSurfaceSize = device.getSharedDeviceInfo().printfBufferSize;
if (printfSurfaceSize == 0) {
return;
}

View File

@@ -72,7 +72,7 @@ Program::Program(ExecutionEnvironment &executionEnvironment, Context *context, b
} else if (strstr(paramValue, "1.2")) {
internalOptions = "-ocl-version=120 ";
}
force32BitAddressess = pClDevice->getDeviceInfo().force32BitAddressess;
force32BitAddressess = pClDevice->getSharedDeviceInfo().force32BitAddressess;
if (force32BitAddressess) {
CompilerOptions::concatenateAppend(internalOptions, CompilerOptions::arch32bit);

View File

@@ -276,7 +276,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, clCreateCommandQueueWithPropertiesApi, GivenNumberOf
EXPECT_EQ(retVal, CL_SUCCESS);
auto cmdq2 = clCreateCommandQueueWithProperties(pContext, devices[testedRootDeviceIndex], odq, &retVal);
if (pDevice->getDeviceInfo().maxOnDeviceQueues > 1) {
if (pDevice->getSharedDeviceInfo().maxOnDeviceQueues > 1) {
EXPECT_NE(nullptr, cmdq2);
EXPECT_EQ(retVal, CL_SUCCESS);
} else {

View File

@@ -67,15 +67,17 @@ TEST_F(clCreateImageTest, GivenNullHostPtrWhenCreatingImageThenImageIsCreatedAnd
}
HWTEST_F(clCreateImageTest, GivenDeviceThatDoesntSupportImagesWhenCreatingTiledImageThenInvalidOperationErrorIsReturned) {
auto device = static_cast<MockClDevice *>(pContext->getDevice(0));
device->deviceInfo.imageSupport = CL_FALSE;
MockClDevice mockClDevice{MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0], 0)};
MockContext mockContext{&mockClDevice};
mockClDevice.sharedDeviceInfo.imageSupport = CL_FALSE;
cl_bool imageSupportInfo = CL_TRUE;
auto status = clGetDeviceInfo(devices[testedRootDeviceIndex], CL_DEVICE_IMAGE_SUPPORT, sizeof(imageSupportInfo), &imageSupportInfo, nullptr);
auto status = clGetDeviceInfo(&mockClDevice, CL_DEVICE_IMAGE_SUPPORT, sizeof(imageSupportInfo), &imageSupportInfo, nullptr);
EXPECT_EQ(CL_SUCCESS, status);
cl_bool expectedValue = CL_FALSE;
EXPECT_EQ(expectedValue, imageSupportInfo);
auto image = clCreateImage(
pContext,
&mockContext,
CL_MEM_READ_WRITE,
&imageFormat,
&imageDesc,
@@ -94,10 +96,12 @@ HWTEST_F(clCreateImageTest, GivenDeviceThatDoesntSupportImagesWhenCreatingTiledI
}
HWTEST_F(clCreateImageTest, GivenDeviceThatDoesntSupportImagesWhenCreatingNonTiledImageThenCreate) {
auto device = static_cast<MockClDevice *>(pContext->getDevice(0));
device->deviceInfo.imageSupport = CL_FALSE;
MockClDevice mockClDevice{MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0], 0)};
MockContext mockContext{&mockClDevice};
mockClDevice.sharedDeviceInfo.imageSupport = CL_FALSE;
cl_bool imageSupportInfo = CL_TRUE;
auto status = clGetDeviceInfo(devices[testedRootDeviceIndex], CL_DEVICE_IMAGE_SUPPORT, sizeof(imageSupportInfo), &imageSupportInfo, nullptr);
auto status = clGetDeviceInfo(&mockClDevice, CL_DEVICE_IMAGE_SUPPORT, sizeof(imageSupportInfo), &imageSupportInfo, nullptr);
EXPECT_EQ(CL_SUCCESS, status);
cl_bool expectedValue = CL_FALSE;
EXPECT_EQ(expectedValue, imageSupportInfo);
@@ -106,7 +110,7 @@ HWTEST_F(clCreateImageTest, GivenDeviceThatDoesntSupportImagesWhenCreatingNonTil
imageDesc.image_height = 1;
auto image = clCreateImage(
pContext,
&mockContext,
CL_MEM_READ_WRITE,
&imageFormat,
&imageDesc,

View File

@@ -18,7 +18,7 @@ using namespace NEO;
typedef api_tests clGetSupportedImageFormatsTests;
TEST_F(clGetSupportedImageFormatsTests, GivenValidParamsWhenGettingSupportImageFormatsThenNumImageFormatsIsGreaterThanZero) {
if (!pContext->getDevice(0)->getDeviceInfo().imageSupport) {
if (!pContext->getDevice(0)->getSharedDeviceInfo().imageSupport) {
GTEST_SKIP();
}
cl_uint numImageFormats = 0;
@@ -97,7 +97,7 @@ TEST(clGetSupportedImageFormatsTest, givenPlatformWithoutDevicesWhenClGetSupport
executionEnvironment->initializeMemoryManager();
executionEnvironment->prepareRootDeviceEnvironments(1);
auto device = std::make_unique<ClDevice>(*Device::create<RootDevice>(executionEnvironment, 0u), platform());
const ClDeviceInfo &devInfo = device->getDeviceInfo();
const DeviceInfo &devInfo = device->getSharedDeviceInfo();
if (!devInfo.imageSupport) {
GTEST_SKIP();
}

View File

@@ -64,7 +64,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, clSetDefaultDeviceCommandQueueApiTest, GivenValidPar
0};
auto pDevice = castToObject<ClDevice>(devices[testedRootDeviceIndex]);
if (pDevice->getDeviceInfo().maxOnDeviceQueues > 1) {
if (pDevice->getSharedDeviceInfo().maxOnDeviceQueues > 1) {
auto newDeviceQueue = clCreateCommandQueueWithProperties(pContext, devices[testedRootDeviceIndex], properties, &retVal);
ASSERT_NE(nullptr, newDeviceQueue);
ASSERT_EQ(CL_SUCCESS, retVal);

View File

@@ -100,7 +100,7 @@ TEST_F(clSetKernelArgSVMPointerTests, GivenLocalAddressAndNullArgValueWhenSettin
TEST_F(clSetKernelArgSVMPointerTests, GivenInvalidArgValueWhenSettingKernelArgThenInvalidArgValueErrorIsReturned) {
pClDevice->deviceInfo.sharedSystemMemCapabilities = 0u;
pClDevice->device.deviceInfo.sharedSystemAllocationsSupport = false;
pClDevice->sharedDeviceInfo.sharedSystemAllocationsSupport = false;
void *ptrHost = malloc(256);
EXPECT_NE(nullptr, ptrHost);
@@ -182,7 +182,7 @@ TEST_F(clSetKernelArgSVMPointerTests, GivenSvmAndPointerWithOffsetWhenSettingKer
TEST_F(clSetKernelArgSVMPointerTests, GivenSvmAndPointerWithInvalidOffsetWhenSettingKernelArgThenInvalidArgValueErrorIsReturned) {
pClDevice->deviceInfo.sharedSystemMemCapabilities = 0u;
pClDevice->device.deviceInfo.sharedSystemAllocationsSupport = false;
pClDevice->sharedDeviceInfo.sharedSystemAllocationsSupport = false;
const ClDeviceInfo &devInfo = pClDevice->getDeviceInfo();
if (devInfo.svmCapabilities != 0) {
void *ptrSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4);

View File

@@ -84,7 +84,7 @@ TEST(clUnifiedSharedMemoryTests, whenClDeviceMemAllocIntelIsCalledThenItAllocate
TEST(clUnifiedSharedMemoryTests, whenUnifiedSharedMemoryAllocationCallsAreCalledWithSizeGreaterThenMaxMemAllocSizeThenErrorIsReturned) {
MockContext mockContext;
cl_int retVal = CL_SUCCESS;
auto maxMemAllocSize = mockContext.getDevice(0u)->getDeviceInfo().maxMemAllocSize;
auto maxMemAllocSize = mockContext.getDevice(0u)->getSharedDeviceInfo().maxMemAllocSize;
size_t requestedSize = static_cast<size_t>(maxMemAllocSize) + 1u;
auto unfiedMemoryDeviceAllocation = clDeviceMemAllocINTEL(&mockContext, mockContext.getDevice(0u), nullptr, requestedSize, 0, &retVal);

View File

@@ -511,7 +511,7 @@ HWTEST_F(AUBSimpleKernelStatelessTest, givenSimpleKernelWhenStatelessPathIsUsedT
EXPECT_THAT(this->pProgram->getInternalOptions(),
testing::HasSubstr(std::string(NEO::CompilerOptions::greaterThan4gbBuffersRequired)));
if (this->device->getDeviceInfo().force32BitAddressess) {
if (this->device->getSharedDeviceInfo().force32BitAddressess) {
EXPECT_THAT(this->pProgram->getInternalOptions(),
testing::HasSubstr(std::string(NEO::CompilerOptions::arch32bit)));
}

View File

@@ -37,7 +37,6 @@ class EnqueueDebugKernelTest : public ProgramSimpleFixture,
if (pDevice->getHardwareInfo().platform.eRenderCoreFamily >= IGFX_GEN9_CORE) {
pDevice->deviceInfo.debuggerActive = true;
pClDevice->deviceInfo.debuggerActive = true;
std::string filename;
std::string kernelOption(CompilerOptions::debugKernelEnable);
KernelFilenameHelper::getKernelFilenameFromInternalOption(kernelOption, filename);

View File

@@ -633,7 +633,7 @@ TEST(localWorkSizeTest, givenDispatchInfoWhenWorkSizeInfoIsCreatedThenItHasCorre
auto threadsPerEu = platformDevices[0]->gtSystemInfo.ThreadCount / platformDevices[0]->gtSystemInfo.EUCount;
auto euPerSubSlice = platformDevices[0]->gtSystemInfo.ThreadCount / platformDevices[0]->gtSystemInfo.MaxEuPerSubSlice;
auto &deviceInfo = device.deviceInfo;
auto &deviceInfo = device.sharedDeviceInfo;
deviceInfo.maxNumEUsPerSubSlice = euPerSubSlice;
deviceInfo.numThreadsPerEU = threadsPerEu;

View File

@@ -583,13 +583,14 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenTwoConsecu
EXPECT_EQ(false, kernel.mockKernel->isBuiltIn);
auto deviceInfo = pClDevice->getDeviceInfo();
if (deviceInfo.force32BitAddressess) {
auto sharedDeviceInfo = pDevice->getDeviceInfo();
if (sharedDeviceInfo.force32BitAddressess) {
EXPECT_FALSE(commandStreamReceiver->getGSBAFor32BitProgrammed());
}
commandQueue.enqueueKernel(kernel, 1, nullptr, &GWS, nullptr, 0, nullptr, nullptr);
if (deviceInfo.force32BitAddressess) {
if (sharedDeviceInfo.force32BitAddressess) {
EXPECT_TRUE(commandStreamReceiver->getGSBAFor32BitProgrammed());
}
@@ -611,7 +612,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenTwoConsecu
// Get address ( offset in 32 bit addressing ) of sratch
graphicsAddress = (uint64_t)graphicsAllocationScratch->getGpuAddressToPatch();
if (deviceInfo.force32BitAddressess && is64bit) {
if (sharedDeviceInfo.force32BitAddressess && is64bit) {
EXPECT_TRUE(graphicsAllocationScratch->is32BitAllocation());
EXPECT_EQ(GmmHelper::decanonize(graphicsAllocationScratch->getGpuAddress()) - GSHaddress, graphicsAddress);
} else if (!deviceInfo.svmCapabilities && is64bit) {
@@ -627,7 +628,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenTwoConsecu
uint64_t scratchBaseLowPart = (uint64_t)mediaVfeState->getScratchSpaceBasePointer();
uint64_t scratchBaseHighPart = (uint64_t)mediaVfeState->getScratchSpaceBasePointerHigh();
if (is64bit && !deviceInfo.force32BitAddressess) {
if (is64bit && !sharedDeviceInfo.force32BitAddressess) {
uint64_t expectedAddress = ScratchSpaceConstants::scratchSpaceOffsetFor64Bit;
EXPECT_EQ(expectedAddress, scratchBaseLowPart);
EXPECT_EQ(0u, scratchBaseHighPart);
@@ -636,7 +637,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenTwoConsecu
EXPECT_EQ(highPartGraphicsAddress, scratchBaseHighPart);
}
if (deviceInfo.force32BitAddressess) {
if (sharedDeviceInfo.force32BitAddressess) {
EXPECT_EQ(pDevice->getMemoryManager()->getExternalHeapBaseAddress(graphicsAllocationScratch->getRootDeviceIndex()), GSHaddress);
} else {
if (is64bit) {
@@ -658,7 +659,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenTwoConsecu
itorCmdForStateBase = find<STATE_BASE_ADDRESS *>(itorWalker, cmdList.end());
// In 32 Bit addressing sba shouldn't be reprogrammed
if (pDevice->getDeviceInfo().force32BitAddressess == true) {
if (sharedDeviceInfo.force32BitAddressess == true) {
EXPECT_EQ(itorCmdForStateBase, cmdList.end());
}
@@ -670,7 +671,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenTwoConsecu
uint64_t oldScratchAddr = ((uint64_t)scratchBaseHighPart << 32u) | scratchBaseLowPart;
uint64_t newScratchAddr = ((uint64_t)cmdMediaVfeStateSecond->getScratchSpaceBasePointerHigh() << 32u) | cmdMediaVfeStateSecond->getScratchSpaceBasePointer();
if (pDevice->getDeviceInfo().force32BitAddressess == true) {
if (sharedDeviceInfo.force32BitAddressess == true) {
EXPECT_NE(oldScratchAddr, newScratchAddr);
}
}
@@ -697,13 +698,14 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenNDRangeKer
EXPECT_EQ(false, kernel.mockKernel->isBuiltIn);
auto deviceInfo = pClDevice->getDeviceInfo();
if (deviceInfo.force32BitAddressess) {
auto sharedDeviceInfo = pDevice->getDeviceInfo();
if (sharedDeviceInfo.force32BitAddressess) {
EXPECT_FALSE(commandStreamReceiver->getGSBAFor32BitProgrammed());
}
commandQueue.enqueueKernel(kernel, 1, nullptr, &GWS, nullptr, 0, nullptr, nullptr);
if (deviceInfo.force32BitAddressess) {
if (sharedDeviceInfo.force32BitAddressess) {
EXPECT_TRUE(commandStreamReceiver->getGSBAFor32BitProgrammed());
}
@@ -725,7 +727,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenNDRangeKer
// Get address ( offset in 32 bit addressing ) of sratch
graphicsAddress = (uint64_t)graphicsAllocationScratch->getGpuAddressToPatch();
if (deviceInfo.force32BitAddressess && is64bit) {
if (sharedDeviceInfo.force32BitAddressess && is64bit) {
EXPECT_TRUE(graphicsAllocationScratch->is32BitAllocation());
EXPECT_EQ(GmmHelper::decanonize(graphicsAllocationScratch->getGpuAddress()) - GSHaddress, graphicsAddress);
} else if (!deviceInfo.svmCapabilities && is64bit) {
@@ -741,7 +743,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenNDRangeKer
uint64_t scratchBaseLowPart = (uint64_t)mediaVfeState->getScratchSpaceBasePointer();
uint64_t scratchBaseHighPart = (uint64_t)mediaVfeState->getScratchSpaceBasePointerHigh();
if (is64bit && !deviceInfo.force32BitAddressess) {
if (is64bit && !sharedDeviceInfo.force32BitAddressess) {
lowPartGraphicsAddress = ScratchSpaceConstants::scratchSpaceOffsetFor64Bit;
highPartGraphicsAddress = 0u;
}
@@ -749,7 +751,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenNDRangeKer
EXPECT_EQ(lowPartGraphicsAddress, scratchBaseLowPart);
EXPECT_EQ(highPartGraphicsAddress, scratchBaseHighPart);
if (deviceInfo.force32BitAddressess) {
if (sharedDeviceInfo.force32BitAddressess) {
EXPECT_EQ(pDevice->getMemoryManager()->getExternalHeapBaseAddress(graphicsAllocationScratch->getRootDeviceIndex()), GSHaddress);
} else {
if (is64bit) {
@@ -772,7 +774,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenNDRangeKer
itorCmdForStateBase = find<STATE_BASE_ADDRESS *>(itorWalker, cmdList.end());
if (deviceInfo.force32BitAddressess) {
if (sharedDeviceInfo.force32BitAddressess) {
EXPECT_NE(itorWalker, itorCmdForStateBase);
if (itorCmdForStateBase != cmdList.end()) {
@@ -783,14 +785,14 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenNDRangeKer
EXPECT_NE(sba, sba2);
EXPECT_EQ(0u, GSHaddress2);
if (deviceInfo.force32BitAddressess) {
if (sharedDeviceInfo.force32BitAddressess) {
EXPECT_FALSE(commandStreamReceiver->getGSBAFor32BitProgrammed());
}
}
}
delete buffer;
if (deviceInfo.force32BitAddressess) {
if (sharedDeviceInfo.force32BitAddressess) {
// Asserts placed after restoring old CSR to avoid heap corruption
ASSERT_NE(itorCmdForStateBase, cmdList.end());
}

View File

@@ -142,6 +142,7 @@ HWTEST_F(UltCommandStreamReceiverTest, givenSentStateSipFlagSetAndSourceLevelDeb
auto sizeForStateSip = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*pDevice);
EXPECT_EQ(sizeForStateSip, sizeWithSourceKernelDebugging - sizeWithoutSourceKernelDebugging - PreambleHelper<FamilyType>::getKernelDebuggingCommandsSize(true));
pDevice->setDebuggerActive(false);
}
HWTEST_F(UltCommandStreamReceiverTest, givenPreambleSentAndThreadArbitrationPolicyChangedWhenEstimatingPreambleCmdSizeThenResultDependsOnPolicyProgrammingCmdSize) {

View File

@@ -711,7 +711,7 @@ TEST_P(PerformanceHintKernelTest, GivenSpillFillWhenKernelIsInitializedThenConte
mediaVFEstate.PerThreadScratchSpace = size;
mockKernel.kernelInfo.patchInfo.mediavfestate = &mediaVFEstate;
size *= pDevice->getDeviceInfo().computeUnitsUsedForScratch * mockKernel.mockKernel->getKernelInfo().getMaxSimdSize();
size *= pDevice->getSharedDeviceInfo().computeUnitsUsedForScratch * mockKernel.mockKernel->getKernelInfo().getMaxSimdSize();
mockKernel.mockKernel->initialize();
@@ -733,7 +733,7 @@ TEST_P(PerformanceHintKernelTest, GivenPrivateSurfaceWhenKernelIsInitializedThen
allocateStatelessPrivateMemorySurface.DataParamSize = 8;
mockKernel.kernelInfo.patchInfo.pAllocateStatelessPrivateSurface = &allocateStatelessPrivateMemorySurface;
size *= pDevice->getDeviceInfo().computeUnitsUsedForScratch * mockKernel.mockKernel->getKernelInfo().getMaxSimdSize();
size *= pDevice->getSharedDeviceInfo().computeUnitsUsedForScratch * mockKernel.mockKernel->getKernelInfo().getMaxSimdSize();
mockKernel.mockKernel->initialize();

View File

@@ -45,6 +45,7 @@ struct DeviceGetCapsTest : public ::testing::Test {
TEST_F(DeviceGetCapsTest, WhenCreatingDeviceThenCapsArePopulatedCorrectly) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
const auto &caps = device->getDeviceInfo();
const auto &sharedCaps = device->getSharedDeviceInfo();
const auto &sysInfo = platformDevices[0]->gtSystemInfo;
auto &hwHelper = HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily);
@@ -81,11 +82,11 @@ TEST_F(DeviceGetCapsTest, WhenCreatingDeviceThenCapsArePopulatedCorrectly) {
EXPECT_EQ(1u, caps.nativeVectorWidthDouble);
EXPECT_EQ(8u, caps.nativeVectorWidthHalf);
EXPECT_EQ(1u, caps.linkerAvailable);
EXPECT_NE(0u, caps.globalMemCachelineSize);
EXPECT_NE(0u, sharedCaps.globalMemCachelineSize);
EXPECT_NE(0u, caps.globalMemCacheSize);
EXPECT_LT(0u, caps.globalMemSize);
EXPECT_EQ(caps.maxMemAllocSize, caps.maxConstantBufferSize);
EXPECT_NE(nullptr, caps.ilVersion);
EXPECT_LT(0u, sharedCaps.globalMemSize);
EXPECT_EQ(sharedCaps.maxMemAllocSize, caps.maxConstantBufferSize);
EXPECT_NE(nullptr, sharedCaps.ilVersion);
EXPECT_EQ(static_cast<cl_bool>(CL_TRUE), caps.deviceAvailable);
EXPECT_EQ(static_cast<cl_device_mem_cache_type>(CL_READ_WRITE_CACHE), caps.globalMemCacheType);
@@ -93,21 +94,21 @@ TEST_F(DeviceGetCapsTest, WhenCreatingDeviceThenCapsArePopulatedCorrectly) {
EXPECT_EQ(sysInfo.EUCount, caps.maxComputUnits);
EXPECT_LT(0u, caps.maxConstantArgs);
EXPECT_LE(128u, caps.maxReadImageArgs);
EXPECT_LE(128u, caps.maxWriteImageArgs);
EXPECT_LE(128u, sharedCaps.maxReadImageArgs);
EXPECT_LE(128u, sharedCaps.maxWriteImageArgs);
EXPECT_EQ(128u, caps.maxReadWriteImageArgs);
EXPECT_LE(caps.maxReadImageArgs * sizeof(cl_mem), caps.maxParameterSize);
EXPECT_LE(caps.maxWriteImageArgs * sizeof(cl_mem), caps.maxParameterSize);
EXPECT_LE(128u * MB, caps.maxMemAllocSize);
EXPECT_GE((4 * GB) - (8 * KB), caps.maxMemAllocSize);
EXPECT_LE(65536u, caps.imageMaxBufferSize);
EXPECT_LE(sharedCaps.maxReadImageArgs * sizeof(cl_mem), sharedCaps.maxParameterSize);
EXPECT_LE(sharedCaps.maxWriteImageArgs * sizeof(cl_mem), sharedCaps.maxParameterSize);
EXPECT_LE(128u * MB, sharedCaps.maxMemAllocSize);
EXPECT_GE((4 * GB) - (8 * KB), sharedCaps.maxMemAllocSize);
EXPECT_LE(65536u, sharedCaps.imageMaxBufferSize);
EXPECT_GT(caps.maxWorkGroupSize, 0u);
EXPECT_EQ(caps.maxWorkItemSizes[0], caps.maxWorkGroupSize);
EXPECT_EQ(caps.maxWorkItemSizes[1], caps.maxWorkGroupSize);
EXPECT_EQ(caps.maxWorkItemSizes[2], caps.maxWorkGroupSize);
EXPECT_LT(0u, caps.maxSamplers);
EXPECT_GT(sharedCaps.maxWorkGroupSize, 0u);
EXPECT_EQ(sharedCaps.maxWorkItemSizes[0], sharedCaps.maxWorkGroupSize);
EXPECT_EQ(sharedCaps.maxWorkItemSizes[1], sharedCaps.maxWorkGroupSize);
EXPECT_EQ(sharedCaps.maxWorkItemSizes[2], sharedCaps.maxWorkGroupSize);
EXPECT_LT(0u, sharedCaps.maxSamplers);
// Minimum requirements for OpenCL 1.x
EXPECT_EQ(static_cast<cl_device_fp_config>(CL_FP_ROUND_TO_NEAREST), CL_FP_ROUND_TO_NEAREST & caps.singleFpConfig);
@@ -132,10 +133,10 @@ TEST_F(DeviceGetCapsTest, WhenCreatingDeviceThenCapsArePopulatedCorrectly) {
EXPECT_EQ(1u, caps.endianLittle);
auto expectedDeviceSubgroups = hwHelper.getDeviceSubGroupSizes();
EXPECT_EQ(expectedDeviceSubgroups.size(), caps.maxSubGroups.size());
EXPECT_EQ(expectedDeviceSubgroups.size(), sharedCaps.maxSubGroups.size());
for (uint32_t i = 0; i < expectedDeviceSubgroups.size(); i++) {
EXPECT_EQ(expectedDeviceSubgroups[i], caps.maxSubGroups[i]);
EXPECT_EQ(expectedDeviceSubgroups[i], sharedCaps.maxSubGroups[i]);
}
if (device->getEnabledClVersion() >= 21) {
@@ -144,10 +145,10 @@ TEST_F(DeviceGetCapsTest, WhenCreatingDeviceThenCapsArePopulatedCorrectly) {
EXPECT_FALSE(caps.independentForwardProgress != 0);
}
EXPECT_EQ(caps.maxWorkGroupSize / hwHelper.getMinimalSIMDSize(), caps.maxNumOfSubGroups);
EXPECT_EQ(sharedCaps.maxWorkGroupSize / hwHelper.getMinimalSIMDSize(), caps.maxNumOfSubGroups);
EXPECT_EQ(1024u, caps.maxOnDeviceEvents);
EXPECT_EQ(1u, caps.maxOnDeviceQueues);
EXPECT_EQ(1u, sharedCaps.maxOnDeviceQueues);
EXPECT_EQ(64u * MB, caps.queueOnDeviceMaxSize);
EXPECT_EQ(128 * KB, caps.queueOnDevicePreferredSize);
EXPECT_EQ(static_cast<cl_command_queue_properties>(CL_QUEUE_PROFILING_ENABLE | CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE),
@@ -157,12 +158,12 @@ TEST_F(DeviceGetCapsTest, WhenCreatingDeviceThenCapsArePopulatedCorrectly) {
EXPECT_EQ(64u, caps.preferredLocalAtomicAlignment);
EXPECT_EQ(64u, caps.preferredPlatformAtomicAlignment);
EXPECT_EQ(static_cast<cl_bool>(device->getHardwareInfo().capabilityTable.supportsImages), caps.imageSupport);
EXPECT_EQ(16384u, caps.image2DMaxWidth);
EXPECT_EQ(16384u, caps.image2DMaxHeight);
EXPECT_EQ(2048u, caps.imageMaxArraySize);
EXPECT_EQ(static_cast<cl_bool>(device->getHardwareInfo().capabilityTable.supportsImages), sharedCaps.imageSupport);
EXPECT_EQ(16384u, sharedCaps.image2DMaxWidth);
EXPECT_EQ(16384u, sharedCaps.image2DMaxHeight);
EXPECT_EQ(2048u, sharedCaps.imageMaxArraySize);
if (device->getHardwareInfo().capabilityTable.clVersionSupport == 12 && is64bit) {
EXPECT_TRUE(caps.force32BitAddressess);
EXPECT_TRUE(sharedCaps.force32BitAddressess);
}
}
@@ -181,6 +182,7 @@ HWTEST_F(DeviceGetCapsTest, givenDeviceWhenAskingForSubGroupSizesThenReturnCorre
TEST_F(DeviceGetCapsTest, GivenPlatformWhenGettingHwInfoThenImage3dDimensionsAreCorrect) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
const auto &caps = device->getDeviceInfo();
const auto &sharedCaps = device->getSharedDeviceInfo();
if (device->getHardwareInfo().platform.eRenderCoreFamily > IGFX_GEN8_CORE) {
EXPECT_EQ(16384u, caps.image3DMaxWidth);
@@ -190,7 +192,7 @@ TEST_F(DeviceGetCapsTest, GivenPlatformWhenGettingHwInfoThenImage3dDimensionsAre
EXPECT_EQ(2048u, caps.image3DMaxHeight);
}
EXPECT_EQ(2048u, caps.image3DMaxDepth);
EXPECT_EQ(2048u, sharedCaps.image3DMaxDepth);
}
TEST_F(DeviceGetCapsTest, givenDontForcePreemptionModeDebugVariableWhenCreateDeviceThenSetDefaultHwPreemptionMode) {
@@ -289,31 +291,32 @@ TEST_F(DeviceGetCapsTest, givenForce32bitAddressingWhenCapsAreCreatedThenDeviceR
DebugManager.flags.Force32bitAddressing.set(true);
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
const auto &caps = device->getDeviceInfo();
const auto &sharedCaps = device->getSharedDeviceInfo();
if (is64bit) {
EXPECT_TRUE(caps.force32BitAddressess);
EXPECT_TRUE(sharedCaps.force32BitAddressess);
} else {
EXPECT_FALSE(caps.force32BitAddressess);
EXPECT_FALSE(sharedCaps.force32BitAddressess);
}
auto expectedSize = (cl_ulong)(4 * 0.8 * GB);
EXPECT_LE(caps.globalMemSize, expectedSize);
EXPECT_LE(caps.maxMemAllocSize, expectedSize);
EXPECT_LE(sharedCaps.globalMemSize, expectedSize);
EXPECT_LE(sharedCaps.maxMemAllocSize, expectedSize);
EXPECT_LE(caps.maxConstantBufferSize, expectedSize);
EXPECT_EQ(caps.addressBits, 32u);
EXPECT_EQ(sharedCaps.addressBits, 32u);
}
}
TEST_F(DeviceGetCapsTest, WhenDeviceIsCreatedThenGlobalMemSizeIsAlignedDownToPageSize) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
const auto &caps = device->getDeviceInfo();
const auto &sharedCaps = device->getSharedDeviceInfo();
auto expectedSize = alignDown(caps.globalMemSize, MemoryConstants::pageSize);
auto expectedSize = alignDown(sharedCaps.globalMemSize, MemoryConstants::pageSize);
EXPECT_EQ(caps.globalMemSize, expectedSize);
EXPECT_EQ(sharedCaps.globalMemSize, expectedSize);
}
TEST_F(DeviceGetCapsTest, Given32bitAddressingWhenDeviceIsCreatedThenGlobalMemSizeIsAlignedDownToPageSize) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
const auto &caps = device->getDeviceInfo();
const auto &sharedCaps = device->getSharedDeviceInfo();
auto pMemManager = device->getMemoryManager();
unsigned int enabledCLVer = device->getEnabledClVersion();
bool addressing32Bit = is32bit || (is64bit && (enabledCLVer < 20)) || DebugManager.flags.Force32bitAddressing.get();
@@ -327,7 +330,7 @@ TEST_F(DeviceGetCapsTest, Given32bitAddressingWhenDeviceIsCreatedThenGlobalMemSi
}
cl_ulong expectedSize = alignDown(memSize, MemoryConstants::pageSize);
EXPECT_EQ(caps.globalMemSize, expectedSize);
EXPECT_EQ(sharedCaps.globalMemSize, expectedSize);
}
TEST_F(DeviceGetCapsTest, givenDeviceCapsWhenLocalMemoryIsEnabledThenCalculateGlobalMemSizeBasedOnLocalMemory) {
@@ -335,7 +338,7 @@ TEST_F(DeviceGetCapsTest, givenDeviceCapsWhenLocalMemoryIsEnabledThenCalculateGl
DebugManager.flags.EnableLocalMemory.set(true);
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
const auto &caps = device->getDeviceInfo();
const auto &sharedCaps = device->getSharedDeviceInfo();
auto pMemManager = device->getMemoryManager();
auto enabledCLVer = device->getEnabledClVersion();
bool addressing32Bit = is32bit || (is64bit && (enabledCLVer < 20)) || DebugManager.flags.Force32bitAddressing.get();
@@ -349,7 +352,7 @@ TEST_F(DeviceGetCapsTest, givenDeviceCapsWhenLocalMemoryIsEnabledThenCalculateGl
}
cl_ulong expectedSize = alignDown(memSize, MemoryConstants::pageSize);
EXPECT_EQ(caps.globalMemSize, expectedSize);
EXPECT_EQ(sharedCaps.globalMemSize, expectedSize);
}
TEST_F(DeviceGetCapsTest, givenGlobalMemSizeWhenCalculatingMaxAllocSizeThenAdjustToHWCap) {
@@ -940,8 +943,8 @@ TEST(DeviceGetCaps, givenDebugFlagToUseMaxSimdSizeForWkgCalculationWhenDeviceCap
mySysInfo.ThreadCount = 24 * 7;
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&myHwInfo));
EXPECT_EQ(1024u, device->getDeviceInfo().maxWorkGroupSize);
EXPECT_EQ(device->getDeviceInfo().maxWorkGroupSize / 32, device->getDeviceInfo().maxNumOfSubGroups);
EXPECT_EQ(1024u, device->getSharedDeviceInfo().maxWorkGroupSize);
EXPECT_EQ(device->getSharedDeviceInfo().maxWorkGroupSize / 32, device->getDeviceInfo().maxNumOfSubGroups);
}
TEST(DeviceGetCaps, givenDebugFlagToUseCertainWorkgroupSizeWhenDeviceIsCreatedItHasCeratinWorkgroupSize) {
@@ -969,8 +972,8 @@ HWTEST_F(DeviceGetCapsTest, givenDeviceThatHasHighNumberOfExecutionUnitsWhenMaxW
mySysInfo.ThreadCount = 32 * hwHelper.getMinimalSIMDSize(); // 128 threads per subslice, in simd 8 gives 1024
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&myHwInfo));
EXPECT_EQ(1024u, device->getDeviceInfo().maxWorkGroupSize);
EXPECT_EQ(device->getDeviceInfo().maxWorkGroupSize / hwHelper.getMinimalSIMDSize(), device->getDeviceInfo().maxNumOfSubGroups);
EXPECT_EQ(1024u, device->getSharedDeviceInfo().maxWorkGroupSize);
EXPECT_EQ(device->getSharedDeviceInfo().maxWorkGroupSize / hwHelper.getMinimalSIMDSize(), device->getDeviceInfo().maxNumOfSubGroups);
}
class DriverInfoMock : public DriverInfo {
@@ -1097,24 +1100,30 @@ TEST(Device_UseCaps, givenCapabilityTableWhenDeviceInitializeCapsThenVmeVersions
hwInfo.capabilityTable.ftrSupportsVmeAvcPreemption = 0;
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
device->initializeCaps();
EXPECT_EQ(0u, device->getDeviceInfo().vmeVersion);
EXPECT_EQ(0u, device->getDeviceInfo().vmeAvcVersion);
EXPECT_EQ(hwInfo.capabilityTable.ftrSupportsVmeAvcPreemption, device->getDeviceInfo().vmeAvcSupportsPreemption);
EXPECT_EQ(hwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler, device->getDeviceInfo().vmeAvcSupportsTextureSampler);
{
auto &caps = device->getDeviceInfo();
auto &sharedCaps = device->getSharedDeviceInfo();
EXPECT_EQ(0u, caps.vmeVersion);
EXPECT_EQ(0u, caps.vmeAvcVersion);
EXPECT_EQ(hwInfo.capabilityTable.ftrSupportsVmeAvcPreemption, sharedCaps.vmeAvcSupportsPreemption);
EXPECT_EQ(hwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler, caps.vmeAvcSupportsTextureSampler);
}
hwInfo.capabilityTable.supportsVme = 1;
hwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler = 1;
hwInfo.capabilityTable.ftrSupportsVmeAvcPreemption = 1;
device.reset(new MockClDevice{MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo)});
device->initializeCaps();
EXPECT_EQ(expectedVmeVersion, device->getDeviceInfo().vmeVersion);
EXPECT_EQ(expectedVmeAvcVersion, device->getDeviceInfo().vmeAvcVersion);
EXPECT_EQ(hwInfo.capabilityTable.ftrSupportsVmeAvcPreemption, device->getDeviceInfo().vmeAvcSupportsPreemption);
EXPECT_EQ(hwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler, device->getDeviceInfo().vmeAvcSupportsTextureSampler);
{
auto &caps = device->getDeviceInfo();
auto &sharedCaps = device->getSharedDeviceInfo();
EXPECT_EQ(expectedVmeVersion, caps.vmeVersion);
EXPECT_EQ(expectedVmeAvcVersion, caps.vmeAvcVersion);
EXPECT_EQ(hwInfo.capabilityTable.ftrSupportsVmeAvcPreemption, sharedCaps.vmeAvcSupportsPreemption);
EXPECT_EQ(hwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler, caps.vmeAvcSupportsTextureSampler);
}
}
typedef HwHelperTest DeviceCapsWithModifiedHwInfoTest;

View File

@@ -106,49 +106,6 @@ TEST_F(DeviceTest, WhenRetainingThenReferenceIsOneAndApiIsUsed) {
ASSERT_EQ(1, pClDevice->getReference());
}
TEST_F(DeviceTest, WhenCreatingClDeviceThenDeviceInfoIsCopiedFromDevice) {
auto &deviceInfo = pDevice->getDeviceInfo();
auto &clDeviceInfo = pClDevice->getDeviceInfo();
EXPECT_EQ(deviceInfo.maxSubGroups, clDeviceInfo.maxSubGroups);
EXPECT_EQ(deviceInfo.debuggerActive, clDeviceInfo.debuggerActive);
EXPECT_EQ(deviceInfo.errorCorrectionSupport, clDeviceInfo.errorCorrectionSupport);
EXPECT_EQ(deviceInfo.force32BitAddressess, clDeviceInfo.force32BitAddressess);
EXPECT_EQ(deviceInfo.imageSupport, clDeviceInfo.imageSupport);
EXPECT_EQ(deviceInfo.vmeAvcSupportsPreemption, clDeviceInfo.vmeAvcSupportsPreemption);
EXPECT_EQ(deviceInfo.ilVersion, clDeviceInfo.ilVersion);
EXPECT_EQ(deviceInfo.profilingTimerResolution, clDeviceInfo.profilingTimerResolution);
EXPECT_EQ(deviceInfo.addressBits, clDeviceInfo.addressBits);
EXPECT_EQ(deviceInfo.computeUnitsUsedForScratch, clDeviceInfo.computeUnitsUsedForScratch);
EXPECT_EQ(deviceInfo.globalMemCachelineSize, clDeviceInfo.globalMemCachelineSize);
EXPECT_EQ(deviceInfo.maxClockFrequency, clDeviceInfo.maxClockFrequency);
EXPECT_EQ(deviceInfo.maxFrontEndThreads, clDeviceInfo.maxFrontEndThreads);
EXPECT_EQ(deviceInfo.maxOnDeviceQueues, clDeviceInfo.maxOnDeviceQueues);
EXPECT_EQ(deviceInfo.maxReadImageArgs, clDeviceInfo.maxReadImageArgs);
EXPECT_EQ(deviceInfo.maxSamplers, clDeviceInfo.maxSamplers);
EXPECT_EQ(deviceInfo.maxWriteImageArgs, clDeviceInfo.maxWriteImageArgs);
EXPECT_EQ(deviceInfo.numThreadsPerEU, clDeviceInfo.numThreadsPerEU);
EXPECT_EQ(deviceInfo.vendorId, clDeviceInfo.vendorId);
EXPECT_EQ(deviceInfo.globalMemSize, clDeviceInfo.globalMemSize);
EXPECT_EQ(deviceInfo.image2DMaxHeight, clDeviceInfo.image2DMaxHeight);
EXPECT_EQ(deviceInfo.image2DMaxWidth, clDeviceInfo.image2DMaxWidth);
EXPECT_EQ(deviceInfo.image3DMaxDepth, clDeviceInfo.image3DMaxDepth);
EXPECT_EQ(deviceInfo.imageMaxArraySize, clDeviceInfo.imageMaxArraySize);
EXPECT_EQ(deviceInfo.imageMaxBufferSize, clDeviceInfo.imageMaxBufferSize);
EXPECT_EQ(deviceInfo.localMemSize, clDeviceInfo.localMemSize);
EXPECT_EQ(deviceInfo.maxMemAllocSize, clDeviceInfo.maxMemAllocSize);
EXPECT_EQ(deviceInfo.maxNumEUsPerSubSlice, clDeviceInfo.maxNumEUsPerSubSlice);
EXPECT_EQ(deviceInfo.maxParameterSize, clDeviceInfo.maxParameterSize);
EXPECT_EQ(deviceInfo.maxWorkGroupSize, clDeviceInfo.maxWorkGroupSize);
EXPECT_EQ(deviceInfo.maxWorkItemSizes[0], clDeviceInfo.maxWorkItemSizes[0]);
EXPECT_EQ(deviceInfo.maxWorkItemSizes[1], clDeviceInfo.maxWorkItemSizes[1]);
EXPECT_EQ(deviceInfo.maxWorkItemSizes[2], clDeviceInfo.maxWorkItemSizes[2]);
EXPECT_EQ(deviceInfo.outProfilingTimerResolution, clDeviceInfo.outProfilingTimerResolution);
EXPECT_EQ(deviceInfo.printfBufferSize, clDeviceInfo.printfBufferSize);
EXPECT_EQ(deviceInfo.sharedSystemAllocationsSupport, (clDeviceInfo.sharedSystemMemCapabilities != 0));
}
HWTEST_F(DeviceTest, WhenDeviceIsCreatedThenActualEngineTypeIsSameAsDefault) {
HardwareInfo hwInfo = *platformDevices[0];
if (hwInfo.capabilityTable.defaultEngineType == aub_stream::EngineType::ENGINE_CCS) {

View File

@@ -130,7 +130,7 @@ struct GetDeviceInfoForImage : public GetDeviceInfoSize {};
TEST_P(GetDeviceInfoForImage, imageInfoSizeIsValid) {
auto device = std::make_unique<ClDevice>(*MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr), platform());
if (!device->getDeviceInfo().imageSupport) {
if (!device->getSharedDeviceInfo().imageSupport) {
GTEST_SKIP();
}
size_t sizeReturned = 0;
@@ -148,7 +148,7 @@ TEST_P(GetDeviceInfoForImage, imageInfoSizeIsValid) {
TEST_P(GetDeviceInfoForImage, whenImageAreNotSupportedThenClSuccessAndSizeofCluintIsReturned) {
auto device = std::make_unique<ClDevice>(*MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr), platform());
if (device->getDeviceInfo().imageSupport) {
if (device->getSharedDeviceInfo().imageSupport) {
GTEST_SKIP();
}
size_t sizeReturned = 0;

View File

@@ -44,7 +44,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, GetDeviceInfoMemCapabilitiesTest, GivenValidParamete
TEST(GetDeviceInfo, GivenPlanarYuvExtensionDisabledAndSupportImageEnabledWhenGettingPlanarYuvMaxWidthHeightThenInvalidValueErrorIsReturned) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
device->deviceInfo.imageSupport = true;
device->sharedDeviceInfo.imageSupport = true;
device->deviceInfo.nv12Extension = false;
uint32_t value;
@@ -67,7 +67,7 @@ TEST(GetDeviceInfo, GivenPlanarYuvExtensionDisabledAndSupportImageEnabledWhenGet
TEST(GetDeviceInfo, GivenPlanarYuvExtensionEnabledAndSupportImageEnabledWhenGettingPlanarYuvMaxWidthHeightThenCorrectValuesAreReturned) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
device->deviceInfo.imageSupport = true;
device->sharedDeviceInfo.imageSupport = true;
device->deviceInfo.nv12Extension = true;
size_t value = 0;
@@ -92,7 +92,7 @@ TEST(GetDeviceInfo, GivenPlanarYuvExtensionEnabledAndSupportImageEnabledWhenGett
TEST(GetDeviceInfo, GivenPlanarYuvExtensionDisabledAndSupportImageDisabledWhenGettingPlanarYuvMaxWidthHeightThenInvalidValueErrorIsReturned) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
device->deviceInfo.imageSupport = false;
device->sharedDeviceInfo.imageSupport = false;
device->deviceInfo.nv12Extension = false;
uint32_t value;
@@ -115,7 +115,7 @@ TEST(GetDeviceInfo, GivenPlanarYuvExtensionDisabledAndSupportImageDisabledWhenGe
TEST(GetDeviceInfo, GivenPlanarYuvExtensionEnabledAndSupportImageDisabledWhenGettingPlanarYuvMaxWidthHeightThenZeroIsReturned) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
device->deviceInfo.imageSupport = false;
device->sharedDeviceInfo.imageSupport = false;
device->deviceInfo.nv12Extension = true;
size_t value = 0;
@@ -141,7 +141,7 @@ TEST(GetDeviceInfo, GivenPlanarYuvExtensionEnabledAndSupportImageDisabledWhenGet
TEST(GetDeviceInfo, GivenImageSupportDisabledWhenGettingImage2dMaxWidthHeightThenZeroIsReturned) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
device->deviceInfo.imageSupport = false;
device->sharedDeviceInfo.imageSupport = false;
size_t value = 0;
auto retVal = device->getDeviceInfo(
@@ -166,7 +166,7 @@ TEST(GetDeviceInfo, GivenImageSupportDisabledWhenGettingImage2dMaxWidthHeightThe
TEST(GetDeviceInfo, GivenImageSupportEnabledWhenGettingImage2dMaxWidthHeightThenCorrectValuesAreReturned) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
device->deviceInfo.imageSupport = true;
device->sharedDeviceInfo.imageSupport = true;
size_t value = 0;
auto retVal = device->getDeviceInfo(
@@ -190,7 +190,7 @@ TEST(GetDeviceInfo, GivenImageSupportDisabledWhenGettingImage3dMaxWidthHeightDep
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
size_t value = 0;
device->deviceInfo.imageSupport = false;
device->sharedDeviceInfo.imageSupport = false;
auto retVal = device->getDeviceInfo(
CL_DEVICE_IMAGE3D_MAX_WIDTH,
@@ -223,7 +223,7 @@ TEST(GetDeviceInfo, GivenImageSupportDisabledWhenGettingImage3dMaxWidthHeightDep
TEST(GetDeviceInfo, GivenImageSupportEnabledWhenGettingImage3dMaxWidthHeightDepthThenCorrectValuesAreReturned) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
device->deviceInfo.imageSupport = true;
device->sharedDeviceInfo.imageSupport = true;
size_t value = 0;
auto retVal = device->getDeviceInfo(
@@ -254,7 +254,7 @@ TEST(GetDeviceInfo, GivenImageSupportEnabledWhenGettingImage3dMaxWidthHeightDept
TEST(GetDeviceInfo, GivenImageSupportDisabledWhenGettingImageMaxArgsThenZeroIsReturned) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
device->deviceInfo.imageSupport = false;
device->sharedDeviceInfo.imageSupport = false;
uint32_t value;
auto retVal = device->getDeviceInfo(
@@ -288,7 +288,7 @@ TEST(GetDeviceInfo, GivenImageSupportDisabledWhenGettingImageMaxArgsThenZeroIsRe
TEST(GetDeviceInfo, GivenImageSupportEnabledWhenGettingImageMaxArgsThenCorrectValuesAreReturned) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
device->deviceInfo.imageSupport = true;
device->sharedDeviceInfo.imageSupport = true;
size_t value = 0;
auto retVal = device->getDeviceInfo(
@@ -320,7 +320,7 @@ TEST(GetDeviceInfo, GivenImageSupportDisabledWhenGettingImageBaseAddressAlignmen
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
size_t value = 0;
device->deviceInfo.imageSupport = false;
device->sharedDeviceInfo.imageSupport = false;
auto retVal = device->getDeviceInfo(
CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT,
@@ -335,7 +335,7 @@ TEST(GetDeviceInfo, GivenImageSupportDisabledWhenGettingImageBaseAddressAlignmen
TEST(GetDeviceInfo, GivenImageSupportEnabledWhenGettingImageBaseAddressAlignmentThenCorrectValuesAreReturned) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
device->deviceInfo.imageSupport = true;
device->sharedDeviceInfo.imageSupport = true;
size_t value = 0;
auto retVal = device->getDeviceInfo(
@@ -351,7 +351,7 @@ TEST(GetDeviceInfo, GivenImageSupportDisabledWhenGettingImageMaxArraySizeThenZer
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
size_t value = 0;
device->deviceInfo.imageSupport = false;
device->sharedDeviceInfo.imageSupport = false;
auto retVal = device->getDeviceInfo(
CL_DEVICE_IMAGE_MAX_ARRAY_SIZE,
@@ -366,7 +366,7 @@ TEST(GetDeviceInfo, GivenImageSupportDisabledWhenGettingImageMaxArraySizeThenZer
TEST(GetDeviceInfo, GivenImageSupportEnabledWhenGettingImageMaxArraySizeThenCorrectValuesAreReturned) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
device->deviceInfo.imageSupport = true;
device->sharedDeviceInfo.imageSupport = true;
size_t value = 0;
auto retVal = device->getDeviceInfo(
@@ -382,7 +382,7 @@ TEST(GetDeviceInfo, GivenImageSupportDisabledWhenGettingImageMaxBufferSizeThenZe
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
size_t value = 0;
device->deviceInfo.imageSupport = false;
device->sharedDeviceInfo.imageSupport = false;
auto retVal = device->getDeviceInfo(
CL_DEVICE_IMAGE_MAX_BUFFER_SIZE,
@@ -397,7 +397,7 @@ TEST(GetDeviceInfo, GivenImageSupportDisabledWhenGettingImageMaxBufferSizeThenZe
TEST(GetDeviceInfo, GivenImageSupportEnabledWhenGettingImageMaxBufferSizeThenCorrectValuesAreReturned) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
device->deviceInfo.imageSupport = true;
device->sharedDeviceInfo.imageSupport = true;
size_t value = 0;
auto retVal = device->getDeviceInfo(
@@ -413,7 +413,7 @@ TEST(GetDeviceInfo, GivenImageSupportDisabledWhenGettingImagePitchAlignmentThenZ
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
size_t value = 0;
device->deviceInfo.imageSupport = false;
device->sharedDeviceInfo.imageSupport = false;
auto retVal = device->getDeviceInfo(
CL_DEVICE_IMAGE_PITCH_ALIGNMENT,
@@ -428,7 +428,7 @@ TEST(GetDeviceInfo, GivenImageSupportDisabledWhenGettingImagePitchAlignmentThenZ
TEST(GetDeviceInfo, GivenImageSupportEnabledWhenGettingImagePitchAlignmentThenCorrectValuesAreReturned) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
device->deviceInfo.imageSupport = true;
device->sharedDeviceInfo.imageSupport = true;
size_t value = 0;
auto retVal = device->getDeviceInfo(

View File

@@ -71,18 +71,18 @@ class DeviceQueueTest : public DeviceHostQueueFixture<DeviceQueue> {
};
HWCMDTEST_F(IGFX_GEN8_CORE, DeviceQueueTest, createDeviceQueueWhenNoDeviceQueueIsSupported) {
auto maxOnDeviceQueues = device->getDeviceInfo().maxOnDeviceQueues;
const_cast<ClDeviceInfo *>(&device->getDeviceInfo())->maxOnDeviceQueues = 0;
auto maxOnDeviceQueues = device->getSharedDeviceInfo().maxOnDeviceQueues;
const_cast<DeviceInfo *>(&device->getSharedDeviceInfo())->maxOnDeviceQueues = 0;
auto deviceQueue = createQueueObject();
EXPECT_EQ(deviceQueue, nullptr);
const_cast<ClDeviceInfo *>(&device->getDeviceInfo())->maxOnDeviceQueues = maxOnDeviceQueues;
const_cast<DeviceInfo *>(&device->getSharedDeviceInfo())->maxOnDeviceQueues = maxOnDeviceQueues;
}
HWCMDTEST_F(IGFX_GEN8_CORE, DeviceQueueTest, createDeviceQueuesWhenSingleDeviceQueueIsSupported) {
auto maxOnDeviceQueues = device->getDeviceInfo().maxOnDeviceQueues;
const_cast<ClDeviceInfo *>(&device->getDeviceInfo())->maxOnDeviceQueues = 1;
auto maxOnDeviceQueues = device->getSharedDeviceInfo().maxOnDeviceQueues;
const_cast<DeviceInfo *>(&device->getSharedDeviceInfo())->maxOnDeviceQueues = 1;
auto deviceQueue1 = createQueueObject();
ASSERT_NE(deviceQueue1, nullptr);
@@ -93,12 +93,12 @@ HWCMDTEST_F(IGFX_GEN8_CORE, DeviceQueueTest, createDeviceQueuesWhenSingleDeviceQ
delete deviceQueue1;
const_cast<ClDeviceInfo *>(&device->getDeviceInfo())->maxOnDeviceQueues = maxOnDeviceQueues;
const_cast<DeviceInfo *>(&device->getSharedDeviceInfo())->maxOnDeviceQueues = maxOnDeviceQueues;
}
HWCMDTEST_F(IGFX_GEN8_CORE, DeviceQueueTest, createDeviceQueuesWhenMultipleDeviceQueuesAreSupported) {
auto maxOnDeviceQueues = device->getDeviceInfo().maxOnDeviceQueues;
const_cast<ClDeviceInfo *>(&device->getDeviceInfo())->maxOnDeviceQueues = 2;
auto maxOnDeviceQueues = device->getSharedDeviceInfo().maxOnDeviceQueues;
const_cast<DeviceInfo *>(&device->getSharedDeviceInfo())->maxOnDeviceQueues = 2;
auto deviceQueue1 = createQueueObject();
ASSERT_NE(deviceQueue1, nullptr);
@@ -113,7 +113,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, DeviceQueueTest, createDeviceQueuesWhenMultipleDevic
delete deviceQueue1;
delete deviceQueue2;
const_cast<ClDeviceInfo *>(&device->getDeviceInfo())->maxOnDeviceQueues = maxOnDeviceQueues;
const_cast<DeviceInfo *>(&device->getSharedDeviceInfo())->maxOnDeviceQueues = maxOnDeviceQueues;
}
HWCMDTEST_F(IGFX_GEN8_CORE, DeviceQueueTest, GivenDeviceQueueWhenEventPoolIsCreatedThenTimestampResolutionIsSet) {
@@ -237,8 +237,8 @@ typedef DeviceQueueTest DefaultDeviceQueue;
HWCMDTEST_F(IGFX_GEN8_CORE, DefaultDeviceQueue, createOnlyOneDefaultDeviceQueueWhenSingleDeviceQueueIsSupported) {
cl_queue_properties properties[] = {CL_QUEUE_PROPERTIES, CL_QUEUE_ON_DEVICE_DEFAULT, 0, 0, 0};
auto maxOnDeviceQueues = device->getDeviceInfo().maxOnDeviceQueues;
const_cast<ClDeviceInfo *>(&device->getDeviceInfo())->maxOnDeviceQueues = 1;
auto maxOnDeviceQueues = device->getSharedDeviceInfo().maxOnDeviceQueues;
const_cast<DeviceInfo *>(&device->getSharedDeviceInfo())->maxOnDeviceQueues = 1;
auto deviceQueue1 = createQueueObject(properties);
ASSERT_NE(deviceQueue1, nullptr);
@@ -257,14 +257,14 @@ HWCMDTEST_F(IGFX_GEN8_CORE, DefaultDeviceQueue, createOnlyOneDefaultDeviceQueueW
deviceQueue1->release();
deviceQueue2->release();
const_cast<ClDeviceInfo *>(&device->getDeviceInfo())->maxOnDeviceQueues = maxOnDeviceQueues;
const_cast<DeviceInfo *>(&device->getSharedDeviceInfo())->maxOnDeviceQueues = maxOnDeviceQueues;
}
HWCMDTEST_F(IGFX_GEN8_CORE, DefaultDeviceQueue, createOnlyOneDefaultDeviceQueueWhenMultipleDeviceQueuesAreSupported) {
cl_queue_properties properties[] = {CL_QUEUE_PROPERTIES, CL_QUEUE_ON_DEVICE_DEFAULT, 0, 0, 0};
auto maxOnDeviceQueues = device->getDeviceInfo().maxOnDeviceQueues;
const_cast<ClDeviceInfo *>(&device->getDeviceInfo())->maxOnDeviceQueues = 2;
auto maxOnDeviceQueues = device->getSharedDeviceInfo().maxOnDeviceQueues;
const_cast<DeviceInfo *>(&device->getSharedDeviceInfo())->maxOnDeviceQueues = 2;
auto deviceQueue1 = createQueueObject(properties);
ASSERT_NE(deviceQueue1, nullptr);
@@ -283,7 +283,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, DefaultDeviceQueue, createOnlyOneDefaultDeviceQueueW
deviceQueue1->release();
deviceQueue2->release();
const_cast<ClDeviceInfo *>(&device->getDeviceInfo())->maxOnDeviceQueues = maxOnDeviceQueues;
const_cast<DeviceInfo *>(&device->getSharedDeviceInfo())->maxOnDeviceQueues = maxOnDeviceQueues;
}
typedef DeviceQueueTest DeviceQueueEventPool;

View File

@@ -44,7 +44,7 @@ GEN12LPTEST_F(Gen12LpDeviceCaps, defaultPreemptionMode) {
}
GEN12LPTEST_F(Gen12LpDeviceCaps, profilingTimerResolution) {
const auto &caps = pClDevice->getDeviceInfo();
const auto &caps = pClDevice->getSharedDeviceInfo();
EXPECT_EQ(83u, caps.outProfilingTimerResolution);
}

View File

@@ -34,8 +34,9 @@ GEN8TEST_F(Gen8DeviceCaps, compression) {
GEN8TEST_F(Gen8DeviceCaps, image3DDimensions) {
const auto &caps = pClDevice->getDeviceInfo();
const auto &sharedCaps = pDevice->getDeviceInfo();
EXPECT_EQ(2048u, caps.image3DMaxWidth);
EXPECT_EQ(2048u, caps.image3DMaxDepth);
EXPECT_EQ(2048u, sharedCaps.image3DMaxDepth);
EXPECT_EQ(2048u, caps.image3DMaxHeight);
}

View File

@@ -25,16 +25,17 @@ BXTTEST_F(BxtDeviceCaps, BxtProfilingTimerResolution) {
BXTTEST_F(BxtDeviceCaps, BxtClVersionSupport) {
const auto &caps = pClDevice->getDeviceInfo();
const auto &sharedCaps = pDevice->getDeviceInfo();
EXPECT_STREQ("OpenCL 1.2 NEO ", caps.clVersion);
EXPECT_STREQ("OpenCL C 1.2 ", caps.clCVersion);
auto memoryManager = pDevice->getMemoryManager();
if (is64bit) {
EXPECT_TRUE(memoryManager->peekForce32BitAllocations());
EXPECT_TRUE(caps.force32BitAddressess);
EXPECT_TRUE(sharedCaps.force32BitAddressess);
} else {
EXPECT_FALSE(memoryManager->peekForce32BitAllocations());
EXPECT_FALSE(caps.force32BitAddressess);
EXPECT_FALSE(sharedCaps.force32BitAddressess);
}
}

View File

@@ -52,6 +52,7 @@ GEN9TEST_F(UltCommandStreamReceiverTest, whenPreambleIsProgrammedThenStateSipCmd
this->parseCommands<FamilyType>(preambleStream);
auto itorStateSip = find<STATE_SIP *>(this->cmdList.begin(), this->cmdList.end());
EXPECT_EQ(this->cmdList.end(), itorStateSip);
pDevice->setDebuggerActive(false);
}
GEN9TEST_F(CommandStreamReceiverHwTestGen9, GivenKernelWithSlmWhenPreviousNOSLML3WasSentThenProgramL3WithSLML3Config) {

View File

@@ -13,7 +13,7 @@ using namespace NEO;
typedef Test<DeviceFixture> Gen9DeviceCaps;
GLKTEST_F(Gen9DeviceCaps, GlkProfilingTimerResolution) {
const auto &caps = pClDevice->getDeviceInfo();
const auto &caps = pDevice->getDeviceInfo();
EXPECT_EQ(52u, caps.outProfilingTimerResolution);
}

View File

@@ -25,12 +25,13 @@ SKLTEST_F(SklDeviceCaps, SklProfilingTimerResolution) {
SKLTEST_F(SklDeviceCaps, givenSklDeviceWhenAskedFor32BitSupportThenFalseIsReturned) {
const auto &caps = pClDevice->getDeviceInfo();
const auto &sharedCaps = pDevice->getDeviceInfo();
EXPECT_STREQ("OpenCL 2.1 NEO ", caps.clVersion);
EXPECT_STREQ("OpenCL C 2.0 ", caps.clCVersion);
auto memoryManager = pDevice->getMemoryManager();
EXPECT_FALSE(memoryManager->peekForce32BitAllocations());
EXPECT_FALSE(caps.force32BitAddressess);
EXPECT_FALSE(sharedCaps.force32BitAddressess);
}
SKLTEST_F(SklDeviceCaps, SklSvmCapabilities) {

View File

@@ -8,6 +8,7 @@
#include "shared/source/helpers/aligned_memory.h"
#include "shared/source/helpers/hw_helper.h"
#include "opencl/source/device/device_info_map.h"
#include "opencl/source/helpers/memory_properties_flags_helpers.h"
#include "opencl/source/mem_obj/buffer.h"
#include "opencl/source/mem_obj/image.h"
@@ -206,7 +207,7 @@ TEST_F(Image2dFromBufferTest, givenFourChannel8BitColorsAndNotTooLargeRowPitchSp
}
TEST_F(Image2dFromBufferTest, givenFourChannel8BitColorsAndTooLargeRowPitchSpecifiedWhenValidatingSurfaceFormatThenReturnError) {
const auto pitchAlignment = &DeviceInfoTable::Map<CL_DEVICE_IMAGE_PITCH_ALIGNMENT>::getValue(context.getDevice(0u)->getDeviceInfo());
const auto pitchAlignment = &DeviceInfoTable::Map<CL_DEVICE_IMAGE_PITCH_ALIGNMENT>::getValue(*context.getDevice(0u));
imageDesc.image_height = castToObject<Buffer>(imageDesc.mem_object)->getSize() / imageDesc.image_width;
imageDesc.image_row_pitch = imageDesc.image_width + *pitchAlignment;
cl_mem_flags flags = CL_MEM_READ_ONLY;

View File

@@ -146,6 +146,7 @@ TEST_P(ImageRedescribeTest, givenImageWithMaxSizesWhenItIsRedescribedThenNewImag
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
const auto &caps = device->getDeviceInfo();
const auto &sharedCaps = device->getSharedDeviceInfo();
auto memoryManager = (OsAgnosticMemoryManager *)context.getMemoryManager();
memoryManager->turnOnFakingBigAllocations();
@@ -164,14 +165,14 @@ TEST_P(ImageRedescribeTest, givenImageWithMaxSizesWhenItIsRedescribedThenNewImag
case CL_MEM_OBJECT_IMAGE1D:
case CL_MEM_OBJECT_IMAGE1D_ARRAY:
imageWidth = 16384;
maxImageWidth = static_cast<size_t>(caps.maxMemAllocSize);
maxImageWidth = static_cast<size_t>(sharedCaps.maxMemAllocSize);
maxImageHeight = 1;
break;
case CL_MEM_OBJECT_IMAGE2D:
case CL_MEM_OBJECT_IMAGE2D_ARRAY:
imageHeight = 16384;
maxImageWidth = caps.image2DMaxWidth;
maxImageHeight = caps.image2DMaxHeight;
maxImageWidth = sharedCaps.image2DMaxWidth;
maxImageHeight = sharedCaps.image2DMaxHeight;
break;
case CL_MEM_OBJECT_IMAGE3D:
imageHeight = 16384;

View File

@@ -9,6 +9,7 @@
#include "shared/source/helpers/aligned_memory.h"
#include "shared/test/unit_test/helpers/debug_manager_state_restore.h"
#include "opencl/source/device/cl_device_get_cap.inl"
#include "opencl/source/helpers/memory_properties_flags_helpers.h"
#include "opencl/source/helpers/surface_formats.h"
#include "opencl/source/mem_obj/image.h"

View File

@@ -26,8 +26,9 @@ decltype(&createCommandStream) MockDevice::createCommandStreamReceiverFunc = cre
decltype(&createCommandStream) &MockClDevice::createCommandStreamReceiverFunc = MockDevice::createCommandStreamReceiverFunc;
MockClDevice::MockClDevice(MockDevice *pMockDevice)
: ClDevice(*pMockDevice, platform()), device(*pMockDevice), executionEnvironment(pMockDevice->executionEnvironment),
subdevices(pMockDevice->subdevices), mockMemoryManager(pMockDevice->mockMemoryManager), engines(pMockDevice->engines) {
: ClDevice(*pMockDevice, platform()), device(*pMockDevice), sharedDeviceInfo(device.deviceInfo),
executionEnvironment(pMockDevice->executionEnvironment), subdevices(pMockDevice->subdevices),
mockMemoryManager(pMockDevice->mockMemoryManager), engines(pMockDevice->engines) {
}
MockDevice::MockDevice()

View File

@@ -161,11 +161,11 @@ class MockClDevice : public ClDevice {
BuiltIns *getBuiltIns() const { return getDevice().getBuiltIns(); }
void setDebuggerActive(bool active) {
this->deviceInfo.debuggerActive = active;
device.deviceInfo.debuggerActive = active;
sharedDeviceInfo.debuggerActive = active;
}
MockDevice &device;
DeviceInfo &sharedDeviceInfo;
ExecutionEnvironment *&executionEnvironment;
static bool &createSingleDevice;
static decltype(&createCommandStream) &createCommandStreamReceiverFunc;

View File

@@ -1653,7 +1653,7 @@ TEST_F(ProgramTests, WhenCreatingProgramThenBindlessIsEnabledOnlyIfDebugFlagIsEn
TEST_F(ProgramTests, givenDeviceThatSupportsSharedSystemMemoryAllocationWhenProgramIsCompiledThenItForcesStatelessCompilation) {
pClDevice->deviceInfo.sharedSystemMemCapabilities = CL_UNIFIED_SHARED_MEMORY_ACCESS_INTEL | CL_UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS_INTEL | CL_UNIFIED_SHARED_MEMORY_CONCURRENT_ACCESS_INTEL | CL_UNIFIED_SHARED_MEMORY_CONCURRENT_ATOMIC_ACCESS_INTEL;
pClDevice->device.deviceInfo.sharedSystemAllocationsSupport = true;
pClDevice->sharedDeviceInfo.sharedSystemAllocationsSupport = true;
MockProgram program(*pDevice->getExecutionEnvironment(), pContext, false, pDevice);
EXPECT_TRUE(CompilerOptions::contains(program.getInternalOptions().c_str(), CompilerOptions::greaterThan4gbBuffersRequired)) << program.getInternalOptions();
}
@@ -2655,8 +2655,7 @@ TEST_F(ProgramTests, WhenProgramIsCreatedThenItsDeviceIsProperlySet) {
EXPECT_FALSE(wasValidClDeviceUsed(programWithDeviceWithInvalidSpecializedDevice));
MockClDevice validClDevice{new MockDevice};
validClDevice.deviceInfo.force32BitAddressess = true;
validClDevice.device.deviceInfo.force32BitAddressess = true;
validClDevice.sharedDeviceInfo.force32BitAddressess = true;
MockProgram programWithDeviceWithValidSpecializedDevice{executionEnvironment, nullptr, false, &validClDevice.getDevice()};
EXPECT_TRUE(wasValidClDeviceUsed(programWithDeviceWithValidSpecializedDevice));
}

View File

@@ -41,6 +41,10 @@ class CommandStreamReceiverWithActiveDebuggerTest : public ::testing::Test {
return static_cast<MockCsrHw2<FamilyType> *>(device->getDefaultEngine().commandStreamReceiver);
}
void TearDown() override {
device->setSourceLevelDebuggerActive(false);
}
std::unique_ptr<MockClDevice> device;
ExecutionEnvironment *executionEnvironment = nullptr;
HardwareInfo *hwInfo = nullptr;