mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-18 22:08:53 +08:00
refactor: cleanup includes
Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
0775972769
commit
60376bd98a
@@ -8,6 +8,7 @@
|
||||
#include "level_zero/core/source/printf_handler/printf_handler.h"
|
||||
|
||||
#include "shared/source/command_stream/command_stream_receiver.h"
|
||||
#include "shared/source/device/device.h"
|
||||
#include "shared/source/helpers/blit_properties.h"
|
||||
#include "shared/source/helpers/engine_node_helper.h"
|
||||
#include "shared/source/kernel/kernel_descriptor.h"
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/device/device.h"
|
||||
#include "shared/source/helpers/device_bitfield.h"
|
||||
#include "shared/source/memory_manager/definitions/engine_limits.h"
|
||||
#include "shared/source/os_interface/linux/sys_calls.h"
|
||||
|
||||
#include "level_zero/core/source/device/device.h"
|
||||
|
||||
@@ -6,15 +6,13 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/indirect_heap/heap_size.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/source/os_interface/windows/wddm/wddm.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/source/utilities/buffer_pool_allocator.h"
|
||||
#include "shared/test/common/mocks/mock_execution_environment.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include <typeinfo>
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -10,37 +10,37 @@
|
||||
#include "shared/source/aub/aub_subcapture.h"
|
||||
#include "shared/source/aub_mem_dump/aub_alloc_dump.h"
|
||||
#include "shared/source/aub_mem_dump/aub_alloc_dump.inl"
|
||||
#include "shared/source/aub_mem_dump/page_table_entry_bits.h"
|
||||
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
|
||||
#include "shared/source/command_stream/command_stream_receiver.h"
|
||||
#include "shared/source/command_stream/submission_status.h"
|
||||
#include "shared/source/command_stream/submissions_aggregator.h"
|
||||
#include "shared/source/command_stream/task_count_helper.h"
|
||||
#include "shared/source/command_stream/wait_status.h"
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/execution_environment/execution_environment.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/helpers/aligned_memory.h"
|
||||
#include "shared/source/helpers/api_specific_config.h"
|
||||
#include "shared/source/helpers/constants.h"
|
||||
#include "shared/source/helpers/debug_helpers.h"
|
||||
#include "shared/source/helpers/engine_node_helper.h"
|
||||
#include "shared/source/helpers/flat_batch_buffer_helper.h"
|
||||
#include "shared/source/helpers/hash.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/helpers/kmd_notify_properties.h"
|
||||
#include "shared/source/helpers/neo_driver_version.h"
|
||||
#include "shared/source/helpers/ptr_math.h"
|
||||
#include "shared/source/helpers/string.h"
|
||||
#include "shared/source/helpers/string_helpers.h"
|
||||
#include "shared/source/memory_manager/graphics_allocation.h"
|
||||
#include "shared/source/memory_manager/memory_banks.h"
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
#include "shared/source/memory_manager/memory_operations_handler.h"
|
||||
#include "shared/source/memory_manager/page_table.h"
|
||||
#include "shared/source/os_interface/aub_memory_operations_handler.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
#include "shared/source/utilities/shared_pool_allocation.h"
|
||||
|
||||
#include "aubstream/aubstream.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
namespace NEO {
|
||||
|
||||
|
||||
@@ -9,31 +9,35 @@
|
||||
#include "shared/source/aub/aub_helper.h"
|
||||
#include "shared/source/aub_mem_dump/aub_alloc_dump.h"
|
||||
#include "shared/source/aub_mem_dump/aub_alloc_dump.inl"
|
||||
#include "shared/source/aub_mem_dump/page_table_entry_bits.h"
|
||||
#include "shared/source/command_stream/aub_command_stream_receiver.h"
|
||||
#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.h"
|
||||
#include "shared/source/command_stream/submission_status.h"
|
||||
#include "shared/source/command_stream/submissions_aggregator.h"
|
||||
#include "shared/source/command_stream/task_count_helper.h"
|
||||
#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h"
|
||||
#include "shared/source/command_stream/wait_status.h"
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/execution_environment/execution_environment.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/helpers/aligned_memory.h"
|
||||
#include "shared/source/helpers/api_specific_config.h"
|
||||
#include "shared/source/helpers/constants.h"
|
||||
#include "shared/source/helpers/debug_helpers.h"
|
||||
#include "shared/source/helpers/engine_node_helper.h"
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/helpers/kmd_notify_properties.h"
|
||||
#include "shared/source/helpers/ptr_math.h"
|
||||
#include "shared/source/memory_manager/allocation_type.h"
|
||||
#include "shared/source/memory_manager/graphics_allocation.h"
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
#include "shared/source/os_interface/aub_memory_operations_handler.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
#include "shared/source/page_fault_manager/tbx_page_fault_manager.h"
|
||||
#include "shared/source/memory_manager/memory_operations_handler.h"
|
||||
#include "shared/source/page_fault_manager/cpu_page_fault_manager.h"
|
||||
#include "shared/source/utilities/shared_pool_allocation.h"
|
||||
|
||||
#include <cstdarg>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
|
||||
namespace NEO {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2020-2022 Intel Corporation
|
||||
# Copyright (C) 2020-2025 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
@@ -14,6 +14,7 @@ set(NEO_CORE_DEVICE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/root_device.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sub_device.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sub_device.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sub_device_ids_vec.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/device_get_device_name.cpp
|
||||
)
|
||||
if(WIN32)
|
||||
|
||||
@@ -7,12 +7,11 @@
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/device/device.h"
|
||||
#include "shared/source/device/sub_device_ids_vec.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
using SubDeviceIdsVec = StackVec<uint32_t, 4>;
|
||||
|
||||
class RootDevice;
|
||||
|
||||
class SubDevice : public Device {
|
||||
public:
|
||||
SubDevice(ExecutionEnvironment *executionEnvironment, uint32_t subDeviceIndex, Device &rootDevice);
|
||||
|
||||
17
shared/source/device/sub_device_ids_vec.h
Normal file
17
shared/source/device/sub_device_ids_vec.h
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (C) 2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/utilities/stackvec.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace NEO {
|
||||
|
||||
using SubDeviceIdsVec = StackVec<uint32_t, 4>;
|
||||
|
||||
} // namespace NEO
|
||||
@@ -6,25 +6,37 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/device/sub_device.h"
|
||||
#include "shared/source/command_stream/task_count_helper.h"
|
||||
#include "shared/source/device/sub_device_ids_vec.h"
|
||||
#include "shared/source/helpers/common_types.h"
|
||||
#include "shared/source/helpers/constants.h"
|
||||
#include "shared/source/helpers/device_bitfield.h"
|
||||
#include "shared/source/helpers/engine_control.h"
|
||||
#include "shared/source/helpers/engine_node_helper.h"
|
||||
#include "shared/source/helpers/heap_assigner.h"
|
||||
#include "shared/source/memory_manager/alignment_selector.h"
|
||||
#include "shared/source/memory_manager/definitions/storage_info.h"
|
||||
#include "shared/source/memory_manager/graphics_allocation.h"
|
||||
#include "shared/source/memory_manager/host_ptr_defines.h"
|
||||
#include "shared/source/memory_manager/memadvise_flags.h"
|
||||
#include "shared/source/memory_manager/unified_memory_reuse.h"
|
||||
#include "shared/source/os_interface/os_memory.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
#include "shared/source/utilities/stackvec.h"
|
||||
|
||||
#include "memory_properties_flags.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <limits>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -29,6 +29,26 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
DrmAllocation::DrmAllocation(uint32_t rootDeviceIndex, size_t numGmms, AllocationType allocationType, BufferObject *bo, void *ptrIn, size_t sizeIn, osHandle sharedHandle, MemoryPool pool, uint64_t canonizedGpuAddress)
|
||||
: GraphicsAllocation(rootDeviceIndex, numGmms, allocationType, ptrIn, sizeIn, sharedHandle, pool, MemoryManager::maxOsContextCount, canonizedGpuAddress) {
|
||||
bufferObjects.push_back(bo);
|
||||
resizeBufferObjects(EngineLimits::maxHandleCount);
|
||||
handles.resize(EngineLimits::maxHandleCount, std::numeric_limits<uint64_t>::max());
|
||||
}
|
||||
|
||||
DrmAllocation::DrmAllocation(uint32_t rootDeviceIndex, size_t numGmms, AllocationType allocationType, BufferObject *bo, void *ptrIn, uint64_t canonizedGpuAddress, size_t sizeIn, MemoryPool pool)
|
||||
: GraphicsAllocation(rootDeviceIndex, numGmms, allocationType, ptrIn, canonizedGpuAddress, 0, sizeIn, pool, MemoryManager::maxOsContextCount) {
|
||||
bufferObjects.push_back(bo);
|
||||
resizeBufferObjects(EngineLimits::maxHandleCount);
|
||||
handles.resize(EngineLimits::maxHandleCount, std::numeric_limits<uint64_t>::max());
|
||||
}
|
||||
|
||||
DrmAllocation::DrmAllocation(uint32_t rootDeviceIndex, size_t numGmms, AllocationType allocationType, BufferObjects &bos, void *ptrIn, uint64_t canonizedGpuAddress, size_t sizeIn, MemoryPool pool)
|
||||
: GraphicsAllocation(rootDeviceIndex, numGmms, allocationType, ptrIn, canonizedGpuAddress, 0, sizeIn, pool, MemoryManager::maxOsContextCount),
|
||||
bufferObjects(bos) {
|
||||
handles.resize(EngineLimits::maxHandleCount, std::numeric_limits<uint64_t>::max());
|
||||
}
|
||||
|
||||
DrmAllocation::~DrmAllocation() {
|
||||
[[maybe_unused]] int retCode;
|
||||
for (auto &memory : this->memoryToUnmap) {
|
||||
|
||||
@@ -6,13 +6,15 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/device/sub_device_ids_vec.h"
|
||||
#include "shared/source/memory_manager/graphics_allocation.h"
|
||||
#include "shared/source/memory_manager/memadvise_flags.h"
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
|
||||
namespace NEO {
|
||||
class BufferObject;
|
||||
class MemoryManager;
|
||||
class OsContext;
|
||||
class ProductHelper;
|
||||
class Drm;
|
||||
class OsContextLinux;
|
||||
enum class CachePolicy : uint32_t;
|
||||
@@ -36,25 +38,9 @@ class DrmAllocation : public GraphicsAllocation {
|
||||
MemoryUnmapFunction unmapFunction;
|
||||
};
|
||||
|
||||
DrmAllocation(uint32_t rootDeviceIndex, size_t numGmms, AllocationType allocationType, BufferObject *bo, void *ptrIn, size_t sizeIn, osHandle sharedHandle, MemoryPool pool, uint64_t canonizedGpuAddress)
|
||||
: GraphicsAllocation(rootDeviceIndex, numGmms, allocationType, ptrIn, sizeIn, sharedHandle, pool, MemoryManager::maxOsContextCount, canonizedGpuAddress) {
|
||||
bufferObjects.push_back(bo);
|
||||
resizeBufferObjects(EngineLimits::maxHandleCount);
|
||||
handles.resize(EngineLimits::maxHandleCount, std::numeric_limits<uint64_t>::max());
|
||||
}
|
||||
|
||||
DrmAllocation(uint32_t rootDeviceIndex, size_t numGmms, AllocationType allocationType, BufferObject *bo, void *ptrIn, uint64_t canonizedGpuAddress, size_t sizeIn, MemoryPool pool)
|
||||
: GraphicsAllocation(rootDeviceIndex, numGmms, allocationType, ptrIn, canonizedGpuAddress, 0, sizeIn, pool, MemoryManager::maxOsContextCount) {
|
||||
bufferObjects.push_back(bo);
|
||||
resizeBufferObjects(EngineLimits::maxHandleCount);
|
||||
handles.resize(EngineLimits::maxHandleCount, std::numeric_limits<uint64_t>::max());
|
||||
}
|
||||
|
||||
DrmAllocation(uint32_t rootDeviceIndex, size_t numGmms, AllocationType allocationType, BufferObjects &bos, void *ptrIn, uint64_t canonizedGpuAddress, size_t sizeIn, MemoryPool pool)
|
||||
: GraphicsAllocation(rootDeviceIndex, numGmms, allocationType, ptrIn, canonizedGpuAddress, 0, sizeIn, pool, MemoryManager::maxOsContextCount),
|
||||
bufferObjects(bos) {
|
||||
handles.resize(EngineLimits::maxHandleCount, std::numeric_limits<uint64_t>::max());
|
||||
}
|
||||
DrmAllocation(uint32_t rootDeviceIndex, size_t numGmms, AllocationType allocationType, BufferObject *bo, void *ptrIn, size_t sizeIn, osHandle sharedHandle, MemoryPool pool, uint64_t canonizedGpuAddress);
|
||||
DrmAllocation(uint32_t rootDeviceIndex, size_t numGmms, AllocationType allocationType, BufferObject *bo, void *ptrIn, uint64_t canonizedGpuAddress, size_t sizeIn, MemoryPool pool);
|
||||
DrmAllocation(uint32_t rootDeviceIndex, size_t numGmms, AllocationType allocationType, BufferObjects &bos, void *ptrIn, uint64_t canonizedGpuAddress, size_t sizeIn, MemoryPool pool);
|
||||
|
||||
~DrmAllocation() override;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/helpers/ptr_math.h"
|
||||
#include "shared/source/helpers/register_offsets.h"
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
#include "shared/source/os_interface/linux/drm_wrappers.h"
|
||||
#include "shared/source/os_interface/linux/engine_info.h"
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
#include "shared/source/os_interface/linux/xe/ioctl_helper_xe.h"
|
||||
|
||||
#include "shared/source/debugger/debugger.h"
|
||||
#include "shared/source/execution_environment/execution_environment.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/gmm_helper/client_context/gmm_client_context.h"
|
||||
@@ -16,16 +15,13 @@
|
||||
#include "shared/source/helpers/basic_math.h"
|
||||
#include "shared/source/helpers/common_types.h"
|
||||
#include "shared/source/helpers/constants.h"
|
||||
#include "shared/source/helpers/engine_control.h"
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/helpers/ptr_math.h"
|
||||
#include "shared/source/helpers/string.h"
|
||||
#include "shared/source/helpers/topology.h"
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
#include "shared/source/os_interface/linux/drm_buffer_object.h"
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
#include "shared/source/os_interface/linux/engine_info.h"
|
||||
#include "shared/source/os_interface/linux/file_descriptor.h"
|
||||
#include "shared/source/os_interface/linux/memory_info.h"
|
||||
#include "shared/source/os_interface/linux/os_context_linux.h"
|
||||
#include "shared/source/os_interface/linux/sys_calls.h"
|
||||
@@ -37,6 +33,7 @@
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
#include <sstream>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#define STRINGIFY_ME(X) return #X
|
||||
#define RETURN_ME(X) return X
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/debugger/debugger_l0.h"
|
||||
#include "shared/source/device/device.h"
|
||||
#include "shared/source/kernel/debug_data.h"
|
||||
|
||||
extern NEO::DebugerL0CreateFn mockDebuggerL0HwFactory[];
|
||||
|
||||
Reference in New Issue
Block a user