2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2020-02-10 22:57:49 +08:00
|
|
|
* Copyright (C) 2017-2020 Intel Corporation
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2020-02-24 04:00:51 +08:00
|
|
|
#include <shared/source/utilities/stackvec.h>
|
2019-07-12 20:41:32 +08:00
|
|
|
|
2020-02-26 21:21:01 +08:00
|
|
|
#include "opencl/extensions/public/cl_ext_private.h"
|
2020-02-24 17:22:30 +08:00
|
|
|
|
2017-12-21 07:45:38 +08:00
|
|
|
#include "CL/cl.h"
|
|
|
|
#include "CL/cl_ext.h"
|
2019-02-27 18:39:32 +08:00
|
|
|
|
2017-12-21 07:45:38 +08:00
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
// clang-format off
|
|
|
|
struct DeviceInfo {
|
2020-02-20 16:20:33 +08:00
|
|
|
StackVec<size_t, 3> maxSubGroups;
|
2017-12-21 07:45:38 +08:00
|
|
|
cl_device_type deviceType;
|
2019-02-08 17:27:48 +08:00
|
|
|
size_t maxWorkGroupSize;
|
|
|
|
size_t maxNumEUsPerSubSlice;
|
2019-07-15 17:13:40 +08:00
|
|
|
size_t maxSliceCount;
|
2019-02-08 17:27:48 +08:00
|
|
|
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;
|
|
|
|
const char *builtInKernels;
|
|
|
|
cl_platform_id platform;
|
|
|
|
const char *name;
|
|
|
|
const char *vendor;
|
|
|
|
const char *driverVersion;
|
|
|
|
const char *profile;
|
|
|
|
const char *clVersion;
|
|
|
|
const char *clCVersion;
|
|
|
|
const char *spirVersions;
|
|
|
|
const char *deviceExtensions;
|
|
|
|
size_t printfBufferSize;
|
|
|
|
cl_device_id parentDevice;
|
|
|
|
cl_device_affinity_domain partitionAffinityDomain;
|
2020-02-06 20:33:30 +08:00
|
|
|
cl_uint partitionMaxSubDevices;
|
|
|
|
cl_device_partition_property partitionProperties[2];
|
|
|
|
cl_device_partition_property partitionType[3];
|
2019-02-08 17:27:48 +08:00
|
|
|
cl_device_svm_capabilities svmCapabilities;
|
|
|
|
const char *ilVersion;
|
|
|
|
double platformHostTimerResolution;
|
|
|
|
size_t planarYuvMaxWidth;
|
|
|
|
size_t planarYuvMaxHeight;
|
|
|
|
size_t maxWorkItemSizes[3];
|
2017-12-21 07:45:38 +08:00
|
|
|
cl_uint vendorId;
|
|
|
|
cl_uint maxComputUnits;
|
|
|
|
cl_uint maxWorkItemDimensions;
|
|
|
|
cl_uint maxNumOfSubGroups;
|
|
|
|
cl_bool independentForwardProgress;
|
|
|
|
cl_uint preferredVectorWidthChar;
|
|
|
|
cl_uint preferredVectorWidthShort;
|
|
|
|
cl_uint preferredVectorWidthInt;
|
|
|
|
cl_uint preferredVectorWidthLong;
|
|
|
|
cl_uint preferredVectorWidthFloat;
|
|
|
|
cl_uint preferredVectorWidthDouble;
|
|
|
|
cl_uint preferredVectorWidthHalf;
|
|
|
|
cl_uint nativeVectorWidthChar;
|
|
|
|
cl_uint nativeVectorWidthShort;
|
|
|
|
cl_uint nativeVectorWidthInt;
|
|
|
|
cl_uint nativeVectorWidthLong;
|
|
|
|
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;
|
|
|
|
cl_uint pipeMaxActiveReservations;
|
|
|
|
cl_uint pipeMaxPacketSize;
|
|
|
|
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;
|
|
|
|
cl_uint preferredPlatformAtomicAlignment;
|
|
|
|
cl_uint preferredGlobalAtomicAlignment;
|
|
|
|
cl_uint preferredLocalAtomicAlignment;
|
|
|
|
cl_bool hostUnifiedMemory;
|
|
|
|
uint32_t computeUnitsUsedForScratch;
|
2019-05-29 21:37:54 +08:00
|
|
|
uint32_t maxFrontEndThreads;
|
2017-12-21 07:45:38 +08:00
|
|
|
cl_bool vmeAvcSupportsPreemption;
|
|
|
|
cl_bool vmeAvcSupportsTextureSampler;
|
|
|
|
cl_uint vmeAvcVersion;
|
|
|
|
cl_uint vmeVersion;
|
2019-02-08 17:27:48 +08:00
|
|
|
cl_uint internalDriverVersion;
|
2019-12-17 15:55:09 +08:00
|
|
|
cl_uint grfSize;
|
2019-02-08 17:27:48 +08:00
|
|
|
bool force32BitAddressess;
|
|
|
|
bool preemptionSupported;
|
2017-12-21 07:45:38 +08:00
|
|
|
/* Extensions supported */
|
|
|
|
bool nv12Extension;
|
|
|
|
bool vmeExtension;
|
|
|
|
bool platformLP;
|
|
|
|
bool packedYuvExtension;
|
2020-02-10 22:57:49 +08:00
|
|
|
bool debuggerActive;
|
2019-07-12 20:41:32 +08:00
|
|
|
/*Unified Shared Memory Capabilites*/
|
|
|
|
cl_unified_shared_memory_capabilities_intel hostMemCapabilities;
|
|
|
|
cl_unified_shared_memory_capabilities_intel deviceMemCapabilities;
|
|
|
|
cl_unified_shared_memory_capabilities_intel singleDeviceSharedMemCapabilities;
|
|
|
|
cl_unified_shared_memory_capabilities_intel crossDeviceSharedMemCapabilities;
|
|
|
|
cl_unified_shared_memory_capabilities_intel sharedSystemMemCapabilities;
|
2017-12-21 07:45:38 +08:00
|
|
|
};
|
|
|
|
// clang-format on
|