diff --git a/level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl b/level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl index 5cf1141be6..7406e63f18 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl @@ -19,6 +19,7 @@ #include "shared/source/memory_manager/internal_allocation_storage.h" #include "shared/source/memory_manager/prefetch_manager.h" #include "shared/source/memory_manager/unified_memory_manager.h" +#include "shared/source/os_interface/os_context.h" #include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.h" #include "level_zero/core/source/cmdqueue/cmdqueue_hw.h" diff --git a/level_zero/core/source/cmdqueue/cmdqueue.cpp b/level_zero/core/source/cmdqueue/cmdqueue.cpp index 3fc69a656a..f1e36dd96f 100644 --- a/level_zero/core/source/cmdqueue/cmdqueue.cpp +++ b/level_zero/core/source/cmdqueue/cmdqueue.cpp @@ -15,6 +15,7 @@ #include "shared/source/debugger/debugger_l0.h" #include "shared/source/memory_manager/allocation_properties.h" #include "shared/source/memory_manager/memory_manager.h" +#include "shared/source/os_interface/os_context.h" #include "level_zero/core/source/cmdqueue/cmdqueue_imp.h" #include "level_zero/core/source/device/device.h" diff --git a/level_zero/core/source/device/bcs_split.cpp b/level_zero/core/source/device/bcs_split.cpp index c54bbc435a..6ed773ea18 100644 --- a/level_zero/core/source/device/bcs_split.cpp +++ b/level_zero/core/source/device/bcs_split.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Intel Corporation + * Copyright (C) 2022-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,6 +8,7 @@ #include "level_zero/core/source/device/bcs_split.h" #include "shared/source/command_stream/command_stream_receiver.h" +#include "shared/source/os_interface/os_context.h" #include "level_zero/core/source/device/device_imp.h" diff --git a/level_zero/core/source/device/device_imp.cpp b/level_zero/core/source/device/device_imp.cpp index 670aa5d036..ec153af6eb 100644 --- a/level_zero/core/source/device/device_imp.cpp +++ b/level_zero/core/source/device/device_imp.cpp @@ -30,6 +30,7 @@ #include "shared/source/memory_manager/memory_manager.h" #include "shared/source/os_interface/driver_info.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/os_context.h" #include "shared/source/os_interface/os_interface.h" #include "shared/source/os_interface/os_time.h" #include "shared/source/source_level_debugger/source_level_debugger.h" diff --git a/opencl/source/command_queue/CMakeLists.txt b/opencl/source/command_queue/CMakeLists.txt index 5e782f5c18..e63cac5f08 100644 --- a/opencl/source/command_queue/CMakeLists.txt +++ b/opencl/source/command_queue/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2018-2022 Intel Corporation +# Copyright (C) 2018-2023 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -15,6 +15,7 @@ set(RUNTIME_SRCS_COMMAND_QUEUE ${CMAKE_CURRENT_SOURCE_DIR}/command_queue_hw_bdw_and_later.inl ${CMAKE_CURRENT_SOURCE_DIR}/copy_engine_state.h ${CMAKE_CURRENT_SOURCE_DIR}/cpu_data_transfer_handler.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/csr_selection_args.cpp ${CMAKE_CURRENT_SOURCE_DIR}/csr_selection_args.h ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_barrier.h ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_common.h diff --git a/opencl/source/command_queue/command_queue.cpp b/opencl/source/command_queue/command_queue.cpp index f02275230e..af21f38a60 100644 --- a/opencl/source/command_queue/command_queue.cpp +++ b/opencl/source/command_queue/command_queue.cpp @@ -17,6 +17,7 @@ #include "shared/source/helpers/array_count.h" #include "shared/source/helpers/bit_helpers.h" #include "shared/source/helpers/engine_node_helper.h" +#include "shared/source/helpers/flush_stamp.h" #include "shared/source/helpers/get_info.h" #include "shared/source/helpers/ptr_math.h" #include "shared/source/helpers/string.h" diff --git a/opencl/source/command_queue/command_queue_hw.h b/opencl/source/command_queue/command_queue_hw.h index 00a3205603..957a251e1e 100644 --- a/opencl/source/command_queue/command_queue_hw.h +++ b/opencl/source/command_queue/command_queue_hw.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,6 +10,7 @@ #include "shared/source/command_stream/preemption.h" #include "shared/source/helpers/engine_control.h" #include "shared/source/memory_manager/graphics_allocation.h" +#include "shared/source/os_interface/os_context.h" #include "opencl/source/cl_device/cl_device.h" #include "opencl/source/command_queue/command_queue.h" diff --git a/opencl/source/command_queue/cpu_data_transfer_handler.cpp b/opencl/source/command_queue/cpu_data_transfer_handler.cpp index 8430dcb43b..4df0a32cfd 100644 --- a/opencl/source/command_queue/cpu_data_transfer_handler.cpp +++ b/opencl/source/command_queue/cpu_data_transfer_handler.cpp @@ -7,6 +7,7 @@ #include "shared/source/command_stream/command_stream_receiver.h" #include "shared/source/device/device.h" +#include "shared/source/helpers/flush_stamp.h" #include "shared/source/helpers/get_info.h" #include "opencl/source/command_queue/command_queue.h" diff --git a/opencl/source/command_queue/csr_selection_args.cpp b/opencl/source/command_queue/csr_selection_args.cpp new file mode 100644 index 0000000000..d218fc0e94 --- /dev/null +++ b/opencl/source/command_queue/csr_selection_args.cpp @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "opencl/source/command_queue/csr_selection_args.h" + +#include "opencl/source/mem_obj/buffer.h" +#include "opencl/source/mem_obj/image.h" + +namespace NEO { + +void CsrSelectionArgs::processResource(const Image &image, uint32_t rootDeviceIndex, Resource &outResource) { + processResource(image.getMultiGraphicsAllocation(), rootDeviceIndex, outResource); + outResource.image = ℑ +} + +void CsrSelectionArgs::processResource(const Buffer &buffer, uint32_t rootDeviceIndex, Resource &outResource) { + processResource(buffer.getMultiGraphicsAllocation(), rootDeviceIndex, outResource); +} + +void CsrSelectionArgs::processResource(const MultiGraphicsAllocation &multiGfxAlloc, uint32_t rootDeviceIndex, Resource &outResource) { + auto allocation = multiGfxAlloc.getGraphicsAllocation(rootDeviceIndex); + if (allocation) { + processResource(*allocation, rootDeviceIndex, outResource); + } +} + +void CsrSelectionArgs::processResource(const GraphicsAllocation &gfxAlloc, uint32_t rootDeviceIndex, Resource &outResource) { + outResource.allocation = &gfxAlloc; + outResource.isLocal = gfxAlloc.isAllocatedInLocalMemoryPool(); +} + +} // namespace NEO \ No newline at end of file diff --git a/opencl/source/command_queue/csr_selection_args.h b/opencl/source/command_queue/csr_selection_args.h index 7449d76547..bf780217f2 100644 --- a/opencl/source/command_queue/csr_selection_args.h +++ b/opencl/source/command_queue/csr_selection_args.h @@ -1,19 +1,19 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once - -#include "shared/source/memory_manager/multi_graphics_allocation.h" - -#include "opencl/source/mem_obj/buffer.h" -#include "opencl/source/mem_obj/image.h" -#include "opencl/source/mem_obj/mem_obj.h" +#include "opencl/source/api/cl_types.h" namespace NEO { +class MultiGraphicsAllocation; +class GraphicsAllocation; +class Image; +class Buffer; + enum class TransferDirection { HostToHost, HostToLocal, @@ -63,26 +63,13 @@ struct CsrSelectionArgs { } } - static void processResource(const Image &image, uint32_t rootDeviceIndex, Resource &outResource) { - processResource(image.getMultiGraphicsAllocation(), rootDeviceIndex, outResource); - outResource.image = ℑ - } + static void processResource(const Image &image, uint32_t rootDeviceIndex, Resource &outResource); - static void processResource(const Buffer &buffer, uint32_t rootDeviceIndex, Resource &outResource) { - processResource(buffer.getMultiGraphicsAllocation(), rootDeviceIndex, outResource); - } + static void processResource(const Buffer &buffer, uint32_t rootDeviceIndex, Resource &outResource); - static void processResource(const MultiGraphicsAllocation &multiGfxAlloc, uint32_t rootDeviceIndex, Resource &outResource) { - auto allocation = multiGfxAlloc.getGraphicsAllocation(rootDeviceIndex); - if (allocation) { - processResource(*allocation, rootDeviceIndex, outResource); - } - } + static void processResource(const MultiGraphicsAllocation &multiGfxAlloc, uint32_t rootDeviceIndex, Resource &outResource); - static void processResource(const GraphicsAllocation &gfxAlloc, uint32_t rootDeviceIndex, Resource &outResource) { - outResource.allocation = &gfxAlloc; - outResource.isLocal = gfxAlloc.isAllocatedInLocalMemoryPool(); - } + static void processResource(const GraphicsAllocation &gfxAlloc, uint32_t rootDeviceIndex, Resource &outResource); static inline TransferDirection createTransferDirection(bool srcLocal, bool dstLocal) { if (srcLocal) { diff --git a/opencl/source/command_queue/enqueue_common.h b/opencl/source/command_queue/enqueue_common.h index 889a177c36..a854b432c2 100644 --- a/opencl/source/command_queue/enqueue_common.h +++ b/opencl/source/command_queue/enqueue_common.h @@ -10,6 +10,7 @@ #include "shared/source/command_stream/command_stream_receiver.h" #include "shared/source/command_stream/wait_status.h" #include "shared/source/helpers/engine_node_helper.h" +#include "shared/source/helpers/flush_stamp.h" #include "shared/source/helpers/pipe_control_args.h" #include "shared/source/memory_manager/internal_allocation_storage.h" #include "shared/source/memory_manager/memory_manager.h" diff --git a/opencl/source/command_queue/resource_barrier.cpp b/opencl/source/command_queue/resource_barrier.cpp index 0a555b513e..06f3be0130 100644 --- a/opencl/source/command_queue/resource_barrier.cpp +++ b/opencl/source/command_queue/resource_barrier.cpp @@ -14,6 +14,7 @@ #include "opencl/source/command_queue/command_queue.h" #include "opencl/source/context/context.h" #include "opencl/source/helpers/cl_validators.h" +#include "opencl/source/mem_obj/mem_obj.h" namespace NEO { BarrierCommand::BarrierCommand(CommandQueue *commandQueue, const cl_resource_barrier_descriptor_intel *descriptors, uint32_t numDescriptors) : numSurfaces(numDescriptors) { diff --git a/opencl/source/context/context.cpp b/opencl/source/context/context.cpp index 76c88d5580..becbf733cd 100644 --- a/opencl/source/context/context.cpp +++ b/opencl/source/context/context.cpp @@ -26,6 +26,7 @@ #include "opencl/source/helpers/cl_validators.h" #include "opencl/source/helpers/get_info_status_mapper.h" #include "opencl/source/helpers/surface_formats.h" +#include "opencl/source/mem_obj/buffer.h" #include "opencl/source/mem_obj/image.h" #include "opencl/source/platform/platform.h" #include "opencl/source/sharings/sharing_factory.h" diff --git a/opencl/source/event/event.cpp b/opencl/source/event/event.cpp index 05e4d6fef0..288c4ae32b 100644 --- a/opencl/source/event/event.cpp +++ b/opencl/source/event/event.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,6 +12,7 @@ #include "shared/source/device/device.h" #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/helpers/aligned_memory.h" +#include "shared/source/helpers/flush_stamp.h" #include "shared/source/helpers/get_info.h" #include "shared/source/helpers/mt_helpers.h" #include "shared/source/helpers/timestamp_packet.h" @@ -675,6 +676,12 @@ cl_int Event::waitForEvents(cl_uint numEvents, return CL_SUCCESS; } +void Event::setCommand(std::unique_ptr newCmd) { + UNRECOVERABLE_IF(cmdToSubmit.load()); + cmdToSubmit.exchange(newCmd.release()); + eventWithoutCommand = false; +} + inline void Event::setExecutionStatusToAbortedDueToGpuHang(cl_event *first, cl_event *last) { std::for_each(first, last, [](cl_event &e) { Event *event = castToObjectOrAbort(e); diff --git a/opencl/source/event/event.h b/opencl/source/event/event.h index 9b42029f12..a502fe415d 100644 --- a/opencl/source/event/event.h +++ b/opencl/source/event/event.h @@ -6,29 +6,30 @@ */ #pragma once -#include "shared/source/command_stream/wait_status.h" -#include "shared/source/helpers/flush_stamp.h" +#include "shared/source/helpers/completion_stamp.h" #include "shared/source/os_interface/os_time.h" -#include "shared/source/os_interface/performance_counters.h" #include "shared/source/utilities/idlist.h" #include "shared/source/utilities/iflist.h" #include "opencl/source/api/cl_types.h" #include "opencl/source/command_queue/copy_engine_state.h" #include "opencl/source/helpers/base_object.h" -#include "opencl/source/helpers/task_information.h" #include #include #include namespace NEO { +class Command; +class TagNodeBase; +class FlushStampTracker; template class TagNode; class CommandQueue; class Context; class Device; class TimestampPacketContainer; +enum class WaitStatus; template <> struct OpenCLObjectMapper<_cl_event> { @@ -140,11 +141,8 @@ class Event : public BaseObject<_cl_event>, public IDNode { static cl_int waitForEvents(cl_uint numEvents, const cl_event *eventList); - void setCommand(std::unique_ptr newCmd) { - UNRECOVERABLE_IF(cmdToSubmit.load()); - cmdToSubmit.exchange(newCmd.release()); - eventWithoutCommand = false; - } + void setCommand(std::unique_ptr newCmd); + Command *peekCommand() { return cmdToSubmit; } diff --git a/opencl/source/helpers/properties_helper.cpp b/opencl/source/helpers/properties_helper.cpp index 70a4df04be..2ac199bd1a 100644 --- a/opencl/source/helpers/properties_helper.cpp +++ b/opencl/source/helpers/properties_helper.cpp @@ -11,6 +11,7 @@ #include "shared/source/compiler_interface/compiler_cache.h" #include "shared/source/helpers/timestamp_packet.h" #include "shared/source/memory_manager/memory_manager.h" +#include "shared/source/os_interface/os_context.h" #include "opencl/source/command_queue/command_queue.h" #include "opencl/source/helpers/mipmap.h" diff --git a/opencl/source/helpers/task_information.cpp b/opencl/source/helpers/task_information.cpp index 1b0059a525..3fadb49030 100644 --- a/opencl/source/helpers/task_information.cpp +++ b/opencl/source/helpers/task_information.cpp @@ -12,6 +12,7 @@ #include "shared/source/command_stream/linear_stream.h" #include "shared/source/command_stream/preemption.h" #include "shared/source/command_stream/wait_status.h" +#include "shared/source/helpers/flush_stamp.h" #include "shared/source/memory_manager/internal_allocation_storage.h" #include "shared/source/memory_manager/surface.h" diff --git a/opencl/source/kernel/kernel.cpp b/opencl/source/kernel/kernel.cpp index ae6d3f3d54..9cb219abd9 100644 --- a/opencl/source/kernel/kernel.cpp +++ b/opencl/source/kernel/kernel.cpp @@ -32,6 +32,7 @@ #include "shared/source/memory_manager/memory_manager.h" #include "shared/source/memory_manager/unified_memory_manager.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/os_context.h" #include "shared/source/program/kernel_info.h" #include "shared/source/utilities/lookup_array.h" diff --git a/opencl/source/mem_obj/buffer.cpp b/opencl/source/mem_obj/buffer.cpp index 043cd33ef6..635ec190c8 100644 --- a/opencl/source/mem_obj/buffer.cpp +++ b/opencl/source/mem_obj/buffer.cpp @@ -5,6 +5,8 @@ * */ +#include "opencl/source/mem_obj/buffer.h" + #include "shared/source/command_container/implicit_scaling.h" #include "shared/source/execution_environment/execution_environment.h" #include "shared/source/execution_environment/root_device_environment.h" diff --git a/opencl/source/memory_manager/migration_controller.cpp b/opencl/source/memory_manager/migration_controller.cpp index d3bc655f43..c85cfad744 100644 --- a/opencl/source/memory_manager/migration_controller.cpp +++ b/opencl/source/memory_manager/migration_controller.cpp @@ -14,6 +14,7 @@ #include "opencl/source/command_queue/command_queue.h" #include "opencl/source/context/context.h" +#include "opencl/source/mem_obj/buffer.h" #include "opencl/source/mem_obj/image.h" #include "opencl/source/mem_obj/mem_obj.h" diff --git a/opencl/source/program/program.cpp b/opencl/source/program/program.cpp index 0d10b60d9a..40226c8be3 100644 --- a/opencl/source/program/program.cpp +++ b/opencl/source/program/program.cpp @@ -22,6 +22,7 @@ #include "shared/source/helpers/hw_helper.h" #include "shared/source/memory_manager/memory_manager.h" #include "shared/source/memory_manager/unified_memory_manager.h" +#include "shared/source/os_interface/os_context.h" #include "shared/source/program/kernel_info.h" #include "opencl/source/cl_device/cl_device.h" diff --git a/opencl/test/unit_test/command_queue/command_queue_fixture.cpp b/opencl/test/unit_test/command_queue/command_queue_fixture.cpp index 648ea10e88..e90a9238d7 100644 --- a/opencl/test/unit_test/command_queue/command_queue_fixture.cpp +++ b/opencl/test/unit_test/command_queue/command_queue_fixture.cpp @@ -13,6 +13,7 @@ #include "opencl/source/command_queue/command_queue_hw.h" #include "opencl/source/context/context.h" +#include "opencl/source/mem_obj/buffer.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" #include "opencl/test/unit_test/mocks/mock_command_queue.h" diff --git a/opencl/test/unit_test/command_queue/enqueue_marker_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_marker_tests.cpp index b03959b686..c5f846463c 100644 --- a/opencl/test/unit_test/command_queue/enqueue_marker_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_marker_tests.cpp @@ -1,11 +1,12 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/command_stream/command_stream_receiver.h" +#include "shared/source/helpers/flush_stamp.h" #include "shared/test/common/cmd_parse/gen_cmd_parse.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/libult/ult_command_stream_receiver.h" diff --git a/opencl/test/unit_test/command_stream/cl_tbx_command_stream_tests.cpp b/opencl/test/unit_test/command_stream/cl_tbx_command_stream_tests.cpp index 0db68dbe6a..33a7eb5eab 100644 --- a/opencl/test/unit_test/command_stream/cl_tbx_command_stream_tests.cpp +++ b/opencl/test/unit_test/command_stream/cl_tbx_command_stream_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,6 +12,7 @@ #include "shared/test/common/mocks/mock_tbx_csr.h" #include "shared/test/common/test_macros/hw_test.h" +#include "opencl/source/mem_obj/buffer.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" #include "opencl/test/unit_test/mocks/mock_command_queue.h" #include "opencl/test/unit_test/mocks/mock_context.h" diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp index 2e857782fd..33f481cb0d 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp @@ -8,6 +8,7 @@ #include "shared/source/command_stream/submission_status.h" #include "shared/source/command_stream/wait_status.h" #include "shared/source/direct_submission/dispatchers/blitter_dispatcher.h" +#include "shared/source/helpers/flush_stamp.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/engine_descriptor_helper.h" #include "shared/test/common/helpers/raii_hw_helper.h" diff --git a/opencl/test/unit_test/mem_obj/image_tests.cpp b/opencl/test/unit_test/mem_obj/image_tests.cpp index abbaba3b37..0b42b23bbf 100644 --- a/opencl/test/unit_test/mem_obj/image_tests.cpp +++ b/opencl/test/unit_test/mem_obj/image_tests.cpp @@ -21,6 +21,7 @@ #include "shared/test/common/test_macros/test_checks_shared.h" #include "opencl/source/helpers/mipmap.h" +#include "opencl/source/mem_obj/buffer.h" #include "opencl/source/mem_obj/image.h" #include "opencl/source/mem_obj/mem_obj_helper.h" #include "opencl/test/unit_test/command_queue/command_queue_fixture.h" diff --git a/shared/offline_compiler/source/CMakeLists.txt b/shared/offline_compiler/source/CMakeLists.txt index bd31c4ed81..d68b225e41 100644 --- a/shared/offline_compiler/source/CMakeLists.txt +++ b/shared/offline_compiler/source/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2020-2022 Intel Corporation +# Copyright (C) 2020-2023 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -59,6 +59,7 @@ set(CLOC_LIB_SRCS_LIB ${NEO_SHARED_DIRECTORY}/helpers/product_config_helper.h ${NEO_SHARED_DIRECTORY}/helpers${BRANCH_DIR_SUFFIX}product_config_helper_extra.cpp ${NEO_SHARED_DIRECTORY}/os_interface/os_library.h + ${NEO_SHARED_DIRECTORY}/sku_info/definitions${BRANCH_DIR_SUFFIX}sku_info.cpp ${NEO_SHARED_DIRECTORY}/utilities/directory.h ${NEO_SHARED_DIRECTORY}/utilities/io_functions.cpp ${NEO_SHARED_DIRECTORY}/utilities/io_functions.h diff --git a/shared/source/command_container/cmdcontainer.cpp b/shared/source/command_container/cmdcontainer.cpp index 3d6bf6fa65..f2e18fb78c 100644 --- a/shared/source/command_container/cmdcontainer.cpp +++ b/shared/source/command_container/cmdcontainer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -20,6 +20,7 @@ #include "shared/source/memory_manager/allocation_properties.h" #include "shared/source/memory_manager/allocations_list.h" #include "shared/source/memory_manager/memory_manager.h" +#include "shared/source/os_interface/os_context.h" namespace NEO { diff --git a/shared/source/device/device.h b/shared/source/device/device.h index e67046e0bf..b497e81e93 100644 --- a/shared/source/device/device.h +++ b/shared/source/device/device.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,6 +12,7 @@ #include "shared/source/helpers/non_copyable_or_moveable.h" #include "shared/source/os_interface/hw_info_config.h" #include "shared/source/os_interface/performance_counters.h" +#include "shared/source/utilities/reference_tracked_object.h" namespace NEO { class BindlessHeapsHelper; diff --git a/shared/source/helpers/CMakeLists.txt b/shared/source/helpers/CMakeLists.txt index 7464425925..85b5d0476d 100644 --- a/shared/source/helpers/CMakeLists.txt +++ b/shared/source/helpers/CMakeLists.txt @@ -51,6 +51,7 @@ set(NEO_CORE_HELPERS ${CMAKE_CURRENT_SOURCE_DIR}/dirty_state_helpers.cpp ${CMAKE_CURRENT_SOURCE_DIR}/dirty_state_helpers.h ${CMAKE_CURRENT_SOURCE_DIR}/enable_product.inl + ${CMAKE_CURRENT_SOURCE_DIR}/engine_control.cpp ${CMAKE_CURRENT_SOURCE_DIR}/engine_control.h ${CMAKE_CURRENT_SOURCE_DIR}/engine_node_helper.cpp ${CMAKE_CURRENT_SOURCE_DIR}/engine_node_helper.h diff --git a/shared/source/helpers/engine_control.cpp b/shared/source/helpers/engine_control.cpp new file mode 100644 index 0000000000..a7eb40e1f7 --- /dev/null +++ b/shared/source/helpers/engine_control.cpp @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/source/helpers/engine_control.h" + +#include "shared/source/os_interface/os_context.h" + +namespace NEO { + +const aub_stream::EngineType &EngineControl::getEngineType() const { + return osContext->getEngineType(); +} + +EngineUsage EngineControl::getEngineUsage() const { + return osContext->getEngineUsage(); +} + +} // namespace NEO \ No newline at end of file diff --git a/shared/source/helpers/engine_control.h b/shared/source/helpers/engine_control.h index 9647ccb8c6..aa878ab146 100644 --- a/shared/source/helpers/engine_control.h +++ b/shared/source/helpers/engine_control.h @@ -1,14 +1,19 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once -#include "shared/source/os_interface/os_context.h" +#include "shared/source/helpers/engine_node_helper.h" + +namespace aub_stream { +enum EngineType : uint32_t; +} namespace NEO { +class OsContext; class CommandStreamReceiver; struct EngineControl { @@ -20,7 +25,7 @@ struct EngineControl { CommandStreamReceiver *commandStreamReceiver = nullptr; OsContext *osContext = nullptr; - const aub_stream::EngineType &getEngineType() const { return osContext->getEngineType(); } - EngineUsage getEngineUsage() const { return osContext->getEngineUsage(); } + const aub_stream::EngineType &getEngineType() const; + EngineUsage getEngineUsage() const; }; } // namespace NEO diff --git a/shared/source/memory_manager/allocations_list.cpp b/shared/source/memory_manager/allocations_list.cpp index 1077e55d1a..19c4d6ee8e 100644 --- a/shared/source/memory_manager/allocations_list.cpp +++ b/shared/source/memory_manager/allocations_list.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,6 +10,7 @@ #include "shared/source/command_stream/command_stream_receiver.h" #include "shared/source/command_stream/task_count_helper.h" #include "shared/source/device/device.h" +#include "shared/source/os_interface/os_context.h" namespace { struct ReusableAllocationRequirements { diff --git a/shared/source/memory_manager/graphics_allocation.cpp b/shared/source/memory_manager/graphics_allocation.cpp index 24586242c0..cbdeb887c1 100644 --- a/shared/source/memory_manager/graphics_allocation.cpp +++ b/shared/source/memory_manager/graphics_allocation.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -13,6 +13,7 @@ #include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/bit_helpers.h" #include "shared/source/memory_manager/memory_manager.h" +#include "shared/source/os_interface/os_context.h" #include "shared/source/utilities/logger.h" namespace NEO { diff --git a/shared/source/memory_manager/unified_memory_manager.cpp b/shared/source/memory_manager/unified_memory_manager.cpp index f9eb8d6eda..354a46c9d3 100644 --- a/shared/source/memory_manager/unified_memory_manager.cpp +++ b/shared/source/memory_manager/unified_memory_manager.cpp @@ -18,6 +18,7 @@ #include "shared/source/memory_manager/compression_selector.h" #include "shared/source/memory_manager/memory_manager.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/os_context.h" #include "shared/source/page_fault_manager/cpu_page_fault_manager.h" namespace NEO { diff --git a/shared/source/sku_info/CMakeLists.txt b/shared/source/sku_info/CMakeLists.txt index 33864b56c6..a53ba6f0ab 100644 --- a/shared/source/sku_info/CMakeLists.txt +++ b/shared/source/sku_info/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2019-2021 Intel Corporation +# Copyright (C) 2019-2023 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -8,6 +8,7 @@ set(NEO_CORE_SKU_INFO_BASE ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/sku_info_base.h ${CMAKE_CURRENT_SOURCE_DIR}/operations/sku_info_transfer.h + ${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}sku_info.cpp ${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}sku_info.h ${CMAKE_CURRENT_SOURCE_DIR}/operations${BRANCH_DIR_SUFFIX}sku_info_transfer.cpp ) diff --git a/shared/source/sku_info/definitions/sku_info.cpp b/shared/source/sku_info/definitions/sku_info.cpp new file mode 100644 index 0000000000..d400dc393c --- /dev/null +++ b/shared/source/sku_info/definitions/sku_info.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "sku_info.h" + +#include "shared/source/helpers/hash.h" + +namespace NEO { + +uint64_t FeatureTable::asHash() const { + Hash hash; + + hash.update(reinterpret_cast(&packed), sizeof(packed)); + + return hash.finish(); +} + +uint64_t WorkaroundTable::asHash() const { + Hash hash; + + hash.update(reinterpret_cast(&packed), sizeof(packed)); + + return hash.finish(); +} + +} // namespace NEO \ No newline at end of file diff --git a/shared/source/sku_info/definitions/sku_info.h b/shared/source/sku_info/definitions/sku_info.h index 8918a120b4..9a33cb968e 100644 --- a/shared/source/sku_info/definitions/sku_info.h +++ b/shared/source/sku_info/definitions/sku_info.h @@ -1,33 +1,21 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once -#include "shared/source/helpers/hash.h" #include "shared/source/sku_info/sku_info_base.h" namespace NEO { struct FeatureTable : FeatureTableBase { - uint64_t asHash() const { - Hash hash; - - hash.update(reinterpret_cast(&packed), sizeof(packed)); - - return hash.finish(); - } + uint64_t asHash() const; }; struct WorkaroundTable : WorkaroundTableBase { - uint64_t asHash() const { - Hash hash; - - hash.update(reinterpret_cast(&packed), sizeof(packed)); - - return hash.finish(); - } + uint64_t asHash() const; }; + } // namespace NEO diff --git a/shared/test/common/libult/ult_command_stream_receiver.h b/shared/test/common/libult/ult_command_stream_receiver.h index 91887a6e8a..b655d08d5e 100644 --- a/shared/test/common/libult/ult_command_stream_receiver.h +++ b/shared/test/common/libult/ult_command_stream_receiver.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,6 +12,7 @@ #include "shared/source/direct_submission/direct_submission_hw.h" #include "shared/source/execution_environment/execution_environment.h" #include "shared/source/memory_manager/surface.h" +#include "shared/source/os_interface/os_context.h" #include "shared/test/common/helpers/dispatch_flags_helper.h" #include "shared/test/common/helpers/ult_hw_config.h" #include "shared/test/common/mocks/mock_experimental_command_buffer.h" diff --git a/shared/test/unit_test/debugger/test_l0_debugger_single_address_space.cpp b/shared/test/unit_test/debugger/test_l0_debugger_single_address_space.cpp index b28268383f..ff136bb7f2 100644 --- a/shared/test/unit_test/debugger/test_l0_debugger_single_address_space.cpp +++ b/shared/test/unit_test/debugger/test_l0_debugger_single_address_space.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,6 +8,7 @@ #include "shared/source/command_container/command_encoder.h" #include "shared/source/gmm_helper/gmm_helper.h" #include "shared/source/memory_manager/allocation_properties.h" +#include "shared/source/os_interface/os_context.h" #include "shared/test/common/cmd_parse/gen_cmd_parse.h" #include "shared/test/common/fixtures/device_fixture.h" #include "shared/test/common/helpers/debug_manager_state_restore.h"