Move DeviceInfo to a separate file

Related-To: NEO-3938

Change-Id: Ia255bd41a5dc8e521fe6aca3924b90be003ff93b
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2020-03-18 11:36:17 +01:00
parent 56a9bd7a31
commit e1381f89d7
17 changed files with 86 additions and 55 deletions

View File

@@ -20,7 +20,6 @@
#include "opencl/source/command_queue/command_queue_hw.h"
#include "opencl/source/command_queue/gpgpu_walker.h"
#include "opencl/source/command_queue/local_id_gen.h"
#include "opencl/source/device/device_info.h"
#include "opencl/source/event/perf_counter.h"
#include "opencl/source/event/user_event.h"
#include "opencl/source/helpers/hardware_commands_helper.h"

View File

@@ -9,10 +9,10 @@ set(RUNTIME_SRCS_DEVICE
${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_info.h
${CMAKE_CURRENT_SOURCE_DIR}/cl_device_vector.h
${CMAKE_CURRENT_SOURCE_DIR}/device_caps.cpp
${CMAKE_CURRENT_SOURCE_DIR}/device_info.cpp
${CMAKE_CURRENT_SOURCE_DIR}/device_info.h
${CMAKE_CURRENT_SOURCE_DIR}/device_info_map.h
)
target_sources(${NEO_STATIC_LIB_NAME} PRIVATE ${RUNTIME_SRCS_DEVICE})

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.h"
#include "opencl/source/device/cl_device_info.h"
#include "opencl/source/helpers/base_object.h"
#include "engine_node.h"
@@ -30,6 +30,7 @@ class PerformanceCounters;
class Platform;
class SourceLevelDebugger;
class SyncBufferHandler;
struct DeviceInfo;
struct EngineControl;
struct HardwareCapabilities;
struct HardwareInfo;

View File

@@ -15,6 +15,8 @@
#include <cstdint>
namespace NEO {
// clang-format off
struct ClDeviceInfo {
cl_device_type deviceType;
@@ -114,39 +116,4 @@ struct ClDeviceInfo {
};
// clang-format on
struct DeviceInfo {
StackVec<size_t, 3> maxSubGroups;
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;
uint32_t maxReadImageArgs;
uint32_t maxSamplers;
uint32_t maxWriteImageArgs;
uint32_t numThreadsPerEU;
uint32_t vendorId;
uint32_t vmeAvcSupportsPreemption;
bool debuggerActive;
bool force32BitAddressess;
bool sharedSystemAllocationsSupport;
};
} // namespace NEO

View File

@@ -5,7 +5,7 @@
*
*/
#include "opencl/source/device/device_info.h"
#include "shared/source/device/device_info.h"
#include "shared/source/device/device.h"
#include "shared/source/helpers/get_info.h"
@@ -13,16 +13,17 @@
#include "opencl/source/device/cl_device.h"
#include "opencl/source/device/cl_device_get_cap.inl"
#include "opencl/source/device/cl_device_info.h"
#include "opencl/source/device/cl_device_vector.h"
#include "opencl/source/device/device_info_map.h"
#include "opencl/source/helpers/cl_device_helpers.h"
#include "opencl/source/helpers/get_info_status_mapper.h"
#include "opencl/source/platform/platform.h"
using DeviceInfoTable::Map;
namespace NEO {
using DeviceInfoTable::Map;
template <cl_device_info Param>
inline void ClDevice::getStr(const void *&src,
size_t &size,

View File

@@ -6,14 +6,18 @@
*/
#pragma once
#include "shared/source/device/device_info.h"
#include "opencl/extensions/public/cl_ext_private.h"
#include "opencl/source/device/cl_device.h"
#include "opencl/source/device/device_info.h"
#include "opencl/source/device/cl_device_info.h"
#include "CL/cl_ext_intel.h"
#include <CL/cl.h>
#include <CL/cl_ext.h>
namespace NEO {
namespace DeviceInfoTable {
template <cl_device_info Param, typename _Type, _Type ClDeviceInfo::*val>
@@ -158,4 +162,7 @@ template<> struct Map<CL_DEVICE_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
} // namespace NEO

View File

@@ -12,7 +12,6 @@
#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/device_info.h"
#include "opencl/source/gtpin/gtpin_defs.h"
#include "opencl/source/gtpin/gtpin_hw_helper.h"
#include "opencl/source/gtpin/gtpin_notify.h"

View File

@@ -9,7 +9,6 @@
#include "shared/source/device/device.h"
#include "opencl/source/device/device_info.h"
#include "opencl/source/platform/platform.h"
#include "CL/cl.h"