Refactor headers and reorder include order

Change-Id: I6b341e2b37e569af7d741bfd7a63804c0b25a4c9
This commit is contained in:
Zdanowicz, Zbigniew
2019-02-12 17:27:13 +01:00
committed by sys_ocldev
parent 5160e4d777
commit 8e1e874a76
35 changed files with 84 additions and 69 deletions

View File

@ -17,6 +17,7 @@
#include "instrumentation.h"
#include "runtime/helpers/aligned_memory.h"
#include "runtime/helpers/debug_helpers.h"
#include "runtime/helpers/hw_helper.h"
#include "runtime/helpers/kernel_commands.h"
#include "runtime/helpers/validators.h"
#include "runtime/mem_obj/mem_obj.h"

View File

@ -7,6 +7,7 @@
#pragma once
#include "CL/cl.h"
#include "runtime/command_stream/preemption_mode.h"
#include <cstdint>
namespace OCLRT {
@ -17,7 +18,6 @@ class IndirectHeap;
class Kernel;
class LinearStream;
class TimestampPacket;
enum class PreemptionMode : uint32_t;
struct HwPerfCounter;
struct HwTimeStamps;
struct KernelOperation;

View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2018 Intel Corporation
# Copyright (C) 2018-2019 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
@ -32,6 +32,10 @@ set(RUNTIME_SRCS_COMMAND_STREAM
${CMAKE_CURRENT_SOURCE_DIR}/experimental_command_buffer.inl
${CMAKE_CURRENT_SOURCE_DIR}/linear_stream.cpp
${CMAKE_CURRENT_SOURCE_DIR}/linear_stream.h
${CMAKE_CURRENT_SOURCE_DIR}/preemption.cpp
${CMAKE_CURRENT_SOURCE_DIR}/preemption.h
${CMAKE_CURRENT_SOURCE_DIR}/preemption.inl
${CMAKE_CURRENT_SOURCE_DIR}/preemption_mode.h
${CMAKE_CURRENT_SOURCE_DIR}/scratch_space_controller.cpp
${CMAKE_CURRENT_SOURCE_DIR}/scratch_space_controller.h
${CMAKE_CURRENT_SOURCE_DIR}/scratch_space_controller_base.cpp
@ -44,9 +48,6 @@ set(RUNTIME_SRCS_COMMAND_STREAM
${CMAKE_CURRENT_SOURCE_DIR}/tbx_command_stream_receiver_hw.inl
${CMAKE_CURRENT_SOURCE_DIR}/tbx_stream.cpp
${CMAKE_CURRENT_SOURCE_DIR}/thread_arbitration_policy.h
${CMAKE_CURRENT_SOURCE_DIR}/preemption.h
${CMAKE_CURRENT_SOURCE_DIR}/preemption.cpp
${CMAKE_CURRENT_SOURCE_DIR}/preemption.inl
)
target_sources(${NEO_STATIC_LIB_NAME} PRIVATE ${RUNTIME_SRCS_COMMAND_STREAM})
set_property(GLOBAL PROPERTY RUNTIME_SRCS_COMMAND_STREAM ${RUNTIME_SRCS_COMMAND_STREAM})

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 Intel Corporation
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -7,7 +7,9 @@
#pragma once
#include "runtime/command_stream/linear_stream.h"
#include "runtime/helpers/hw_helper.h"
#include "runtime/command_stream/preemption_mode.h"
#include "runtime/helpers/hw_info.h"
#include "sku_info.h"
namespace OCLRT {
class Kernel;

View File

@ -7,9 +7,10 @@
#include "runtime/built_ins/built_ins.h"
#include "runtime/built_ins/sip.h"
#include "runtime/command_queue/gpgpu_walker.h"
#include "runtime/command_stream/preemption.h"
#include "runtime/device/device.h"
#include "runtime/command_queue/gpgpu_walker.h"
#include "runtime/helpers/hw_helper.h"
#include "runtime/memory_manager/graphics_allocation.h"
namespace OCLRT {

View File

@ -0,0 +1,20 @@
/*
* Copyright (C) 2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <cstdint>
namespace OCLRT {
enum PreemptionMode : uint32_t {
// Keep in sync with ForcePreemptionMode debug variable
Initial = 0,
Disabled = 1,
MidBatch,
ThreadGroup,
MidThread,
};
} // namespace OCLRT

View File

@ -6,10 +6,11 @@
*/
#pragma once
#include <cstdint>
namespace OCLRT {
enum class ContextType {
enum ContextType : uint32_t {
CONTEXT_TYPE_DEFAULT,
CONTEXT_TYPE_SPECIALIZED,
CONTEXT_TYPE_UNRESTRICTIVE

View File

@ -17,6 +17,7 @@
#include "runtime/device/driver_info.h"
#include "runtime/execution_environment/execution_environment.h"
#include "runtime/helpers/debug_helpers.h"
#include "runtime/helpers/hw_helper.h"
#include "runtime/helpers/options.h"
#include "runtime/memory_manager/memory_manager.h"
#include "runtime/os_interface/os_context.h"

View File

@ -8,6 +8,7 @@
#pragma once
#include "runtime/device_queue/device_queue_hw.h"
#include "runtime/command_queue/gpgpu_walker.h"
#include "runtime/helpers/hw_helper.h"
#include "runtime/helpers/kernel_commands.h"
#include "runtime/helpers/preamble.h"
#include "runtime/helpers/string.h"

View File

@ -11,21 +11,13 @@
#include "igfxfmid.h"
#include "sku_info.h"
#include "runtime/command_stream/preemption_mode.h"
#include "runtime/helpers/kmd_notify_properties.h"
#include <cstddef>
#include <string>
namespace OCLRT {
enum class PreemptionMode : uint32_t {
// Keep in sync with ForcePreemptionMode debug variable
Initial = 0,
Disabled = 1,
MidBatch,
ThreadGroup,
MidThread,
};
struct WhitelistedRegisters {
bool csChicken1_0x2580;
bool chicken0hdc_0xE5F0;

View File

@ -5,7 +5,6 @@
*
*/
#include "kernel.h"
#include "runtime/accelerators/intel_accelerator.h"
#include "runtime/accelerators/intel_motion_estimation.h"
#include "runtime/built_ins/built_ins.h"
@ -26,6 +25,8 @@
#include "runtime/helpers/sampler_helpers.h"
#include "runtime/helpers/surface_formats.h"
#include "runtime/kernel/image_transformer.h"
#include "runtime/kernel/kernel.h"
#include "runtime/kernel/kernel.inl"
#include "runtime/mem_obj/buffer.h"
#include "runtime/mem_obj/image.h"
#include "runtime/mem_obj/pipe.h"
@ -34,7 +35,6 @@
#include "runtime/os_interface/debug_settings_manager.h"
#include "runtime/platform/platform.h"
#include "runtime/program/kernel_info.h"
#include "runtime/program/printf_handler.h"
#include "runtime/sampler/sampler.h"
#include "patch_list.h"
@ -42,8 +42,6 @@
#include <cstdint>
#include <vector>
#include "runtime/kernel/kernel.inl"
using namespace iOpenCL;
namespace OCLRT {

View File

@ -1,25 +1,13 @@
/*
* Copyright (c) 2017, Intel Corporation
* Copyright (C) 2017-2019 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
* SPDX-License-Identifier: MIT
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include "runtime/kernel/kernel.h"
#include "runtime/program/printf_handler.h"
namespace OCLRT {
template <bool mockable>

View File

@ -7,6 +7,7 @@
#pragma once
#include "public/cl_ext_private.h"
#include "runtime/command_stream/preemption_mode.h"
#include "runtime/helpers/aligned_memory.h"
#include "runtime/memory_manager/graphics_allocation.h"
#include "runtime/memory_manager/host_ptr_defines.h"
@ -27,8 +28,6 @@ class HostPtrManager;
class OsContext;
struct ImageInfo;
enum class PreemptionMode : uint32_t;
using CsrContainer = std::vector<std::vector<std::unique_ptr<CommandStreamReceiver>>>;
enum AllocationUsage {

View File

@ -1,18 +1,18 @@
/*
* Copyright (C) 2018 Intel Corporation
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "runtime/command_stream/preemption_mode.h"
#include "runtime/utilities/reference_tracked_object.h"
#include "engine_node.h"
#include <memory>
namespace OCLRT {
class OSInterface;
enum class PreemptionMode : uint32_t;
class OsContext : public ReferenceTrackedObject<OsContext> {
public:

View File

@ -6,10 +6,11 @@
*/
#pragma once
#include "runtime/os_interface/os_context.h"
#include "runtime/helpers/debug_helpers.h"
#include "runtime/command_stream/preemption_mode.h"
#include "runtime/gmm_helper/gmm_lib.h"
#include "runtime/helpers/debug_helpers.h"
#include "runtime/memory_manager/memory_constants.h"
#include "runtime/os_interface/os_context.h"
#include "runtime/utilities/spinlock.h"
#include "sku_info.h"
#include <memory>
@ -25,8 +26,6 @@ class WddmAllocation;
class WddmInterface;
class WddmResidencyController;
enum class PreemptionMode : uint32_t;
struct AllocationStorageData;
struct HardwareInfo;
struct KmDafListener;

View File

@ -7,6 +7,7 @@
#include "runtime/aub_mem_dump/page_table_entry_bits.h"
#include "runtime/helpers/hardware_context_controller.h"
#include "runtime/helpers/hw_helper.h"
#include "runtime/os_interface/os_context.h"
#include "test.h"
#include "unit_tests/fixtures/device_fixture.h"

View File

@ -8,6 +8,7 @@
#include "runtime/aub_mem_dump/aub_alloc_dump.h"
#include "runtime/aub_mem_dump/page_table_entry_bits.h"
#include "runtime/helpers/hardware_context_controller.h"
#include "runtime/helpers/hw_helper.h"
#include "runtime/mem_obj/mem_obj_helper.h"
#include "test.h"
#include "third_party/aub_stream/headers/options.h"

View File

@ -12,6 +12,7 @@
#include "runtime/command_stream/tbx_command_stream_receiver_hw.h"
#include "runtime/execution_environment/execution_environment.h"
#include "runtime/helpers/dispatch_info.h"
#include "runtime/helpers/hw_helper.h"
#include "runtime/os_interface/os_context.h"
#include "unit_tests/mocks/mock_allocation_properties.h"
#include "unit_tests/mocks/mock_aub_center.h"

View File

@ -5,12 +5,13 @@
*
*/
#include "runtime/mem_obj/mem_obj.h"
#include "tbx_command_stream_fixture.h"
#include "runtime/command_stream/tbx_command_stream_receiver_hw.h"
#include "runtime/command_stream/command_stream_receiver_hw.h"
#include "runtime/helpers/ptr_math.h"
#include "runtime/helpers/hardware_context_controller.h"
#include "runtime/helpers/hw_helper.h"
#include "runtime/mem_obj/mem_obj.h"
#include "runtime/memory_manager/memory_banks.h"
#include "runtime/os_interface/debug_settings_manager.h"
#include "runtime/os_interface/os_context.h"

View File

@ -9,6 +9,7 @@
#include "runtime/command_stream/preemption.h"
#include "runtime/execution_environment/execution_environment.h"
#include "runtime/helpers/hw_helper.h"
#include "runtime/memory_manager/os_agnostic_memory_manager.h"
#include "unit_tests/fixtures/memory_management_fixture.h"
#include "unit_tests/libult/create_command_stream.h"

View File

@ -6,6 +6,7 @@
*/
#include "runtime/command_stream/preemption.h"
#include "runtime/helpers/hw_helper.h"
#include "runtime/os_interface/os_context.h"
#include "unit_tests/fixtures/memory_manager_fixture.h"
#include "unit_tests/mocks/mock_csr.h"

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 Intel Corporation
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -23,7 +23,6 @@ struct SPatchExecutionEnvironment;
}
namespace OCLRT {
enum class PreemptionMode : uint32_t;
class DispatchInfo;
class MockCommandQueue;
class MockContext;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2018 Intel Corporation
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -7,6 +7,7 @@
#include "runtime/built_ins/built_ins.h"
#include "runtime/command_stream/preemption.h"
#include "runtime/helpers/hw_helper.h"
#include "unit_tests/command_queue/enqueue_fixture.h"
#include "unit_tests/fixtures/preemption_fixture.h"
#include "unit_tests/helpers/hw_parse.h"

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 Intel Corporation
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -7,6 +7,7 @@
#include "runtime/built_ins/built_ins.h"
#include "runtime/command_stream/preemption.h"
#include "runtime/helpers/hw_helper.h"
#include "unit_tests/command_queue/enqueue_fixture.h"
#include "unit_tests/fixtures/preemption_fixture.h"
#include "unit_tests/helpers/hw_parse.h"

View File

@ -11,6 +11,7 @@
#include "runtime/gmm_helper/gmm_helper.h"
#include "runtime/gmm_helper/resource_info.h"
#include "runtime/helpers/array_count.h"
#include "runtime/helpers/hw_helper.h"
#include "runtime/helpers/options.h"
#include "runtime/mem_obj/buffer.h"
#include "mem_obj_types.h"

View File

@ -7,12 +7,14 @@
#include "gtest/gtest.h"
#include "test.h"
#include "unit_tests/mocks/mock_buffer.h"
#include "unit_tests/mocks/mock_csr.h"
#include "hw_cmds.h"
#include "runtime/command_stream/preemption.h"
#include "runtime/helpers/hw_helper.h"
#include "runtime/memory_manager/graphics_allocation.h"
#include "runtime/memory_manager/surface.h"
#include "hw_cmds.h"
#include "unit_tests/mocks/mock_buffer.h"
#include "unit_tests/mocks/mock_csr.h"
#include <type_traits>
using namespace OCLRT;

View File

@ -6,6 +6,7 @@
*/
#include "runtime/command_stream/preemption.h"
#include "runtime/helpers/hw_helper.h"
#include "runtime/os_interface/linux/os_context_linux.h"
#include "runtime/os_interface/linux/os_interface.h"
#include "unit_tests/os_interface/linux/drm_mock.h"

View File

@ -5,27 +5,24 @@
*
*/
#include "unit_tests/os_interface/windows/wddm_fixture.h"
#include "runtime/execution_environment/execution_environment.h"
#include "runtime/gmm_helper/gmm.h"
#include "runtime/gmm_helper/gmm_helper.h"
#include "runtime/helpers/hw_info.h"
#include "runtime/helpers/options.h"
#include "runtime/memory_manager/os_agnostic_memory_manager.h"
#include "runtime/os_interface/windows/os_interface.h"
#include "runtime/os_interface/os_library.h"
#include "runtime/os_interface/os_time.h"
#include "runtime/os_interface/windows/os_context_win.h"
#include "runtime/os_interface/windows/os_interface.h"
#include "runtime/os_interface/windows/wddm_allocation.h"
#include "runtime/os_interface/windows/wddm_engine_mapper.h"
#include "runtime/os_interface/windows/wddm_memory_manager.h"
#include "runtime/os_interface/windows/wddm/wddm_interface.h"
#include "unit_tests/helpers/debug_manager_state_restore.h"
#include "unit_tests/mocks/mock_gmm_resource_info.h"
#include "unit_tests/os_interface/windows/wddm_fixture.h"
#include "gtest/gtest.h"
#include "runtime/os_interface/os_time.h"
#include <memory>
#include <functional>

View File

@ -7,14 +7,15 @@
#include "runtime/command_stream/preemption.h"
#include "runtime/memory_manager/memory_constants.h"
#include "runtime/helpers/hw_helper.h"
#include "runtime/os_interface/windows/gdi_interface.h"
#include "runtime/os_interface/windows/os_context_win.h"
#include "runtime/os_interface/windows/os_interface.h"
#include "unit_tests/fixtures/gmm_environment_fixture.h"
#include "unit_tests/helpers/debug_manager_state_restore.h"
#include "unit_tests/mocks/mock_wddm.h"
#include "unit_tests/mocks/mock_wddm_interface23.h"
#include "unit_tests/os_interface/windows/gdi_dll_fixture.h"
#include "runtime/os_interface/windows/os_context_win.h"
#include "runtime/os_interface/windows/os_interface.h"
#include "test.h"
using namespace OCLRT;

View File

@ -8,6 +8,7 @@
#pragma once
#include "runtime/command_stream/preemption.h"
#include "runtime/helpers/hw_helper.h"
#include "runtime/os_interface/windows/gdi_interface.h"
#include "runtime/os_interface/windows/os_interface.h"
#include "unit_tests/fixtures/gmm_environment_fixture.h"

View File

@ -10,13 +10,12 @@
#include "gtest/gtest.h"
#include "gmock/gmock.h"
#include "test.h"
#include "runtime/os_interface/windows/os_interface.h"
#include "unit_tests/fixtures/gmm_environment_fixture.h"
#include "unit_tests/mocks/mock_context.h"
#include "unit_tests/mocks/mock_gmm_page_table_mngr.h"
#include "unit_tests/mocks/mock_gmm.h"
#include "unit_tests/os_interface/windows/wddm_fixture.h"
#include "runtime/os_interface/windows/os_interface.h"
#include "unit_tests/os_interface/windows/mock_gdi_interface.h"
#include "unit_tests/os_interface/windows/mock_wddm_memory_manager.h"
#include <type_traits>

View File

@ -6,6 +6,7 @@
*/
#include "runtime/command_stream/preemption.h"
#include "runtime/helpers/hw_helper.h"
#include "unit_tests/helpers/debug_manager_state_restore.h"
#include "unit_tests/os_interface/windows/wddm_fixture.h"
#include "test.h"

View File

@ -7,9 +7,10 @@
#include "runtime/command_stream/preemption.h"
#include "runtime/execution_environment/execution_environment.h"
#include "runtime/helpers/hw_helper.h"
#include "runtime/os_interface/os_context.h"
#include "runtime/os_interface/windows/os_context_win.h"
#include "runtime/os_interface/os_interface.h"
#include "runtime/os_interface/windows/os_context_win.h"
#include "runtime/os_interface/windows/os_interface.h"
#include "runtime/os_interface/windows/wddm_residency_controller.h"
#include "runtime/os_interface/windows/wddm/wddm_interface.h"

View File

@ -8,6 +8,7 @@
#include "runtime/command_stream/preemption.h"
#include "runtime/command_queue/command_queue_hw.h"
#include "runtime/helpers/options.h"
#include "runtime/helpers/hw_helper.h"
#include "runtime/helpers/dispatch_info.h"
#include "unit_tests/fixtures/preemption_fixture.h"
#include "unit_tests/helpers/debug_manager_state_restore.h"

View File

@ -5,8 +5,6 @@
*
*/
#include "program_tests.h"
#include "elf/reader.h"
#include "runtime/command_stream/command_stream_receiver_hw.h"
#include "runtime/compiler_interface/compiler_options.h"
@ -21,8 +19,8 @@
#include "runtime/memory_manager/allocations_list.h"
#include "runtime/memory_manager/graphics_allocation.h"
#include "runtime/memory_manager/surface.h"
#include "runtime/program/create.inl"
#include "runtime/os_interface/os_context.h"
#include "runtime/program/create.inl"
#include "unit_tests/fixtures/device_fixture.h"
#include "unit_tests/fixtures/program_fixture.inl"
#include "unit_tests/global_environment.h"
@ -32,6 +30,7 @@
#include "unit_tests/mocks/mock_kernel.h"
#include "unit_tests/mocks/mock_program.h"
#include "unit_tests/program/program_from_binary.h"
#include "unit_tests/program/program_tests.h"
#include "unit_tests/program/program_with_source.h"
#include "unit_tests/utilities/base_object_utils.h"
#include "gtest/gtest.h"