From f80480de7fbfbef491edd7e290c332f110f95058 Mon Sep 17 00:00:00 2001 From: Filip Hazubski Date: Mon, 27 Jan 2020 13:59:19 +0100 Subject: [PATCH] Move ClDevice to a separate file Related-To: NEO-3938 Change-Id: I275b9285b70dac2c9bc52878f6e517e4f3e083b3 Signed-off-by: Filip Hazubski --- core/helpers/hw_helper_base.inl | 2 + runtime/api/api.cpp | 2 +- runtime/built_ins/built_ins.cpp | 1 + runtime/command_queue/command_queue.cpp | 2 +- runtime/command_queue/command_queue_hw.h | 1 + .../command_queue/gpgpu_walker_bdw_plus.inl | 1 + runtime/context/context.cpp | 2 +- runtime/device/CMakeLists.txt | 4 +- runtime/device/cl_device.cpp | 112 ++++++++++++++++ runtime/device/cl_device.h | 123 ++++++++++++++++++ runtime/device/device.cpp | 99 -------------- runtime/device/device.h | 98 +------------- runtime/device/device_info.cpp | 1 + runtime/device_queue/device_queue.cpp | 1 + .../device_queue/device_queue_hw_bdw_plus.inl | 1 + .../gen8/aub_command_stream_receiver_gen8.cpp | 1 + runtime/gtpin/gtpin_callbacks.cpp | 2 +- runtime/helpers/built_ins_helper.cpp | 2 +- runtime/helpers/hardware_commands_helper.h | 1 - runtime/helpers/hardware_commands_helper.inl | 1 + runtime/helpers/task_information.cpp | 2 +- runtime/helpers/validators.cpp | 2 +- runtime/kernel/kernel.cpp | 1 + runtime/mem_obj/buffer.cpp | 2 +- runtime/mem_obj/image.cpp | 2 +- runtime/mem_obj/mem_obj.cpp | 2 +- runtime/mem_obj/pipe.cpp | 2 +- .../linux/device_factory_linux.cpp | 3 +- runtime/os_interface/windows/api_win.cpp | 2 +- .../windows/device_factory_win.cpp | 1 + runtime/os_interface/windows/wddm/wddm.cpp | 2 + runtime/platform/platform.cpp | 1 + runtime/program/build.cpp | 3 +- runtime/program/compile.cpp | 3 +- runtime/program/create.inl | 3 +- runtime/program/get_info.cpp | 2 +- runtime/program/kernel_info.cpp | 2 +- runtime/program/link.cpp | 3 +- runtime/program/printf_handler.cpp | 2 +- runtime/program/process_gen_binary.cpp | 2 +- runtime/program/program.cpp | 2 +- runtime/sampler/sampler.cpp | 2 +- runtime/scheduler/scheduler_kernel.cpp | 4 +- runtime/sharings/d3d/d3d_surface.cpp | 2 +- runtime/sharings/d3d/d3d_texture.cpp | 2 +- runtime/sharings/gl/windows/cl_gl_api.cpp | 2 +- .../sharings/gl/windows/gl_buffer_windows.cpp | 2 +- .../gl/windows/gl_texture_windows.cpp | 2 +- runtime/sharings/va/cl_va_api.cpp | 2 +- runtime/sharings/va/va_surface.cpp | 2 +- .../api/cl_add_comment_to_aub_tests.inl | 2 +- ...te_program_with_built_in_kernels_tests.cpp | 1 + .../gl/cl_get_gl_context_info_khr_tests.cpp | 2 +- .../fixtures/device_host_queue_fixture.h | 1 + unit_tests/fixtures/kernel_data_fixture.h | 4 +- unit_tests/fixtures/platform_fixture.cpp | 2 +- unit_tests/mem_obj/image_validate_tests.cpp | 1 + unit_tests/mocks/mock_device.h | 1 + unit_tests/mocks/mock_kernel.h | 1 + .../program_with_block_kernels_tests.cpp | 1 + .../gl/windows/gl_reused_buffers_tests.cpp | 1 + unit_tests/sharings/va/va_sharing_tests.cpp | 2 +- 62 files changed, 304 insertions(+), 236 deletions(-) create mode 100644 runtime/device/cl_device.cpp create mode 100644 runtime/device/cl_device.h diff --git a/core/helpers/hw_helper_base.inl b/core/helpers/hw_helper_base.inl index e36ea579cc..0e8957ffad 100644 --- a/core/helpers/hw_helper_base.inl +++ b/core/helpers/hw_helper_base.inl @@ -19,6 +19,8 @@ #include "runtime/helpers/dispatch_info.h" #include "runtime/helpers/hardware_commands_helper.h" +#include "instrumentation.h" + namespace NEO { template diff --git a/runtime/api/api.cpp b/runtime/api/api.cpp index 7eea862f9a..20a82a42b7 100644 --- a/runtime/api/api.cpp +++ b/runtime/api/api.cpp @@ -26,7 +26,7 @@ #include "runtime/command_stream/command_stream_receiver.h" #include "runtime/context/context.h" #include "runtime/context/driver_diagnostics.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/device_queue/device_queue.h" #include "runtime/event/user_event.h" #include "runtime/gtpin/gtpin_notify.h" diff --git a/runtime/built_ins/built_ins.cpp b/runtime/built_ins/built_ins.cpp index 66a40f28d2..608dd20e09 100644 --- a/runtime/built_ins/built_ins.cpp +++ b/runtime/built_ins/built_ins.cpp @@ -14,6 +14,7 @@ #include "runtime/built_ins/built_ins.inl" #include "runtime/built_ins/sip.h" #include "runtime/built_ins/vme_dispatch_builder.h" +#include "runtime/device/cl_device.h" #include "runtime/helpers/built_ins_helper.h" #include "runtime/helpers/convert_color.h" #include "runtime/helpers/dispatch_info_builder.h" diff --git a/runtime/command_queue/command_queue.cpp b/runtime/command_queue/command_queue.cpp index ec4251ff55..9ded297511 100644 --- a/runtime/command_queue/command_queue.cpp +++ b/runtime/command_queue/command_queue.cpp @@ -22,7 +22,7 @@ #include "runtime/built_ins/builtins_dispatch_builder.h" #include "runtime/command_stream/command_stream_receiver.h" #include "runtime/context/context.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/device_queue/device_queue.h" #include "runtime/event/event_builder.h" #include "runtime/event/user_event.h" diff --git a/runtime/command_queue/command_queue_hw.h b/runtime/command_queue/command_queue_hw.h index 456619c858..c7f74854a8 100644 --- a/runtime/command_queue/command_queue_hw.h +++ b/runtime/command_queue/command_queue_hw.h @@ -13,6 +13,7 @@ #include "runtime/command_queue/command_queue.h" #include "runtime/command_queue/gpgpu_walker.h" #include "runtime/command_stream/command_stream_receiver.h" +#include "runtime/device/cl_device.h" #include "runtime/device_queue/device_queue_hw.h" #include "runtime/helpers/dispatch_info.h" #include "runtime/helpers/queue_helpers.h" diff --git a/runtime/command_queue/gpgpu_walker_bdw_plus.inl b/runtime/command_queue/gpgpu_walker_bdw_plus.inl index c1b30843fd..155ea51c53 100644 --- a/runtime/command_queue/gpgpu_walker_bdw_plus.inl +++ b/runtime/command_queue/gpgpu_walker_bdw_plus.inl @@ -8,6 +8,7 @@ #pragma once #include "core/helpers/simd_helper.h" #include "runtime/command_queue/gpgpu_walker_base.inl" +#include "runtime/device/cl_device.h" namespace NEO { diff --git a/runtime/context/context.cpp b/runtime/context/context.cpp index e11d075a41..6a292916e4 100644 --- a/runtime/context/context.cpp +++ b/runtime/context/context.cpp @@ -17,7 +17,7 @@ #include "runtime/built_ins/built_ins.h" #include "runtime/command_queue/command_queue.h" #include "runtime/command_stream/command_stream_receiver.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/device_queue/device_queue.h" #include "runtime/gtpin/gtpin_notify.h" #include "runtime/helpers/surface_formats.h" diff --git a/runtime/device/CMakeLists.txt b/runtime/device/CMakeLists.txt index 96fa388f10..a9cf24c908 100644 --- a/runtime/device/CMakeLists.txt +++ b/runtime/device/CMakeLists.txt @@ -1,11 +1,13 @@ # -# Copyright (C) 2018-2019 Intel Corporation +# Copyright (C) 2018-2020 Intel Corporation # # SPDX-License-Identifier: MIT # 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}/device.cpp ${CMAKE_CURRENT_SOURCE_DIR}/device.h ${CMAKE_CURRENT_SOURCE_DIR}/device_caps.cpp diff --git a/runtime/device/cl_device.cpp b/runtime/device/cl_device.cpp new file mode 100644 index 0000000000..f1e44255c8 --- /dev/null +++ b/runtime/device/cl_device.cpp @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2020 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "runtime/device/cl_device.h" + +#include "core/program/sync_buffer_handler.h" +#include "runtime/device/device.h" +#include "runtime/platform/platform.h" + +namespace NEO { + +ClDevice::ClDevice(Device &device) : device(device), platformId(platform()) { + device.incRefInternal(); + initializeCaps(); + + auto numAvailableDevices = device.getNumAvailableDevices(); + if (numAvailableDevices > 1) { + for (uint32_t i = 0; i < numAvailableDevices; i++) { + subDevices.push_back(std::make_unique(*device.getDeviceById(i))); + platform()->clDeviceMap.emplace(device.getDeviceById(i), subDevices[i].get()); + } + } +} + +ClDevice::~ClDevice() { + syncBufferHandler.reset(); + for (auto &subDevice : subDevices) { + subDevice.reset(); + } + device.decRefInternal(); +} + +void ClDevice::allocateSyncBufferHandler() { + TakeOwnershipWrapper lock(*this); + if (syncBufferHandler.get() == nullptr) { + syncBufferHandler = std::make_unique(this->getDevice()); + UNRECOVERABLE_IF(syncBufferHandler.get() == nullptr); + } +} + +unsigned int ClDevice::getEnabledClVersion() const { return device.getEnabledClVersion(); } +unsigned int ClDevice::getSupportedClVersion() const { return device.getSupportedClVersion(); } + +void ClDevice::retainApi() { + if (device.isReleasable()) { + platform()->getClDevice(device.getRootDeviceIndex())->incRefInternal(); + this->incRefApi(); + } +}; +unique_ptr_if_unused ClDevice::releaseApi() { + if (!device.isReleasable()) { + return unique_ptr_if_unused(this, false); + } + platform()->getClDevice(device.getRootDeviceIndex())->decRefInternal(); + return this->decRefApi(); +} + +ClDevice *ClDevice::getDeviceById(uint32_t deviceId) { + UNRECOVERABLE_IF(deviceId >= getNumAvailableDevices()); + if (subDevices.empty()) { + return this; + } + return subDevices[deviceId].get(); +} + +bool ClDevice::getDeviceAndHostTimer(uint64_t *deviceTimestamp, uint64_t *hostTimestamp) const { return device.getDeviceAndHostTimer(deviceTimestamp, hostTimestamp); } +bool ClDevice::getHostTimer(uint64_t *hostTimestamp) const { return device.getHostTimer(hostTimestamp); } +const HardwareInfo &ClDevice::getHardwareInfo() const { return device.getHardwareInfo(); } +const DeviceInfo &ClDevice::getDeviceInfo() const { return device.getDeviceInfo(); } +EngineControl &ClDevice::getEngine(aub_stream::EngineType engineType, bool lowPriority) { return device.getEngine(engineType, lowPriority); } +EngineControl &ClDevice::getDefaultEngine() { return device.getDefaultEngine(); } +MemoryManager *ClDevice::getMemoryManager() const { return device.getMemoryManager(); } +GmmHelper *ClDevice::getGmmHelper() const { return device.getGmmHelper(); } +double ClDevice::getProfilingTimerResolution() { return device.getProfilingTimerResolution(); } +double ClDevice::getPlatformHostTimerResolution() const { return device.getPlatformHostTimerResolution(); } +bool ClDevice::isSimulation() const { return device.isSimulation(); } +GFXCORE_FAMILY ClDevice::getRenderCoreFamily() const { return device.getRenderCoreFamily(); } +PerformanceCounters *ClDevice::getPerformanceCounters() { return device.getPerformanceCounters(); } +PreemptionMode ClDevice::getPreemptionMode() const { return device.getPreemptionMode(); } +bool ClDevice::isSourceLevelDebuggerActive() const { return device.isSourceLevelDebuggerActive(); } +SourceLevelDebugger *ClDevice::getSourceLevelDebugger() { return device.getSourceLevelDebugger(); } +ExecutionEnvironment *ClDevice::getExecutionEnvironment() const { return device.getExecutionEnvironment(); } +const RootDeviceEnvironment &ClDevice::getRootDeviceEnvironment() const { return device.getRootDeviceEnvironment(); } +const HardwareCapabilities &ClDevice::getHardwareCapabilities() const { return device.getHardwareCapabilities(); } +bool ClDevice::isFullRangeSvm() const { return device.isFullRangeSvm(); } +bool ClDevice::areSharedSystemAllocationsAllowed() const { return device.areSharedSystemAllocationsAllowed(); } +uint32_t ClDevice::getRootDeviceIndex() const { return device.getRootDeviceIndex(); } +uint32_t ClDevice::getNumAvailableDevices() const { return device.getNumAvailableDevices(); } + +ClDeviceVector::ClDeviceVector(const cl_device_id *devices, + cl_uint numDevices) { + for (cl_uint i = 0; i < numDevices; i++) { + auto pClDevice = castToObject(devices[i]); + this->push_back(pClDevice); + } +} + +void ClDeviceVector::toDeviceIDs(std::vector &devIDs) { + int i = 0; + devIDs.resize(this->size()); + + for (auto &it : *this) { + devIDs[i] = it; + i++; + } +} + +} // namespace NEO diff --git a/runtime/device/cl_device.h b/runtime/device/cl_device.h new file mode 100644 index 0000000000..f00f70a398 --- /dev/null +++ b/runtime/device/cl_device.h @@ -0,0 +1,123 @@ +/* + * Copyright (C) 2020 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#pragma once +#include "core/command_stream/preemption_mode.h" +#include "core/utilities/reference_tracked_object.h" +#include "runtime/api/cl_types.h" +#include "runtime/device/device_info_map.h" +#include "runtime/helpers/base_object.h" + +#include "engine_node.h" +#include "igfxfmid.h" + +#include + +namespace NEO { +class Device; +class ExecutionEnvironment; +class GmmHelper; +class MemoryManager; +class PerformanceCounters; +class SourceLevelDebugger; +class SyncBufferHandler; +struct EngineControl; +struct HardwareCapabilities; +struct HardwareInfo; +struct RootDeviceEnvironment; + +template <> +struct OpenCLObjectMapper<_cl_device_id> { + typedef class ClDevice DerivedType; +}; + +class ClDevice : public BaseObject<_cl_device_id> { + public: + static const cl_ulong objectMagic = 0x8055832341AC8D08LL; + + ClDevice &operator=(const ClDevice &) = delete; + ClDevice(const ClDevice &) = delete; + + explicit ClDevice(Device &device); + ~ClDevice() override; + + unsigned int getEnabledClVersion() const; //CL + unsigned int getSupportedClVersion() const; + + void retainApi(); + unique_ptr_if_unused releaseApi(); + + bool getDeviceAndHostTimer(uint64_t *deviceTimestamp, uint64_t *hostTimestamp) const; + bool getHostTimer(uint64_t *hostTimestamp) const; + const HardwareInfo &getHardwareInfo() const; + const DeviceInfo &getDeviceInfo() const; + EngineControl &getEngine(aub_stream::EngineType engineType, bool lowPriority); + EngineControl &getDefaultEngine(); + MemoryManager *getMemoryManager() const; + GmmHelper *getGmmHelper() const; + double getProfilingTimerResolution(); + double getPlatformHostTimerResolution() const; + bool isSimulation() const; + GFXCORE_FAMILY getRenderCoreFamily() const; + void allocateSyncBufferHandler(); + PerformanceCounters *getPerformanceCounters(); + PreemptionMode getPreemptionMode() const; + bool isSourceLevelDebuggerActive() const; + SourceLevelDebugger *getSourceLevelDebugger(); + ExecutionEnvironment *getExecutionEnvironment() const; + const RootDeviceEnvironment &getRootDeviceEnvironment() const; + const HardwareCapabilities &getHardwareCapabilities() const; + bool isFullRangeSvm() const; + bool areSharedSystemAllocationsAllowed() const; + uint32_t getRootDeviceIndex() const; + uint32_t getNumAvailableDevices() const; + + // API entry points + cl_int getDeviceInfo(cl_device_info paramName, + size_t paramValueSize, + void *paramValue, + size_t *paramValueSizeRet); + + bool getDeviceInfoForImage(cl_device_info paramName, + const void *&src, + size_t &srcSize, + size_t &retSize); + + // This helper template is meant to simplify getDeviceInfo + template + void getCap(const void *&src, + size_t &size, + size_t &retSize); + + template + void getStr(const void *&src, + size_t &size, + size_t &retSize); + + Device &getDevice() const noexcept { return device; } + ClDevice *getDeviceById(uint32_t deviceId); + void initializeCaps(); + std::unique_ptr syncBufferHandler; + + protected: + Device &device; + std::vector> subDevices; + cl_platform_id platformId; + + std::vector simultaneousInterops = {0}; + void appendOSExtensions(std::string &deviceExtensions); +}; + +template +inline void ClDevice::getCap(const void *&src, + size_t &size, + size_t &retSize) { + src = &DeviceInfoTable::Map::getValue(getDeviceInfo()); + retSize = size = DeviceInfoTable::Map::size; +} + +} // namespace NEO diff --git a/runtime/device/device.cpp b/runtime/device/device.cpp index 6dd477c268..e12e824ed9 100644 --- a/runtime/device/device.cpp +++ b/runtime/device/device.cpp @@ -13,13 +13,10 @@ #include "core/os_interface/os_context.h" #include "core/os_interface/os_interface.h" #include "core/os_interface/os_time.h" -#include "core/program/sync_buffer_handler.h" #include "runtime/command_stream/command_stream_receiver.h" #include "runtime/command_stream/experimental_command_buffer.h" -#include "runtime/device/device_vector.h" #include "runtime/device/driver_info.h" #include "runtime/memory_manager/memory_manager.h" -#include "runtime/platform/platform.h" #include "runtime/source_level_debugger/source_level_debugger.h" namespace NEO { @@ -27,102 +24,6 @@ namespace NEO { decltype(&PerformanceCounters::create) Device::createPerformanceCountersFunc = PerformanceCounters::create; extern CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex); -ClDevice::ClDevice(Device &device) : device(device), platformId(platform()) { - device.incRefInternal(); - initializeCaps(); - - auto numAvailableDevices = device.getNumAvailableDevices(); - if (numAvailableDevices > 1) { - for (uint32_t i = 0; i < numAvailableDevices; i++) { - subDevices.push_back(std::make_unique(*device.getDeviceById(i))); - platform()->clDeviceMap.emplace(device.getDeviceById(i), subDevices[i].get()); - } - } -} - -ClDevice::~ClDevice() { - syncBufferHandler.reset(); - for (auto &subDevice : subDevices) { - subDevice.reset(); - } - device.decRefInternal(); -} - -void ClDevice::allocateSyncBufferHandler() { - TakeOwnershipWrapper lock(*this); - if (syncBufferHandler.get() == nullptr) { - syncBufferHandler = std::make_unique(this->getDevice()); - UNRECOVERABLE_IF(syncBufferHandler.get() == nullptr); - } -} - -unsigned int ClDevice::getEnabledClVersion() const { return device.getEnabledClVersion(); } -unsigned int ClDevice::getSupportedClVersion() const { return device.getSupportedClVersion(); } - -void ClDevice::retainApi() { - if (device.isReleasable()) { - platform()->getClDevice(device.getRootDeviceIndex())->incRefInternal(); - this->incRefApi(); - } -}; -unique_ptr_if_unused ClDevice::releaseApi() { - if (!device.isReleasable()) { - return unique_ptr_if_unused(this, false); - } - platform()->getClDevice(device.getRootDeviceIndex())->decRefInternal(); - return this->decRefApi(); -} - -ClDevice *ClDevice::getDeviceById(uint32_t deviceId) { - UNRECOVERABLE_IF(deviceId >= getNumAvailableDevices()); - if (subDevices.empty()) { - return this; - } - return subDevices[deviceId].get(); -} - -bool ClDevice::getDeviceAndHostTimer(uint64_t *deviceTimestamp, uint64_t *hostTimestamp) const { return device.getDeviceAndHostTimer(deviceTimestamp, hostTimestamp); } -bool ClDevice::getHostTimer(uint64_t *hostTimestamp) const { return device.getHostTimer(hostTimestamp); } -const HardwareInfo &ClDevice::getHardwareInfo() const { return device.getHardwareInfo(); } -const DeviceInfo &ClDevice::getDeviceInfo() const { return device.getDeviceInfo(); } -EngineControl &ClDevice::getEngine(aub_stream::EngineType engineType, bool lowPriority) { return device.getEngine(engineType, lowPriority); } -EngineControl &ClDevice::getDefaultEngine() { return device.getDefaultEngine(); } -MemoryManager *ClDevice::getMemoryManager() const { return device.getMemoryManager(); } -GmmHelper *ClDevice::getGmmHelper() const { return device.getGmmHelper(); } -double ClDevice::getProfilingTimerResolution() { return device.getProfilingTimerResolution(); } -double ClDevice::getPlatformHostTimerResolution() const { return device.getPlatformHostTimerResolution(); } -bool ClDevice::isSimulation() const { return device.isSimulation(); } -GFXCORE_FAMILY ClDevice::getRenderCoreFamily() const { return device.getRenderCoreFamily(); } -PerformanceCounters *ClDevice::getPerformanceCounters() { return device.getPerformanceCounters(); } -PreemptionMode ClDevice::getPreemptionMode() const { return device.getPreemptionMode(); } -bool ClDevice::isSourceLevelDebuggerActive() const { return device.isSourceLevelDebuggerActive(); } -SourceLevelDebugger *ClDevice::getSourceLevelDebugger() { return device.getSourceLevelDebugger(); } -ExecutionEnvironment *ClDevice::getExecutionEnvironment() const { return device.getExecutionEnvironment(); } -const RootDeviceEnvironment &ClDevice::getRootDeviceEnvironment() const { return device.getRootDeviceEnvironment(); } -const HardwareCapabilities &ClDevice::getHardwareCapabilities() const { return device.getHardwareCapabilities(); } -bool ClDevice::isFullRangeSvm() const { return device.isFullRangeSvm(); } -bool ClDevice::areSharedSystemAllocationsAllowed() const { return device.areSharedSystemAllocationsAllowed(); } -uint32_t ClDevice::getRootDeviceIndex() const { return device.getRootDeviceIndex(); } -uint32_t ClDevice::getNumAvailableDevices() const { return device.getNumAvailableDevices(); } - -ClDeviceVector::ClDeviceVector(const cl_device_id *devices, - cl_uint numDevices) { - for (cl_uint i = 0; i < numDevices; i++) { - auto pClDevice = castToObject(devices[i]); - this->push_back(pClDevice); - } -} - -void ClDeviceVector::toDeviceIDs(std::vector &devIDs) { - int i = 0; - devIDs.resize(this->size()); - - for (auto &it : *this) { - devIDs[i] = it; - i++; - } -} - Device::Device(ExecutionEnvironment *executionEnvironment) : executionEnvironment(executionEnvironment) { memset(&deviceInfo, 0, sizeof(deviceInfo)); diff --git a/runtime/device/device.h b/runtime/device/device.h index 424b4a6098..3fa1e6f685 100644 --- a/runtime/device/device.h +++ b/runtime/device/device.h @@ -9,101 +9,13 @@ #include "core/helpers/common_types.h" #include "core/helpers/engine_control.h" #include "core/helpers/hw_info.h" -#include "runtime/api/cl_types.h" -#include "runtime/device/device_info_map.h" +#include "runtime/device/device_info.h" #include "runtime/execution_environment/execution_environment.h" -#include "runtime/helpers/base_object.h" #include "runtime/os_interface/performance_counters.h" -#include "engine_node.h" - namespace NEO { -class Device; class DriverInfo; class OSTime; -class SyncBufferHandler; - -template <> -struct OpenCLObjectMapper<_cl_device_id> { - typedef class ClDevice DerivedType; -}; - -class ClDevice : public BaseObject<_cl_device_id> { - public: - static const cl_ulong objectMagic = 0x8055832341AC8D08LL; - - ClDevice &operator=(const ClDevice &) = delete; - ClDevice(const ClDevice &) = delete; - - explicit ClDevice(Device &device); - ~ClDevice() override; - - unsigned int getEnabledClVersion() const; //CL - unsigned int getSupportedClVersion() const; - - void retainApi(); - unique_ptr_if_unused releaseApi(); - - bool getDeviceAndHostTimer(uint64_t *deviceTimestamp, uint64_t *hostTimestamp) const; - bool getHostTimer(uint64_t *hostTimestamp) const; - const HardwareInfo &getHardwareInfo() const; - const DeviceInfo &getDeviceInfo() const; - EngineControl &getEngine(aub_stream::EngineType engineType, bool lowPriority); - EngineControl &getDefaultEngine(); - MemoryManager *getMemoryManager() const; - GmmHelper *getGmmHelper() const; - double getProfilingTimerResolution(); - double getPlatformHostTimerResolution() const; - bool isSimulation() const; - GFXCORE_FAMILY getRenderCoreFamily() const; - void allocateSyncBufferHandler(); - PerformanceCounters *getPerformanceCounters(); - PreemptionMode getPreemptionMode() const; - bool isSourceLevelDebuggerActive() const; - SourceLevelDebugger *getSourceLevelDebugger(); - ExecutionEnvironment *getExecutionEnvironment() const; - const RootDeviceEnvironment &getRootDeviceEnvironment() const; - const HardwareCapabilities &getHardwareCapabilities() const; - bool isFullRangeSvm() const; - bool areSharedSystemAllocationsAllowed() const; - uint32_t getRootDeviceIndex() const; - uint32_t getNumAvailableDevices() const; - - // API entry points - cl_int getDeviceInfo(cl_device_info paramName, - size_t paramValueSize, - void *paramValue, - size_t *paramValueSizeRet); - - bool getDeviceInfoForImage(cl_device_info paramName, - const void *&src, - size_t &srcSize, - size_t &retSize); - - // This helper template is meant to simplify getDeviceInfo - template - void getCap(const void *&src, - size_t &size, - size_t &retSize); - - template - void getStr(const void *&src, - size_t &size, - size_t &retSize); - - Device &getDevice() const noexcept { return device; } - ClDevice *getDeviceById(uint32_t deviceId); - void initializeCaps(); - std::unique_ptr syncBufferHandler; - - protected: - Device &device; - std::vector> subDevices; - cl_platform_id platformId; - - std::vector simultaneousInterops = {0}; - void appendOSExtensions(std::string &deviceExtensions); -}; class Device : public ReferenceTrackedObject { public: @@ -196,14 +108,6 @@ class Device : public ReferenceTrackedObject { uint32_t defaultEngineIndex = 0; }; -template -inline void ClDevice::getCap(const void *&src, - size_t &size, - size_t &retSize) { - src = &DeviceInfoTable::Map::getValue(device.getDeviceInfo()); - retSize = size = DeviceInfoTable::Map::size; -} - inline EngineControl &Device::getDefaultEngine() { return engines[defaultEngineIndex]; } diff --git a/runtime/device/device_info.cpp b/runtime/device/device_info.cpp index ba469ca6c6..a204f798c3 100644 --- a/runtime/device/device_info.cpp +++ b/runtime/device/device_info.cpp @@ -9,6 +9,7 @@ #include "core/helpers/get_info.h" #include "core/os_interface/os_time.h" +#include "runtime/device/cl_device.h" #include "runtime/device/device.h" #include "runtime/device/device_info_map.h" #include "runtime/device/device_vector.h" diff --git a/runtime/device_queue/device_queue.cpp b/runtime/device_queue/device_queue.cpp index c340d2a6c1..c6b09d1e59 100644 --- a/runtime/device_queue/device_queue.cpp +++ b/runtime/device_queue/device_queue.cpp @@ -9,6 +9,7 @@ #include "core/helpers/hw_helper.h" #include "runtime/context/context.h" +#include "runtime/device/cl_device.h" #include "runtime/device_queue/device_queue_hw.h" #include "runtime/helpers/dispatch_info.h" #include "runtime/helpers/queue_helpers.h" diff --git a/runtime/device_queue/device_queue_hw_bdw_plus.inl b/runtime/device_queue/device_queue_hw_bdw_plus.inl index fafc1ae8d7..6299e48035 100644 --- a/runtime/device_queue/device_queue_hw_bdw_plus.inl +++ b/runtime/device_queue/device_queue_hw_bdw_plus.inl @@ -5,6 +5,7 @@ * */ +#include "runtime/device/cl_device.h" #include "runtime/device_queue/device_queue_hw_base.inl" #include "runtime/program/block_kernel_manager.h" diff --git a/runtime/gen8/aub_command_stream_receiver_gen8.cpp b/runtime/gen8/aub_command_stream_receiver_gen8.cpp index 7b7af05743..dc7d72603b 100644 --- a/runtime/gen8/aub_command_stream_receiver_gen8.cpp +++ b/runtime/gen8/aub_command_stream_receiver_gen8.cpp @@ -8,6 +8,7 @@ #include "core/helpers/array_count.h" #include "runtime/command_stream/aub_command_stream_receiver_hw.h" #include "runtime/command_stream/aub_command_stream_receiver_hw_bdw_plus.inl" +#include "runtime/helpers/base_object.h" namespace NEO { diff --git a/runtime/gtpin/gtpin_callbacks.cpp b/runtime/gtpin/gtpin_callbacks.cpp index b139382672..7f2466ef0b 100644 --- a/runtime/gtpin/gtpin_callbacks.cpp +++ b/runtime/gtpin/gtpin_callbacks.cpp @@ -9,7 +9,7 @@ #include "runtime/command_queue/command_queue.h" #include "runtime/command_stream/command_stream_receiver.h" #include "runtime/context/context.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/device/device_info.h" #include "runtime/gtpin/gtpin_defs.h" #include "runtime/gtpin/gtpin_hw_helper.h" diff --git a/runtime/helpers/built_ins_helper.cpp b/runtime/helpers/built_ins_helper.cpp index d902bdac07..e81e646ffa 100644 --- a/runtime/helpers/built_ins_helper.cpp +++ b/runtime/helpers/built_ins_helper.cpp @@ -7,7 +7,7 @@ #include "runtime/helpers/built_ins_helper.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/program/program.h" namespace NEO { diff --git a/runtime/helpers/hardware_commands_helper.h b/runtime/helpers/hardware_commands_helper.h index d2f2b898fb..e4d60b29a4 100644 --- a/runtime/helpers/hardware_commands_helper.h +++ b/runtime/helpers/hardware_commands_helper.h @@ -8,7 +8,6 @@ #pragma once #include "core/indirect_heap/indirect_heap.h" #include "runtime/built_ins/built_ins.h" -#include "runtime/device/device.h" #include "runtime/helpers/per_thread_data.h" #include "runtime/kernel/kernel.h" diff --git a/runtime/helpers/hardware_commands_helper.inl b/runtime/helpers/hardware_commands_helper.inl index 1eeb588520..35df402afe 100644 --- a/runtime/helpers/hardware_commands_helper.inl +++ b/runtime/helpers/hardware_commands_helper.inl @@ -15,6 +15,7 @@ #include "core/helpers/string.h" #include "core/indirect_heap/indirect_heap.h" #include "runtime/command_queue/local_id_gen.h" +#include "runtime/device/cl_device.h" #include "runtime/helpers/dispatch_info.h" #include "runtime/kernel/kernel.h" #include "runtime/program/block_kernel_manager.h" diff --git a/runtime/helpers/task_information.cpp b/runtime/helpers/task_information.cpp index 67f4036c7a..831a5643a6 100644 --- a/runtime/helpers/task_information.cpp +++ b/runtime/helpers/task_information.cpp @@ -18,7 +18,7 @@ #include "runtime/command_queue/command_queue.h" #include "runtime/command_queue/enqueue_common.h" #include "runtime/command_stream/command_stream_receiver.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/device_queue/device_queue.h" #include "runtime/gtpin/gtpin_notify.h" #include "runtime/helpers/enqueue_properties.h" diff --git a/runtime/helpers/validators.cpp b/runtime/helpers/validators.cpp index c3adccf9d6..d13c895f22 100644 --- a/runtime/helpers/validators.cpp +++ b/runtime/helpers/validators.cpp @@ -9,7 +9,7 @@ #include "runtime/command_queue/command_queue.h" #include "runtime/context/context.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/event/event.h" #include "runtime/helpers/base_object.h" #include "runtime/kernel/kernel.h" diff --git a/runtime/kernel/kernel.cpp b/runtime/kernel/kernel.cpp index e8ab8af532..493532d180 100644 --- a/runtime/kernel/kernel.cpp +++ b/runtime/kernel/kernel.cpp @@ -25,6 +25,7 @@ #include "runtime/command_queue/gpgpu_walker.h" #include "runtime/command_stream/command_stream_receiver.h" #include "runtime/context/context.h" +#include "runtime/device/cl_device.h" #include "runtime/device_queue/device_queue.h" #include "runtime/execution_model/device_enqueue.h" #include "runtime/gtpin/gtpin_notify.h" diff --git a/runtime/mem_obj/buffer.cpp b/runtime/mem_obj/buffer.cpp index 5c4dc84364..4754d98a13 100644 --- a/runtime/mem_obj/buffer.cpp +++ b/runtime/mem_obj/buffer.cpp @@ -21,7 +21,7 @@ #include "runtime/command_queue/command_queue.h" #include "runtime/command_stream/command_stream_receiver.h" #include "runtime/context/context.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/helpers/memory_properties_flags_helpers.h" #include "runtime/helpers/validators.h" #include "runtime/mem_obj/mem_obj_helper.h" diff --git a/runtime/mem_obj/image.cpp b/runtime/mem_obj/image.cpp index a8e61e5eb2..38e4b5fcfc 100644 --- a/runtime/mem_obj/image.cpp +++ b/runtime/mem_obj/image.cpp @@ -21,7 +21,7 @@ #include "core/helpers/string.h" #include "runtime/command_queue/command_queue.h" #include "runtime/context/context.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/helpers/memory_properties_flags_helpers.h" #include "runtime/helpers/mipmap.h" #include "runtime/helpers/surface_formats.h" diff --git a/runtime/mem_obj/mem_obj.cpp b/runtime/mem_obj/mem_obj.cpp index 87eb58536f..5c89d4f37e 100644 --- a/runtime/mem_obj/mem_obj.cpp +++ b/runtime/mem_obj/mem_obj.cpp @@ -18,7 +18,7 @@ #include "runtime/command_queue/command_queue.h" #include "runtime/command_stream/command_stream_receiver.h" #include "runtime/context/context.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/memory_manager/memory_manager.h" #include diff --git a/runtime/mem_obj/pipe.cpp b/runtime/mem_obj/pipe.cpp index 655064ae6f..08d0cf16ea 100644 --- a/runtime/mem_obj/pipe.cpp +++ b/runtime/mem_obj/pipe.cpp @@ -9,7 +9,7 @@ #include "core/helpers/get_info.h" #include "runtime/context/context.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/helpers/memory_properties_flags_helpers.h" #include "runtime/mem_obj/mem_obj_helper.h" #include "runtime/memory_manager/memory_manager.h" diff --git a/runtime/os_interface/linux/device_factory_linux.cpp b/runtime/os_interface/linux/device_factory_linux.cpp index 70094d9338..eb77824338 100644 --- a/runtime/os_interface/linux/device_factory_linux.cpp +++ b/runtime/os_interface/linux/device_factory_linux.cpp @@ -10,7 +10,8 @@ #include "core/helpers/hw_info.h" #include "core/os_interface/linux/drm_neo.h" #include "core/os_interface/linux/os_interface.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" +#include "runtime/execution_environment/execution_environment.h" #include "runtime/os_interface/device_factory.h" #include "runtime/os_interface/hw_info_config.h" #include "runtime/os_interface/linux/drm_memory_operations_handler.h" diff --git a/runtime/os_interface/windows/api_win.cpp b/runtime/os_interface/windows/api_win.cpp index c69ed0081d..b2a7724082 100644 --- a/runtime/os_interface/windows/api_win.cpp +++ b/runtime/os_interface/windows/api_win.cpp @@ -12,7 +12,7 @@ #include "runtime/api/dispatch.h" #include "runtime/command_queue/command_queue.h" #include "runtime/context/context.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/mem_obj/image.h" #include "runtime/platform/platform.h" #include "runtime/sharings/d3d/d3d_buffer.h" diff --git a/runtime/os_interface/windows/device_factory_win.cpp b/runtime/os_interface/windows/device_factory_win.cpp index df6b7cdca7..98c77230d6 100644 --- a/runtime/os_interface/windows/device_factory_win.cpp +++ b/runtime/os_interface/windows/device_factory_win.cpp @@ -9,6 +9,7 @@ #include "core/debug_settings/debug_settings_manager.h" #include "core/execution_environment/root_device_environment.h" +#include "runtime/device/cl_device.h" #include "runtime/device/device.h" #include "runtime/os_interface/device_factory.h" #include "runtime/os_interface/windows/os_interface.h" diff --git a/runtime/os_interface/windows/wddm/wddm.cpp b/runtime/os_interface/windows/wddm/wddm.cpp index 0f383097d2..2f17d360eb 100644 --- a/runtime/os_interface/windows/wddm/wddm.cpp +++ b/runtime/os_interface/windows/wddm/wddm.cpp @@ -30,6 +30,8 @@ #include "gmm_memory.h" +#include + std::wstring getIgdrclPath() { std::wstring returnValue; WCHAR path[255]; diff --git a/runtime/platform/platform.cpp b/runtime/platform/platform.cpp index 2b04adac29..4ca8fdc6c8 100644 --- a/runtime/platform/platform.cpp +++ b/runtime/platform/platform.cpp @@ -19,6 +19,7 @@ #include "core/os_interface/os_interface.h" #include "runtime/api/api.h" #include "runtime/command_stream/command_stream_receiver.h" +#include "runtime/device/cl_device.h" #include "runtime/device/root_device.h" #include "runtime/event/async_events_handler.h" #include "runtime/execution_environment/execution_environment.h" diff --git a/runtime/program/build.cpp b/runtime/program/build.cpp index 2f49b3c0eb..4bc683192d 100644 --- a/runtime/program/build.cpp +++ b/runtime/program/build.cpp @@ -7,7 +7,8 @@ #include "core/compiler_interface/compiler_interface.h" #include "core/utilities/time_measure_wrapper.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" +#include "runtime/execution_environment/execution_environment.h" #include "runtime/gtpin/gtpin_notify.h" #include "runtime/helpers/validators.h" #include "runtime/platform/platform.h" diff --git a/runtime/program/compile.cpp b/runtime/program/compile.cpp index c3c9db2b8e..650e9ba21c 100644 --- a/runtime/program/compile.cpp +++ b/runtime/program/compile.cpp @@ -7,7 +7,8 @@ #include "core/compiler_interface/compiler_interface.h" #include "core/elf/writer.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" +#include "runtime/execution_environment/execution_environment.h" #include "runtime/helpers/validators.h" #include "runtime/platform/platform.h" #include "runtime/source_level_debugger/source_level_debugger.h" diff --git a/runtime/program/create.inl b/runtime/program/create.inl index 86f06745e8..d1a98a4cf1 100644 --- a/runtime/program/create.inl +++ b/runtime/program/create.inl @@ -6,8 +6,9 @@ */ #include "core/debug_settings/debug_settings_manager.h" +#include "core/memory_manager/memory_constants.h" #include "runtime/context/context.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/helpers/string_helpers.h" #include "runtime/platform/platform.h" #include "runtime/program/program.h" diff --git a/runtime/program/get_info.cpp b/runtime/program/get_info.cpp index d25635e86f..7888544ee7 100644 --- a/runtime/program/get_info.cpp +++ b/runtime/program/get_info.cpp @@ -8,7 +8,7 @@ #include "core/helpers/get_info.h" #include "runtime/context/context.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/helpers/base_object.h" #include "runtime/helpers/validators.h" #include "runtime/program/kernel_info.h" diff --git a/runtime/program/kernel_info.cpp b/runtime/program/kernel_info.cpp index 539b01cff8..ac6abbd3fc 100644 --- a/runtime/program/kernel_info.cpp +++ b/runtime/program/kernel_info.cpp @@ -10,7 +10,7 @@ #include "core/helpers/hw_cmds.h" #include "core/helpers/ptr_math.h" #include "core/helpers/string.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/helpers/dispatch_info.h" #include "runtime/kernel/kernel.h" #include "runtime/mem_obj/buffer.h" diff --git a/runtime/program/link.cpp b/runtime/program/link.cpp index 7459f2363f..3e5e7b3951 100644 --- a/runtime/program/link.cpp +++ b/runtime/program/link.cpp @@ -8,7 +8,8 @@ #include "core/compiler_interface/compiler_interface.h" #include "core/elf/writer.h" #include "core/utilities/stackvec.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" +#include "runtime/execution_environment/execution_environment.h" #include "runtime/helpers/validators.h" #include "runtime/platform/platform.h" #include "runtime/program/program.h" diff --git a/runtime/program/printf_handler.cpp b/runtime/program/printf_handler.cpp index 856a822134..c6d7890c30 100644 --- a/runtime/program/printf_handler.cpp +++ b/runtime/program/printf_handler.cpp @@ -10,7 +10,7 @@ #include "core/helpers/aligned_memory.h" #include "core/helpers/ptr_math.h" #include "core/program/print_formatter.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/helpers/dispatch_info.h" #include "runtime/kernel/kernel.h" #include "runtime/mem_obj/buffer.h" diff --git a/runtime/program/process_gen_binary.cpp b/runtime/program/process_gen_binary.cpp index 995e5b6115..28b817430a 100644 --- a/runtime/program/process_gen_binary.cpp +++ b/runtime/program/process_gen_binary.cpp @@ -17,7 +17,7 @@ #include "core/program/program_info_from_patchtokens.h" #include "core/program/program_initialization.h" #include "runtime/context/context.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/gtpin/gtpin_notify.h" #include "runtime/memory_manager/memory_manager.h" #include "runtime/program/kernel_info.h" diff --git a/runtime/program/program.cpp b/runtime/program/program.cpp index 1bf7e6565a..2bbc67fae7 100644 --- a/runtime/program/program.cpp +++ b/runtime/program/program.cpp @@ -16,7 +16,7 @@ #include "core/os_interface/os_context.h" #include "runtime/command_stream/command_stream_receiver.h" #include "runtime/context/context.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/memory_manager/memory_manager.h" #include "runtime/platform/platform.h" #include "runtime/program/block_kernel_manager.h" diff --git a/runtime/sampler/sampler.cpp b/runtime/sampler/sampler.cpp index d4f63ab72b..18543a17bd 100644 --- a/runtime/sampler/sampler.cpp +++ b/runtime/sampler/sampler.cpp @@ -10,7 +10,7 @@ #include "core/helpers/get_info.h" #include "core/helpers/hw_info.h" #include "runtime/context/context.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "patch_list.h" diff --git a/runtime/scheduler/scheduler_kernel.cpp b/runtime/scheduler/scheduler_kernel.cpp index 0e13d2daf1..7e72a0ab00 100644 --- a/runtime/scheduler/scheduler_kernel.cpp +++ b/runtime/scheduler/scheduler_kernel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2019 Intel Corporation + * Copyright (C) 2017-2020 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,7 +8,7 @@ #include "runtime/scheduler/scheduler_kernel.h" #include "core/helpers/hw_helper.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include diff --git a/runtime/sharings/d3d/d3d_surface.cpp b/runtime/sharings/d3d/d3d_surface.cpp index bec029d4db..733632bbf4 100644 --- a/runtime/sharings/d3d/d3d_surface.cpp +++ b/runtime/sharings/d3d/d3d_surface.cpp @@ -11,7 +11,7 @@ #include "core/gmm_helper/gmm_types_converter.h" #include "core/helpers/get_info.h" #include "runtime/context/context.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/helpers/memory_properties_flags_helpers.h" #include "runtime/mem_obj/image.h" #include "runtime/mem_obj/mem_obj_helper.h" diff --git a/runtime/sharings/d3d/d3d_texture.cpp b/runtime/sharings/d3d/d3d_texture.cpp index c9aeed8979..de82899593 100644 --- a/runtime/sharings/d3d/d3d_texture.cpp +++ b/runtime/sharings/d3d/d3d_texture.cpp @@ -13,7 +13,7 @@ #include "core/helpers/get_info.h" #include "core/helpers/hw_helper.h" #include "runtime/context/context.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/mem_obj/image.h" #include "runtime/memory_manager/memory_manager.h" diff --git a/runtime/sharings/gl/windows/cl_gl_api.cpp b/runtime/sharings/gl/windows/cl_gl_api.cpp index fff9eca5c5..b125e80769 100644 --- a/runtime/sharings/gl/windows/cl_gl_api.cpp +++ b/runtime/sharings/gl/windows/cl_gl_api.cpp @@ -10,7 +10,7 @@ #include "runtime/api/api.h" #include "runtime/command_queue/command_queue.h" #include "runtime/context/context.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/event/async_events_handler.h" #include "runtime/helpers/base_object.h" #include "runtime/helpers/validators.h" diff --git a/runtime/sharings/gl/windows/gl_buffer_windows.cpp b/runtime/sharings/gl/windows/gl_buffer_windows.cpp index cb2950396b..8e18824cc7 100644 --- a/runtime/sharings/gl/windows/gl_buffer_windows.cpp +++ b/runtime/sharings/gl/windows/gl_buffer_windows.cpp @@ -9,7 +9,7 @@ #include "core/helpers/get_info.h" #include "public/cl_gl_private_intel.h" #include "runtime/context/context.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/mem_obj/buffer.h" #include "runtime/memory_manager/memory_manager.h" #include "runtime/sharings/gl/gl_buffer.h" diff --git a/runtime/sharings/gl/windows/gl_texture_windows.cpp b/runtime/sharings/gl/windows/gl_texture_windows.cpp index 00066dcb5a..22f8e65732 100644 --- a/runtime/sharings/gl/windows/gl_texture_windows.cpp +++ b/runtime/sharings/gl/windows/gl_texture_windows.cpp @@ -14,7 +14,7 @@ #include "core/helpers/hw_info.h" #include "public/cl_gl_private_intel.h" #include "runtime/context/context.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/mem_obj/image.h" #include "runtime/memory_manager/memory_manager.h" #include "runtime/sharings/gl/gl_texture.h" diff --git a/runtime/sharings/va/cl_va_api.cpp b/runtime/sharings/va/cl_va_api.cpp index 382df64b6e..285f45e18c 100644 --- a/runtime/sharings/va/cl_va_api.cpp +++ b/runtime/sharings/va/cl_va_api.cpp @@ -10,7 +10,7 @@ #include "runtime/api/api.h" #include "runtime/command_queue/command_queue.h" #include "runtime/context/context.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/platform/platform.h" #include "runtime/sharings/va/va_sharing.h" #include "runtime/sharings/va/va_surface.h" diff --git a/runtime/sharings/va/va_surface.cpp b/runtime/sharings/va/va_surface.cpp index 58f0765911..97d8fb7430 100644 --- a/runtime/sharings/va/va_surface.cpp +++ b/runtime/sharings/va/va_surface.cpp @@ -10,7 +10,7 @@ #include "core/gmm_helper/gmm.h" #include "core/helpers/get_info.h" #include "runtime/context/context.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/mem_obj/image.h" #include "runtime/memory_manager/memory_manager.h" diff --git a/unit_tests/api/cl_add_comment_to_aub_tests.inl b/unit_tests/api/cl_add_comment_to_aub_tests.inl index 13b467b256..96e702185e 100644 --- a/unit_tests/api/cl_add_comment_to_aub_tests.inl +++ b/unit_tests/api/cl_add_comment_to_aub_tests.inl @@ -7,7 +7,7 @@ #include "core/execution_environment/root_device_environment.h" #include "runtime/context/context.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/execution_environment/execution_environment.h" #include "runtime/platform/platform.h" #include "unit_tests/api/cl_api_tests.h" diff --git a/unit_tests/api/cl_create_program_with_built_in_kernels_tests.cpp b/unit_tests/api/cl_create_program_with_built_in_kernels_tests.cpp index fb4aefbc45..e00ca948cb 100644 --- a/unit_tests/api/cl_create_program_with_built_in_kernels_tests.cpp +++ b/unit_tests/api/cl_create_program_with_built_in_kernels_tests.cpp @@ -8,6 +8,7 @@ #include "core/compiler_interface/compiler_interface.h" #include "runtime/built_ins/built_ins.h" #include "runtime/context/context.h" +#include "runtime/device/cl_device.h" #include "runtime/device/device.h" #include "runtime/helpers/base_object.h" #include "runtime/kernel/kernel.h" diff --git a/unit_tests/api/gl/cl_get_gl_context_info_khr_tests.cpp b/unit_tests/api/gl/cl_get_gl_context_info_khr_tests.cpp index 9411626333..d1b1dcde17 100644 --- a/unit_tests/api/gl/cl_get_gl_context_info_khr_tests.cpp +++ b/unit_tests/api/gl/cl_get_gl_context_info_khr_tests.cpp @@ -7,7 +7,7 @@ #include "core/helpers/hw_info.h" #include "core/helpers/options.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "unit_tests/api/cl_api_tests.h" #include "unit_tests/os_interface/windows/gl/gl_dll_helper.h" diff --git a/unit_tests/fixtures/device_host_queue_fixture.h b/unit_tests/fixtures/device_host_queue_fixture.h index fc9fcf02b5..39fe0489d1 100644 --- a/unit_tests/fixtures/device_host_queue_fixture.h +++ b/unit_tests/fixtures/device_host_queue_fixture.h @@ -7,6 +7,7 @@ #pragma once #include "runtime/command_queue/command_queue.h" +#include "runtime/device/cl_device.h" #include "runtime/device_queue/device_queue.h" #include "runtime/device_queue/device_queue_hw.h" #include "test.h" diff --git a/unit_tests/fixtures/kernel_data_fixture.h b/unit_tests/fixtures/kernel_data_fixture.h index 3d3560575e..d38cc83928 100644 --- a/unit_tests/fixtures/kernel_data_fixture.h +++ b/unit_tests/fixtures/kernel_data_fixture.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2019 Intel Corporation + * Copyright (C) 2017-2020 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,7 +7,7 @@ #pragma once -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/memory_manager/memory_manager.h" #include "runtime/program/kernel_info.h" #include "unit_tests/mocks/mock_context.h" diff --git a/unit_tests/fixtures/platform_fixture.cpp b/unit_tests/fixtures/platform_fixture.cpp index 7f219c2e3d..5095a19fff 100644 --- a/unit_tests/fixtures/platform_fixture.cpp +++ b/unit_tests/fixtures/platform_fixture.cpp @@ -7,7 +7,7 @@ #include "unit_tests/fixtures/platform_fixture.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/platform/platform.h" #include "unit_tests/libult/create_command_stream.h" diff --git a/unit_tests/mem_obj/image_validate_tests.cpp b/unit_tests/mem_obj/image_validate_tests.cpp index 9dadfe8d1a..4179999f3f 100644 --- a/unit_tests/mem_obj/image_validate_tests.cpp +++ b/unit_tests/mem_obj/image_validate_tests.cpp @@ -6,6 +6,7 @@ */ #include "core/helpers/aligned_memory.h" +#include "runtime/device/cl_device.h" #include "runtime/helpers/convert_color.h" #include "runtime/helpers/surface_formats.h" #include "runtime/mem_obj/image.h" diff --git a/unit_tests/mocks/mock_device.h b/unit_tests/mocks/mock_device.h index 8858dada0b..0384d7e14b 100644 --- a/unit_tests/mocks/mock_device.h +++ b/unit_tests/mocks/mock_device.h @@ -7,6 +7,7 @@ #pragma once #include "core/helpers/hw_helper.h" +#include "runtime/device/cl_device.h" #include "runtime/device/root_device.h" #include "runtime/device/sub_device.h" #include "unit_tests/fixtures/mock_aub_center_fixture.h" diff --git a/unit_tests/mocks/mock_kernel.h b/unit_tests/mocks/mock_kernel.h index 19a9608cd5..a47bc815f0 100644 --- a/unit_tests/mocks/mock_kernel.h +++ b/unit_tests/mocks/mock_kernel.h @@ -9,6 +9,7 @@ #include "core/helpers/string.h" #include "core/kernel/grf_config.h" +#include "runtime/device/cl_device.h" #include "runtime/device/device.h" #include "runtime/kernel/kernel.h" #include "runtime/platform/platform.h" diff --git a/unit_tests/program/program_with_block_kernels_tests.cpp b/unit_tests/program/program_with_block_kernels_tests.cpp index 84c1e334c8..7fe04254e1 100644 --- a/unit_tests/program/program_with_block_kernels_tests.cpp +++ b/unit_tests/program/program_with_block_kernels_tests.cpp @@ -6,6 +6,7 @@ */ #include "core/compiler_interface/compiler_interface.h" +#include "runtime/device/cl_device.h" #include "runtime/device/device.h" #include "runtime/program/block_kernel_manager.h" #include "unit_tests/fixtures/context_fixture.h" diff --git a/unit_tests/sharings/gl/windows/gl_reused_buffers_tests.cpp b/unit_tests/sharings/gl/windows/gl_reused_buffers_tests.cpp index 1dcce4aed9..bdeacdf520 100644 --- a/unit_tests/sharings/gl/windows/gl_reused_buffers_tests.cpp +++ b/unit_tests/sharings/gl/windows/gl_reused_buffers_tests.cpp @@ -7,6 +7,7 @@ #include "core/gmm_helper/gmm.h" #include "core/gmm_helper/resource_info.h" +#include "runtime/device/cl_device.h" #include "runtime/mem_obj/buffer.h" #include "runtime/sharings/gl/gl_buffer.h" #include "test.h" diff --git a/unit_tests/sharings/va/va_sharing_tests.cpp b/unit_tests/sharings/va/va_sharing_tests.cpp index e53666d203..e22f8563cc 100644 --- a/unit_tests/sharings/va/va_sharing_tests.cpp +++ b/unit_tests/sharings/va/va_sharing_tests.cpp @@ -10,7 +10,7 @@ #include "core/memory_manager/graphics_allocation.h" #include "core/unit_tests/helpers/debug_manager_state_restore.h" #include "runtime/api/api.h" -#include "runtime/device/device.h" +#include "runtime/device/cl_device.h" #include "runtime/platform/platform.h" #include "runtime/sharings/va/cl_va_api.h" #include "runtime/sharings/va/va_sharing.h"