diff --git a/level_zero/core/source/gen11/enable_family_full_l0_gen11.cpp b/level_zero/core/source/gen11/enable_family_full_l0_gen11.cpp index 53bf642183..67b2087ad2 100644 --- a/level_zero/core/source/gen11/enable_family_full_l0_gen11.cpp +++ b/level_zero/core/source/gen11/enable_family_full_l0_gen11.cpp @@ -5,11 +5,11 @@ * */ +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" #include "shared/source/command_stream/command_stream_receiver_hw.h" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" #include "shared/source/helpers/populate_factory.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" #include "opencl/source/mem_obj/buffer.h" #include "level_zero/core/source/helpers/l0_populate_factory.h" diff --git a/level_zero/core/source/gen12lp/enable_family_full_l0_gen12lp.cpp b/level_zero/core/source/gen12lp/enable_family_full_l0_gen12lp.cpp index 253080274c..d6881b4bf9 100644 --- a/level_zero/core/source/gen12lp/enable_family_full_l0_gen12lp.cpp +++ b/level_zero/core/source/gen12lp/enable_family_full_l0_gen12lp.cpp @@ -5,11 +5,11 @@ * */ +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" #include "shared/source/command_stream/command_stream_receiver_hw.h" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" #include "shared/source/helpers/populate_factory.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" #include "opencl/source/mem_obj/buffer.h" #include "level_zero/core/source/helpers/l0_populate_factory.h" diff --git a/level_zero/core/source/gen8/enable_family_full_l0_gen8.cpp b/level_zero/core/source/gen8/enable_family_full_l0_gen8.cpp index ddd6a0b795..13a7f26380 100644 --- a/level_zero/core/source/gen8/enable_family_full_l0_gen8.cpp +++ b/level_zero/core/source/gen8/enable_family_full_l0_gen8.cpp @@ -5,11 +5,11 @@ * */ +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" #include "shared/source/command_stream/command_stream_receiver_hw.h" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" #include "shared/source/helpers/populate_factory.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" #include "opencl/source/mem_obj/buffer.h" namespace NEO { diff --git a/level_zero/core/source/gen9/enable_family_full_l0_gen9.cpp b/level_zero/core/source/gen9/enable_family_full_l0_gen9.cpp index 90f680f55f..dbf4a0b2c0 100644 --- a/level_zero/core/source/gen9/enable_family_full_l0_gen9.cpp +++ b/level_zero/core/source/gen9/enable_family_full_l0_gen9.cpp @@ -5,11 +5,11 @@ * */ +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" #include "shared/source/command_stream/command_stream_receiver_hw.h" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" #include "shared/source/helpers/populate_factory.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" #include "opencl/source/mem_obj/buffer.h" #include "level_zero/core/source/helpers/l0_populate_factory.h" diff --git a/level_zero/core/source/helpers/api_specific_config_l0.cpp b/level_zero/core/source/helpers/api_specific_config_l0.cpp index 40a6c45e08..b73abe3bb3 100644 --- a/level_zero/core/source/helpers/api_specific_config_l0.cpp +++ b/level_zero/core/source/helpers/api_specific_config_l0.cpp @@ -8,6 +8,8 @@ #include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/helpers/api_specific_config.h" +#include "level_zero/core/source/compiler_interface/l0_reg_path.h" + namespace NEO { bool ApiSpecificConfig::isStatelessCompressionSupported() { return false; @@ -37,4 +39,8 @@ uint64_t ApiSpecificConfig::getReducedMaxAllocSize(uint64_t maxAllocSize) { return maxAllocSize; } +const char *ApiSpecificConfig::getRegistryPath() { + return L0::registryPath; +} + } // namespace NEO diff --git a/level_zero/core/source/xe_hp_core/enable_family_full_l0_xe_hp_core.cpp b/level_zero/core/source/xe_hp_core/enable_family_full_l0_xe_hp_core.cpp index f0aa75046c..a66dc6c7da 100644 --- a/level_zero/core/source/xe_hp_core/enable_family_full_l0_xe_hp_core.cpp +++ b/level_zero/core/source/xe_hp_core/enable_family_full_l0_xe_hp_core.cpp @@ -5,11 +5,11 @@ * */ +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" #include "shared/source/command_stream/command_stream_receiver_hw.h" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" #include "shared/source/helpers/populate_factory.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" #include "opencl/source/mem_obj/buffer.h" #include "level_zero/core/source/helpers/l0_populate_factory.h" diff --git a/level_zero/core/test/unit_tests/sources/helper/api_specific_config_l0_tests.cpp b/level_zero/core/test/unit_tests/sources/helper/api_specific_config_l0_tests.cpp index 090cf88f0d..c9be8a651c 100644 --- a/level_zero/core/test/unit_tests/sources/helper/api_specific_config_l0_tests.cpp +++ b/level_zero/core/test/unit_tests/sources/helper/api_specific_config_l0_tests.cpp @@ -7,6 +7,8 @@ #include "shared/source/helpers/api_specific_config.h" +#include "level_zero/core/source/compiler_interface/l0_reg_path.h" + #include "gtest/gtest.h" namespace NEO { @@ -31,4 +33,7 @@ TEST(ApiSpecificConfigL0Tests, givenMaxAllocSizeWhenGettingReducedMaxAllocSizeTh EXPECT_EQ(1024u, ApiSpecificConfig::getReducedMaxAllocSize(1024)); } +TEST(ApiSpecificConfigL0Tests, WhenGettingRegistryPathThenL0RegistryPathIsReturned) { + EXPECT_STREQ(L0::registryPath, ApiSpecificConfig::getRegistryPath()); +} } // namespace NEO diff --git a/opencl/source/command_stream/CMakeLists.txt b/opencl/source/command_stream/CMakeLists.txt index e9649602a9..36b3fb39ba 100644 --- a/opencl/source/command_stream/CMakeLists.txt +++ b/opencl/source/command_stream/CMakeLists.txt @@ -7,27 +7,8 @@ set(RUNTIME_SRCS_COMMAND_STREAM ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}per_dss_backed_buffer.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_hw.h - ${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_hw_base.inl - ${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_hw_bdw_and_later.inl - ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw.h - ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw_base.inl - ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw_bdw_and_later.inl - ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_with_aub_dump.h - ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_with_aub_dump.inl - ${CMAKE_CURRENT_SOURCE_DIR}/create_command_stream_impl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/create_command_stream_impl.h - ${CMAKE_CURRENT_SOURCE_DIR}/definitions/command_stream_receiver_simulated_hw.h ) -if(SUPPORT_XEHP_AND_LATER) - list(APPEND RUNTIME_SRCS_COMMAND_STREAM - ${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_hw_xehp_and_later.inl - ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw_xehp_and_later.inl - ${CMAKE_CURRENT_SOURCE_DIR}/tbx_command_stream_receiver_xehp_and_later.inl - ) -endif() - target_sources(${NEO_STATIC_LIB_NAME} PRIVATE ${RUNTIME_SRCS_COMMAND_STREAM}) set_property(GLOBAL PROPERTY RUNTIME_SRCS_COMMAND_STREAM ${RUNTIME_SRCS_COMMAND_STREAM}) add_subdirectories() diff --git a/opencl/source/dll/create_command_stream.cpp b/opencl/source/dll/create_command_stream.cpp index d14e556508..1c1182472a 100644 --- a/opencl/source/dll/create_command_stream.cpp +++ b/opencl/source/dll/create_command_stream.cpp @@ -6,13 +6,12 @@ */ #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/create_command_stream_impl.h" #include "shared/source/command_stream/device_command_stream.h" #include "shared/source/command_stream/tbx_command_stream_receiver.h" #include "shared/source/helpers/hw_info.h" -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.h" -#include "opencl/source/command_stream/create_command_stream_impl.h" - namespace NEO { CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment, diff --git a/opencl/source/dll/get_devices.cpp b/opencl/source/dll/get_devices.cpp index 41eb0b1b77..d09ad2b6ca 100644 --- a/opencl/source/dll/get_devices.cpp +++ b/opencl/source/dll/get_devices.cpp @@ -5,11 +5,10 @@ * */ +#include "shared/source/command_stream/create_command_stream_impl.h" #include "shared/source/execution_environment/execution_environment.h" #include "shared/source/execution_environment/root_device_environment.h" -#include "opencl/source/command_stream/create_command_stream_impl.h" - namespace NEO { bool prepareDeviceEnvironments(ExecutionEnvironment &executionEnvironment) { diff --git a/opencl/source/gen11/aub_command_stream_receiver_gen11.cpp b/opencl/source/gen11/aub_command_stream_receiver_gen11.cpp index dda2494dad..6996a5967d 100644 --- a/opencl/source/gen11/aub_command_stream_receiver_gen11.cpp +++ b/opencl/source/gen11/aub_command_stream_receiver_gen11.cpp @@ -5,12 +5,11 @@ * */ +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" +#include "shared/source/command_stream/aub_command_stream_receiver_hw_bdw_and_later.inl" #include "shared/source/helpers/array_count.h" #include "shared/source/helpers/populate_factory.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw_bdw_and_later.inl" - namespace NEO { typedef ICLFamily Family; diff --git a/opencl/source/gen11/command_stream_receiver_simulated_common_hw_gen11.cpp b/opencl/source/gen11/command_stream_receiver_simulated_common_hw_gen11.cpp index 5d467a6c40..b87e44a580 100644 --- a/opencl/source/gen11/command_stream_receiver_simulated_common_hw_gen11.cpp +++ b/opencl/source/gen11/command_stream_receiver_simulated_common_hw_gen11.cpp @@ -5,7 +5,7 @@ * */ -#include "opencl/source/command_stream/command_stream_receiver_simulated_common_hw_bdw_and_later.inl" +#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw_bdw_and_later.inl" namespace NEO { typedef ICLFamily Family; diff --git a/opencl/source/gen11/enable_family_full_ocl_gen11.cpp b/opencl/source/gen11/enable_family_full_ocl_gen11.cpp index 4e4708a79a..8dc2cf814e 100644 --- a/opencl/source/gen11/enable_family_full_ocl_gen11.cpp +++ b/opencl/source/gen11/enable_family_full_ocl_gen11.cpp @@ -5,12 +5,12 @@ * */ +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" #include "shared/source/command_stream/command_stream_receiver_hw.h" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" #include "shared/source/helpers/populate_factory.h" #include "opencl/source/command_queue/command_queue_hw.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" #include "opencl/source/device_queue/device_queue_hw.h" #include "opencl/source/helpers/cl_hw_helper.h" #include "opencl/source/mem_obj/buffer.h" diff --git a/opencl/source/gen11/linux/command_stream_receiver_gen11.cpp b/opencl/source/gen11/linux/command_stream_receiver_gen11.cpp index 86308bedf8..822a218f76 100644 --- a/opencl/source/gen11/linux/command_stream_receiver_gen11.cpp +++ b/opencl/source/gen11/linux/command_stream_receiver_gen11.cpp @@ -5,7 +5,8 @@ * */ -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.inl" +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" + #include "opencl/source/os_interface/linux/device_command_stream.inl" #include "opencl/source/os_interface/linux/drm_command_stream.inl" #include "opencl/source/os_interface/linux/drm_command_stream_bdw_and_later.inl" diff --git a/opencl/source/gen11/tbx_command_stream_receiver_gen11.cpp b/opencl/source/gen11/tbx_command_stream_receiver_gen11.cpp index b96accb662..0086726d3f 100644 --- a/opencl/source/gen11/tbx_command_stream_receiver_gen11.cpp +++ b/opencl/source/gen11/tbx_command_stream_receiver_gen11.cpp @@ -5,14 +5,13 @@ * */ +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.inl" #include "shared/source/gen11/hw_cmds.h" #include "shared/source/helpers/array_count.h" #include "shared/source/helpers/populate_factory.h" -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.inl" - namespace NEO { typedef ICLFamily Family; static auto gfxCore = IGFX_GEN11_CORE; diff --git a/opencl/source/gen11/windows/command_stream_receiver_gen11.cpp b/opencl/source/gen11/windows/command_stream_receiver_gen11.cpp index bd869c4fd1..43bf53c57d 100644 --- a/opencl/source/gen11/windows/command_stream_receiver_gen11.cpp +++ b/opencl/source/gen11/windows/command_stream_receiver_gen11.cpp @@ -5,7 +5,8 @@ * */ -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.inl" +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" + #include "opencl/source/os_interface/windows/device_command_stream.inl" #include "opencl/source/os_interface/windows/wddm_device_command_stream.inl" diff --git a/opencl/source/gen12lp/aub_command_stream_receiver_gen12lp.cpp b/opencl/source/gen12lp/aub_command_stream_receiver_gen12lp.cpp index f2246af32a..862870becc 100644 --- a/opencl/source/gen12lp/aub_command_stream_receiver_gen12lp.cpp +++ b/opencl/source/gen12lp/aub_command_stream_receiver_gen12lp.cpp @@ -6,13 +6,12 @@ */ #include "shared/source/aub_mem_dump/aub_alloc_dump.h" +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" +#include "shared/source/command_stream/aub_command_stream_receiver_hw_bdw_and_later.inl" #include "shared/source/helpers/array_count.h" #include "shared/source/helpers/populate_factory.h" #include "shared/source/memory_manager/memory_pool.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw_bdw_and_later.inl" - namespace NEO { typedef TGLLPFamily Family; static auto gfxCore = IGFX_GEN12LP_CORE; diff --git a/opencl/source/gen12lp/command_stream_receiver_simulated_common_hw_gen12lp.cpp b/opencl/source/gen12lp/command_stream_receiver_simulated_common_hw_gen12lp.cpp index 83ed438d25..76c1a8f8c7 100644 --- a/opencl/source/gen12lp/command_stream_receiver_simulated_common_hw_gen12lp.cpp +++ b/opencl/source/gen12lp/command_stream_receiver_simulated_common_hw_gen12lp.cpp @@ -5,10 +5,9 @@ * */ +#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw_bdw_and_later.inl" #include "shared/source/gen12lp/helpers_gen12lp.h" -#include "opencl/source/command_stream/command_stream_receiver_simulated_common_hw_bdw_and_later.inl" - namespace NEO { typedef TGLLPFamily Family; diff --git a/opencl/source/gen12lp/enable_family_full_ocl_gen12lp.cpp b/opencl/source/gen12lp/enable_family_full_ocl_gen12lp.cpp index 48e56ff867..64522382f1 100644 --- a/opencl/source/gen12lp/enable_family_full_ocl_gen12lp.cpp +++ b/opencl/source/gen12lp/enable_family_full_ocl_gen12lp.cpp @@ -5,12 +5,12 @@ * */ +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" #include "shared/source/command_stream/command_stream_receiver_hw.h" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" #include "shared/source/helpers/populate_factory.h" #include "opencl/source/command_queue/command_queue_hw.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" #include "opencl/source/device_queue/device_queue_hw.h" #include "opencl/source/helpers/cl_hw_helper.h" #include "opencl/source/mem_obj/buffer.h" diff --git a/opencl/source/gen12lp/linux/command_stream_receiver_gen12lp.cpp b/opencl/source/gen12lp/linux/command_stream_receiver_gen12lp.cpp index 6cd64b01aa..c04f8754ab 100644 --- a/opencl/source/gen12lp/linux/command_stream_receiver_gen12lp.cpp +++ b/opencl/source/gen12lp/linux/command_stream_receiver_gen12lp.cpp @@ -5,7 +5,8 @@ * */ -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.inl" +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" + #include "opencl/source/os_interface/linux/device_command_stream.inl" #include "opencl/source/os_interface/linux/drm_command_stream.inl" #include "opencl/source/os_interface/linux/drm_command_stream_bdw_and_later.inl" diff --git a/opencl/source/gen12lp/tbx_command_stream_receiver_gen12lp.cpp b/opencl/source/gen12lp/tbx_command_stream_receiver_gen12lp.cpp index 36dee6cfd1..5436a7a281 100644 --- a/opencl/source/gen12lp/tbx_command_stream_receiver_gen12lp.cpp +++ b/opencl/source/gen12lp/tbx_command_stream_receiver_gen12lp.cpp @@ -5,6 +5,7 @@ * */ +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.inl" #include "shared/source/gen12lp/hw_cmds.h" @@ -12,8 +13,6 @@ #include "shared/source/helpers/populate_factory.h" #include "shared/source/memory_manager/memory_pool.h" -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.inl" - #include "aub_mem_dump.h" namespace NEO { diff --git a/opencl/source/gen12lp/windows/command_stream_receiver_gen12lp.cpp b/opencl/source/gen12lp/windows/command_stream_receiver_gen12lp.cpp index be3a13382c..57788b44d9 100644 --- a/opencl/source/gen12lp/windows/command_stream_receiver_gen12lp.cpp +++ b/opencl/source/gen12lp/windows/command_stream_receiver_gen12lp.cpp @@ -1,11 +1,12 @@ /* - * Copyright (C) 2019-2020 Intel Corporation + * Copyright (C) 2019-2021 Intel Corporation * * SPDX-License-Identifier: MIT * */ -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.inl" +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" + #include "opencl/source/os_interface/windows/device_command_stream.inl" #include "opencl/source/os_interface/windows/wddm_device_command_stream.inl" diff --git a/opencl/source/gen8/aub_command_stream_receiver_gen8.cpp b/opencl/source/gen8/aub_command_stream_receiver_gen8.cpp index 1645917ae4..bbcc3e46c7 100644 --- a/opencl/source/gen8/aub_command_stream_receiver_gen8.cpp +++ b/opencl/source/gen8/aub_command_stream_receiver_gen8.cpp @@ -5,12 +5,11 @@ * */ +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" +#include "shared/source/command_stream/aub_command_stream_receiver_hw_bdw_and_later.inl" #include "shared/source/helpers/array_count.h" #include "shared/source/helpers/populate_factory.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw_bdw_and_later.inl" - namespace NEO { typedef BDWFamily Family; diff --git a/opencl/source/gen8/command_stream_receiver_simulated_common_hw_gen8.cpp b/opencl/source/gen8/command_stream_receiver_simulated_common_hw_gen8.cpp index d4d2db8500..e3254663e6 100644 --- a/opencl/source/gen8/command_stream_receiver_simulated_common_hw_gen8.cpp +++ b/opencl/source/gen8/command_stream_receiver_simulated_common_hw_gen8.cpp @@ -5,7 +5,7 @@ * */ -#include "opencl/source/command_stream/command_stream_receiver_simulated_common_hw_bdw_and_later.inl" +#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw_bdw_and_later.inl" namespace NEO { typedef BDWFamily Family; diff --git a/opencl/source/gen8/enable_family_full_ocl_gen8.cpp b/opencl/source/gen8/enable_family_full_ocl_gen8.cpp index 5b390d11ff..d8f2e6ea98 100644 --- a/opencl/source/gen8/enable_family_full_ocl_gen8.cpp +++ b/opencl/source/gen8/enable_family_full_ocl_gen8.cpp @@ -5,12 +5,12 @@ * */ +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" #include "shared/source/command_stream/command_stream_receiver_hw.h" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" #include "shared/source/helpers/populate_factory.h" #include "opencl/source/command_queue/command_queue_hw.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" #include "opencl/source/device_queue/device_queue_hw.h" #include "opencl/source/event/perf_counter.h" #include "opencl/source/helpers/cl_hw_helper.h" diff --git a/opencl/source/gen8/linux/command_stream_receiver_gen8.cpp b/opencl/source/gen8/linux/command_stream_receiver_gen8.cpp index 1fb16fe8ea..1da28cf2ee 100644 --- a/opencl/source/gen8/linux/command_stream_receiver_gen8.cpp +++ b/opencl/source/gen8/linux/command_stream_receiver_gen8.cpp @@ -5,7 +5,8 @@ * */ -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.inl" +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" + #include "opencl/source/os_interface/linux/device_command_stream.inl" #include "opencl/source/os_interface/linux/drm_command_stream.inl" #include "opencl/source/os_interface/linux/drm_command_stream_bdw_and_later.inl" diff --git a/opencl/source/gen8/tbx_command_stream_receiver_gen8.cpp b/opencl/source/gen8/tbx_command_stream_receiver_gen8.cpp index 8dae9c51e0..b4053c408d 100644 --- a/opencl/source/gen8/tbx_command_stream_receiver_gen8.cpp +++ b/opencl/source/gen8/tbx_command_stream_receiver_gen8.cpp @@ -5,13 +5,12 @@ * */ +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.inl" #include "shared/source/gen8/hw_cmds.h" #include "shared/source/helpers/array_count.h" -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.inl" - namespace NEO { typedef BDWFamily Family; diff --git a/opencl/source/gen8/windows/command_stream_receiver_gen8.cpp b/opencl/source/gen8/windows/command_stream_receiver_gen8.cpp index f6842fbd54..8f3a802aa5 100644 --- a/opencl/source/gen8/windows/command_stream_receiver_gen8.cpp +++ b/opencl/source/gen8/windows/command_stream_receiver_gen8.cpp @@ -5,7 +5,8 @@ * */ -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.inl" +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" + #include "opencl/source/os_interface/windows/device_command_stream.inl" #include "opencl/source/os_interface/windows/wddm_device_command_stream.inl" diff --git a/opencl/source/gen9/aub_command_stream_receiver_gen9.cpp b/opencl/source/gen9/aub_command_stream_receiver_gen9.cpp index 9a036f62e7..8aea317f30 100644 --- a/opencl/source/gen9/aub_command_stream_receiver_gen9.cpp +++ b/opencl/source/gen9/aub_command_stream_receiver_gen9.cpp @@ -5,12 +5,11 @@ * */ +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" +#include "shared/source/command_stream/aub_command_stream_receiver_hw_bdw_and_later.inl" #include "shared/source/helpers/array_count.h" #include "shared/source/helpers/populate_factory.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw_bdw_and_later.inl" - namespace NEO { typedef SKLFamily Family; diff --git a/opencl/source/gen9/command_stream_receiver_simulated_common_hw_gen9.cpp b/opencl/source/gen9/command_stream_receiver_simulated_common_hw_gen9.cpp index ac0b03f79a..de4d118afc 100644 --- a/opencl/source/gen9/command_stream_receiver_simulated_common_hw_gen9.cpp +++ b/opencl/source/gen9/command_stream_receiver_simulated_common_hw_gen9.cpp @@ -5,7 +5,7 @@ * */ -#include "opencl/source/command_stream/command_stream_receiver_simulated_common_hw_bdw_and_later.inl" +#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw_bdw_and_later.inl" namespace NEO { typedef SKLFamily Family; diff --git a/opencl/source/gen9/enable_family_full_ocl_gen9.cpp b/opencl/source/gen9/enable_family_full_ocl_gen9.cpp index 8573431114..ce7cfaa671 100644 --- a/opencl/source/gen9/enable_family_full_ocl_gen9.cpp +++ b/opencl/source/gen9/enable_family_full_ocl_gen9.cpp @@ -5,12 +5,12 @@ * */ +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" #include "shared/source/command_stream/command_stream_receiver_hw.h" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" #include "shared/source/helpers/populate_factory.h" #include "opencl/source/command_queue/command_queue_hw.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" #include "opencl/source/device_queue/device_queue_hw.h" #include "opencl/source/event/perf_counter.h" #include "opencl/source/helpers/cl_hw_helper.h" diff --git a/opencl/source/gen9/linux/command_stream_receiver_gen9.cpp b/opencl/source/gen9/linux/command_stream_receiver_gen9.cpp index dc6f6d0d14..45266ab689 100644 --- a/opencl/source/gen9/linux/command_stream_receiver_gen9.cpp +++ b/opencl/source/gen9/linux/command_stream_receiver_gen9.cpp @@ -5,7 +5,8 @@ * */ -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.inl" +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" + #include "opencl/source/os_interface/linux/device_command_stream.inl" #include "opencl/source/os_interface/linux/drm_command_stream.inl" #include "opencl/source/os_interface/linux/drm_command_stream_bdw_and_later.inl" diff --git a/opencl/source/gen9/tbx_command_stream_receiver_gen9.cpp b/opencl/source/gen9/tbx_command_stream_receiver_gen9.cpp index 77b527ee57..7cc0610c1e 100644 --- a/opencl/source/gen9/tbx_command_stream_receiver_gen9.cpp +++ b/opencl/source/gen9/tbx_command_stream_receiver_gen9.cpp @@ -5,14 +5,13 @@ * */ +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.inl" #include "shared/source/gen9/hw_cmds.h" #include "shared/source/helpers/array_count.h" #include "shared/source/helpers/populate_factory.h" -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.inl" - namespace NEO { typedef SKLFamily Family; diff --git a/opencl/source/gen9/windows/command_stream_receiver_gen9.cpp b/opencl/source/gen9/windows/command_stream_receiver_gen9.cpp index e63c1ff0be..c96b19a223 100644 --- a/opencl/source/gen9/windows/command_stream_receiver_gen9.cpp +++ b/opencl/source/gen9/windows/command_stream_receiver_gen9.cpp @@ -5,7 +5,8 @@ * */ -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.inl" +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" + #include "opencl/source/os_interface/windows/device_command_stream.inl" #include "opencl/source/os_interface/windows/wddm_device_command_stream.inl" diff --git a/opencl/source/helpers/CMakeLists.txt b/opencl/source/helpers/CMakeLists.txt index 79af355226..9f52a14829 100644 --- a/opencl/source/helpers/CMakeLists.txt +++ b/opencl/source/helpers/CMakeLists.txt @@ -30,8 +30,6 @@ set(RUNTIME_SRCS_HELPERS_BASE ${CMAKE_CURRENT_SOURCE_DIR}/hardware_commands_helper.h ${CMAKE_CURRENT_SOURCE_DIR}/hardware_commands_helper_base.inl ${CMAKE_CURRENT_SOURCE_DIR}/hardware_commands_helper_bdw_and_later.inl - ${CMAKE_CURRENT_SOURCE_DIR}/hardware_context_controller.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/hardware_context_controller.h ${CMAKE_CURRENT_SOURCE_DIR}/helper_options.cpp ${CMAKE_CURRENT_SOURCE_DIR}/implicit_scaling_ocl.cpp ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}memory_properties_helpers.cpp diff --git a/opencl/source/helpers/api_specific_config_ocl.cpp b/opencl/source/helpers/api_specific_config_ocl.cpp index 38f347dd14..beef517649 100644 --- a/opencl/source/helpers/api_specific_config_ocl.cpp +++ b/opencl/source/helpers/api_specific_config_ocl.cpp @@ -8,6 +8,8 @@ #include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/helpers/api_specific_config.h" +#include "opencl/source/os_interface/ocl_reg_path.h" + namespace NEO { bool ApiSpecificConfig::isStatelessCompressionSupported() { return true; @@ -37,4 +39,7 @@ uint64_t ApiSpecificConfig::getReducedMaxAllocSize(uint64_t maxAllocSize) { return maxAllocSize / 2; } +const char *ApiSpecificConfig::getRegistryPath() { + return oclRegPath; +} } // namespace NEO diff --git a/opencl/source/helpers/hardware_context_controller.cpp b/opencl/source/helpers/hardware_context_controller.cpp index 55e36d80f8..9630eb08ea 100644 --- a/opencl/source/helpers/hardware_context_controller.cpp +++ b/opencl/source/helpers/hardware_context_controller.cpp @@ -5,7 +5,7 @@ * */ -#include "opencl/source/helpers/hardware_context_controller.h" +#include "shared/source/helpers/hardware_context_controller.h" #include "shared/source/helpers/constants.h" #include "shared/source/os_interface/os_context.h" diff --git a/opencl/source/helpers/windows/gmm_callbacks_tgllp_and_later.inl b/opencl/source/helpers/windows/gmm_callbacks_tgllp_and_later.inl index 5bac7f6c74..afb32c6464 100644 --- a/opencl/source/helpers/windows/gmm_callbacks_tgllp_and_later.inl +++ b/opencl/source/helpers/windows/gmm_callbacks_tgllp_and_later.inl @@ -5,12 +5,12 @@ * */ +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" #include "shared/source/command_stream/command_stream_receiver_hw.h" +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/helpers/windows/gmm_callbacks.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.h" #include "opencl/source/os_interface/windows/wddm_device_command_stream.h" namespace NEO { diff --git a/opencl/source/os_interface/linux/device_command_stream.inl b/opencl/source/os_interface/linux/device_command_stream.inl index 817d508c34..cb8d3cfb9a 100644 --- a/opencl/source/os_interface/linux/device_command_stream.inl +++ b/opencl/source/os_interface/linux/device_command_stream.inl @@ -5,11 +5,11 @@ * */ +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.h" #include "shared/source/command_stream/device_command_stream.h" #include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/helpers/api_specific_config.h" -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.h" #include "opencl/source/os_interface/linux/drm_command_stream.h" namespace NEO { diff --git a/opencl/source/os_interface/windows/device_command_stream.inl b/opencl/source/os_interface/windows/device_command_stream.inl index 2509086541..cc7a30499f 100644 --- a/opencl/source/os_interface/windows/device_command_stream.inl +++ b/opencl/source/os_interface/windows/device_command_stream.inl @@ -9,10 +9,10 @@ // Current order must be preserved due to two versions of igfxfmid.h #pragma warning(push) #pragma warning(disable : 4005) +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.h" #include "shared/source/command_stream/device_command_stream.h" #include "shared/source/helpers/api_specific_config.h" -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.h" #include "opencl/source/os_interface/windows/wddm_device_command_stream.h" #include "hw_cmds.h" diff --git a/opencl/source/xe_hp_core/aub_command_stream_receiver_xe_hp_core.cpp b/opencl/source/xe_hp_core/aub_command_stream_receiver_xe_hp_core.cpp index 93105279a7..f256bd22e7 100644 --- a/opencl/source/xe_hp_core/aub_command_stream_receiver_xe_hp_core.cpp +++ b/opencl/source/xe_hp_core/aub_command_stream_receiver_xe_hp_core.cpp @@ -5,11 +5,10 @@ * */ +#include "shared/source/command_stream/aub_command_stream_receiver_hw_xehp_and_later.inl" #include "shared/source/helpers/array_count.h" #include "shared/source/helpers/populate_factory.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw_xehp_and_later.inl" - namespace NEO { typedef XeHpFamily Family; diff --git a/opencl/source/xe_hp_core/command_stream_receiver_simulated_common_hw_xe_hp_core.cpp b/opencl/source/xe_hp_core/command_stream_receiver_simulated_common_hw_xe_hp_core.cpp index 10ce10ca55..5c7e934b9a 100644 --- a/opencl/source/xe_hp_core/command_stream_receiver_simulated_common_hw_xe_hp_core.cpp +++ b/opencl/source/xe_hp_core/command_stream_receiver_simulated_common_hw_xe_hp_core.cpp @@ -5,7 +5,7 @@ * */ -#include "opencl/source/command_stream/command_stream_receiver_simulated_common_hw_xehp_and_later.inl" +#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw_xehp_and_later.inl" namespace NEO { typedef XeHpFamily Family; diff --git a/opencl/source/xe_hp_core/enable_family_full_ocl_xe_hp_core.cpp b/opencl/source/xe_hp_core/enable_family_full_ocl_xe_hp_core.cpp index 3f087bc2c4..3a12633d8a 100644 --- a/opencl/source/xe_hp_core/enable_family_full_ocl_xe_hp_core.cpp +++ b/opencl/source/xe_hp_core/enable_family_full_ocl_xe_hp_core.cpp @@ -5,12 +5,12 @@ * */ +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" #include "shared/source/command_stream/command_stream_receiver_hw.h" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" #include "shared/source/helpers/populate_factory.h" #include "opencl/source/command_queue/command_queue_hw.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" #include "opencl/source/device_queue/device_queue_hw.h" #include "opencl/source/helpers/cl_hw_helper.h" #include "opencl/source/mem_obj/buffer.h" diff --git a/opencl/source/xe_hp_core/linux/command_stream_receiver_xe_hp_core.cpp b/opencl/source/xe_hp_core/linux/command_stream_receiver_xe_hp_core.cpp index 12e12fdaa5..2b653363fa 100644 --- a/opencl/source/xe_hp_core/linux/command_stream_receiver_xe_hp_core.cpp +++ b/opencl/source/xe_hp_core/linux/command_stream_receiver_xe_hp_core.cpp @@ -5,7 +5,8 @@ * */ -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.inl" +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" + #include "opencl/source/os_interface/linux/device_command_stream.inl" #include "opencl/source/os_interface/linux/drm_command_stream.inl" #include "opencl/source/os_interface/linux/drm_command_stream_xehp_and_later.inl" diff --git a/opencl/source/xe_hp_core/tbx_command_stream_receiver_xe_hp_core.cpp b/opencl/source/xe_hp_core/tbx_command_stream_receiver_xe_hp_core.cpp index c476651954..16219bcf66 100644 --- a/opencl/source/xe_hp_core/tbx_command_stream_receiver_xe_hp_core.cpp +++ b/opencl/source/xe_hp_core/tbx_command_stream_receiver_xe_hp_core.cpp @@ -5,6 +5,7 @@ * */ +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.inl" #include "shared/source/helpers/array_count.h" @@ -13,8 +14,6 @@ #include "shared/source/memory_manager/memory_pool.h" #include "shared/source/xe_hp_core/hw_cmds.h" -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.inl" - namespace NEO { typedef XeHpFamily Family; static auto gfxCore = IGFX_XE_HP_CORE; @@ -26,7 +25,7 @@ void populateFactoryTable>() { tbxCommandStreamReceiverFactory[gfxCore] = TbxCommandStreamReceiverHw::create; } -#include "opencl/source/command_stream/tbx_command_stream_receiver_xehp_and_later.inl" +#include "shared/source/command_stream/tbx_command_stream_receiver_xehp_and_later.inl" template class TbxCommandStreamReceiverHw; template class CommandStreamReceiverWithAUBDump>; diff --git a/opencl/source/xe_hp_core/windows/command_stream_receiver_xe_hp_core.cpp b/opencl/source/xe_hp_core/windows/command_stream_receiver_xe_hp_core.cpp index f90b3bb3fb..8949075de8 100644 --- a/opencl/source/xe_hp_core/windows/command_stream_receiver_xe_hp_core.cpp +++ b/opencl/source/xe_hp_core/windows/command_stream_receiver_xe_hp_core.cpp @@ -5,7 +5,8 @@ * */ -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.inl" +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" + #include "opencl/source/os_interface/windows/device_command_stream.inl" #include "opencl/source/os_interface/windows/wddm_device_command_stream.inl" diff --git a/opencl/test/unit_test/aub/aub_helper_tests.cpp b/opencl/test/unit_test/aub/aub_helper_tests.cpp index efd1613392..bcd27105ba 100644 --- a/opencl/test/unit_test/aub/aub_helper_tests.cpp +++ b/opencl/test/unit_test/aub/aub_helper_tests.cpp @@ -7,12 +7,12 @@ #include "shared/source/aub/aub_helper.h" #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/helpers/basic_math.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/tbx/tbx_proto.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" #include "opencl/test/unit_test/mocks/mock_lrca_helper.h" #include "test.h" diff --git a/opencl/test/unit_test/aub_tests/command_stream/aub_command_stream_fixture.h b/opencl/test/unit_test/aub_tests/command_stream/aub_command_stream_fixture.h index ed9f32b7dc..068f6da7c8 100644 --- a/opencl/test/unit_test/aub_tests/command_stream/aub_command_stream_fixture.h +++ b/opencl/test/unit_test/aub_tests/command_stream/aub_command_stream_fixture.h @@ -7,14 +7,14 @@ #pragma once #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_with_aub_dump.h" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" #include "shared/source/memory_manager/internal_allocation_storage.h" #include "shared/source/memory_manager/memory_banks.h" #include "shared/source/os_interface/os_context.h" #include "shared/test/unit_test/tests_configuration.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.h" #include "opencl/test/unit_test/command_stream/command_stream_fixture.h" #include "opencl/test/unit_test/mocks/mock_allocation_properties.h" diff --git a/opencl/test/unit_test/aub_tests/command_stream/aub_command_stream_tests.cpp b/opencl/test/unit_test/aub_tests/command_stream/aub_command_stream_tests.cpp index dfe773f3aa..c5d4fcb3bf 100644 --- a/opencl/test/unit_test/aub_tests/command_stream/aub_command_stream_tests.cpp +++ b/opencl/test/unit_test/aub_tests/command_stream/aub_command_stream_tests.cpp @@ -5,12 +5,12 @@ * */ +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" #include "shared/source/command_stream/command_stream_receiver_hw.h" #include "shared/source/helpers/ptr_math.h" #include "shared/source/os_interface/os_context.h" #include "shared/test/common/cmd_parse/gen_cmd_parse.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" #include "opencl/test/unit_test/command_queue/command_queue_fixture.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" #include "test.h" diff --git a/opencl/test/unit_test/aub_tests/command_stream/aub_mem_dump_tests.h b/opencl/test/unit_test/aub_tests/command_stream/aub_mem_dump_tests.h index 251fc4a9e0..387ef076e5 100644 --- a/opencl/test/unit_test/aub_tests/command_stream/aub_mem_dump_tests.h +++ b/opencl/test/unit_test/aub_tests/command_stream/aub_mem_dump_tests.h @@ -6,13 +6,13 @@ */ #pragma once +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" #include "shared/source/device/device.h" #include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/api_specific_config.h" #include "shared/source/helpers/ptr_math.h" #include "shared/source/os_interface/hw_info_config.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" #include "test.h" #include "aub_mapper.h" diff --git a/opencl/test/unit_test/aub_tests/command_stream/aub_mi_atomic_tests.cpp b/opencl/test/unit_test/aub_tests/command_stream/aub_mi_atomic_tests.cpp index af24195ccd..65d74a53e5 100644 --- a/opencl/test/unit_test/aub_tests/command_stream/aub_mi_atomic_tests.cpp +++ b/opencl/test/unit_test/aub_tests/command_stream/aub_mi_atomic_tests.cpp @@ -5,10 +5,10 @@ * */ +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" #include "shared/source/command_stream/command_stream_receiver_hw.h" #include "shared/test/common/helpers/dispatch_flags_helper.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" #include "opencl/test/unit_test/aub_tests/fixtures/aub_fixture.h" #include "test.h" diff --git a/opencl/test/unit_test/aub_tests/fixtures/aub_fixture.h b/opencl/test/unit_test/aub_tests/fixtures/aub_fixture.h index b64cc9154e..74c7aa2381 100644 --- a/opencl/test/unit_test/aub_tests/fixtures/aub_fixture.h +++ b/opencl/test/unit_test/aub_tests/fixtures/aub_fixture.h @@ -7,6 +7,8 @@ #pragma once #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_with_aub_dump.h" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" #include "shared/source/helpers/api_specific_config.h" #include "shared/source/helpers/hw_helper.h" @@ -15,8 +17,6 @@ #include "shared/test/common/mocks/mock_memory_operations_handler.h" #include "shared/test/unit_test/tests_configuration.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.h" #include "opencl/source/platform/platform.h" #include "opencl/test/unit_test/command_queue/command_queue_fixture.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" diff --git a/opencl/test/unit_test/command_stream/aub_command_stream_receiver_1_tests.cpp b/opencl/test/unit_test/command_stream/aub_command_stream_receiver_1_tests.cpp index f7675e6da6..e98a338109 100644 --- a/opencl/test/unit_test/command_stream/aub_command_stream_receiver_1_tests.cpp +++ b/opencl/test/unit_test/command_stream/aub_command_stream_receiver_1_tests.cpp @@ -6,6 +6,7 @@ */ #include "shared/source/aub_mem_dump/page_table_entry_bits.h" +#include "shared/source/helpers/hardware_context_controller.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/os_interface/os_context.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" @@ -16,7 +17,6 @@ #include "shared/test/common/mocks/mock_graphics_allocation.h" #include "shared/test/unit_test/fixtures/mock_aub_center_fixture.h" -#include "opencl/source/helpers/hardware_context_controller.h" #include "opencl/test/unit_test/fixtures/aub_command_stream_receiver_fixture.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" #include "opencl/test/unit_test/libult/ult_aub_command_stream_receiver.h" diff --git a/opencl/test/unit_test/command_stream/aub_command_stream_receiver_2_tests.cpp b/opencl/test/unit_test/command_stream/aub_command_stream_receiver_2_tests.cpp index 1418ffdbf5..3d637a07d8 100644 --- a/opencl/test/unit_test/command_stream/aub_command_stream_receiver_2_tests.cpp +++ b/opencl/test/unit_test/command_stream/aub_command_stream_receiver_2_tests.cpp @@ -7,6 +7,7 @@ #include "shared/source/aub_mem_dump/page_table_entry_bits.h" #include "shared/source/helpers/engine_node_helper.h" +#include "shared/source/helpers/hardware_context_controller.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/os_interface/os_context.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" @@ -18,7 +19,6 @@ #include "shared/test/common/mocks/ult_device_factory.h" #include "shared/test/unit_test/fixtures/mock_aub_center_fixture.h" -#include "opencl/source/helpers/hardware_context_controller.h" #include "opencl/source/mem_obj/mem_obj_helper.h" #include "opencl/source/platform/platform.h" #include "opencl/test/unit_test/fixtures/aub_command_stream_receiver_fixture.h" diff --git a/opencl/test/unit_test/command_stream/aub_command_stream_receiver_3_tests.cpp b/opencl/test/unit_test/command_stream/aub_command_stream_receiver_3_tests.cpp index 21430ef444..f6483ce6ac 100644 --- a/opencl/test/unit_test/command_stream/aub_command_stream_receiver_3_tests.cpp +++ b/opencl/test/unit_test/command_stream/aub_command_stream_receiver_3_tests.cpp @@ -6,11 +6,11 @@ */ #include "shared/source/aub_mem_dump/aub_alloc_dump.h" +#include "shared/source/helpers/hardware_context_controller.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/engine_descriptor_helper.h" #include "shared/test/common/mocks/mock_aub_manager.h" -#include "opencl/source/helpers/hardware_context_controller.h" #include "opencl/test/unit_test/fixtures/aub_command_stream_receiver_fixture.h" #include "opencl/test/unit_test/mocks/mock_aub_csr.h" #include "opencl/test/unit_test/mocks/mock_memory_manager.h" diff --git a/opencl/test/unit_test/command_stream/aub_command_stream_receiver_tests_xehp_and_later.cpp b/opencl/test/unit_test/command_stream/aub_command_stream_receiver_tests_xehp_and_later.cpp index 90d5fb2e5f..6ba327dd3e 100644 --- a/opencl/test/unit_test/command_stream/aub_command_stream_receiver_tests_xehp_and_later.cpp +++ b/opencl/test/unit_test/command_stream/aub_command_stream_receiver_tests_xehp_and_later.cpp @@ -6,6 +6,7 @@ */ #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/helpers/engine_node_helper.h" #include "shared/source/memory_manager/memory_banks.h" #include "shared/source/memory_manager/memory_pool.h" @@ -17,7 +18,6 @@ #include "shared/test/common/mocks/mock_execution_environment.h" #include "shared/test/common/mocks/mock_graphics_allocation.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" #include "opencl/source/helpers/memory_properties_helpers.h" #include "opencl/source/mem_obj/buffer.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" diff --git a/opencl/test/unit_test/command_stream/aub_file_stream_tests.cpp b/opencl/test/unit_test/command_stream/aub_file_stream_tests.cpp index e5bfa88df8..ee10a4b657 100644 --- a/opencl/test/unit_test/command_stream/aub_file_stream_tests.cpp +++ b/opencl/test/unit_test/command_stream/aub_file_stream_tests.cpp @@ -6,6 +6,9 @@ */ #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/helpers/hardware_context_controller.h" +#include "shared/source/helpers/neo_driver_version.h" #include "shared/source/os_interface/os_context.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/engine_descriptor_helper.h" @@ -15,9 +18,6 @@ #include "shared/test/common/mocks/mock_execution_environment.h" #include "shared/test/common/mocks/mock_graphics_allocation.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" -#include "opencl/source/helpers/hardware_context_controller.h" -#include "opencl/source/helpers/neo_driver_version.h" #include "opencl/test/unit_test/fixtures/aub_command_stream_receiver_fixture.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" #include "opencl/test/unit_test/mocks/mock_aub_csr.h" diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_simulated_common_hw_tests_xehp_and_later.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_simulated_common_hw_tests_xehp_and_later.cpp index a60f2f8da4..8e626fbdea 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_simulated_common_hw_tests_xehp_and_later.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_simulated_common_hw_tests_xehp_and_later.cpp @@ -6,10 +6,10 @@ */ #include "shared/source/aub/aub_helper.h" +#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw.h" +#include "shared/source/helpers/hardware_context_controller.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" -#include "opencl/source/command_stream/command_stream_receiver_simulated_common_hw.h" -#include "opencl/source/helpers/hardware_context_controller.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" #include "opencl/test/unit_test/mocks/mock_aub_stream.h" #include "opencl/test/unit_test/mocks/mock_csr_simulated_common_hw.h" diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_simulated_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_simulated_tests.cpp index 656d2204f4..2feb34a5aa 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_simulated_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_simulated_tests.cpp @@ -5,7 +5,9 @@ * */ +#include "shared/source/command_stream/command_stream_receiver_simulated_hw.h" #include "shared/source/helpers/array_count.h" +#include "shared/source/helpers/hardware_context_controller.h" #include "shared/source/memory_manager/memory_pool.h" #include "shared/source/memory_manager/os_agnostic_memory_manager.h" #include "shared/source/os_interface/os_context.h" @@ -14,8 +16,6 @@ #include "shared/test/common/mocks/mock_aub_manager.h" #include "shared/test/common/mocks/mock_graphics_allocation.h" -#include "opencl/source/command_stream/definitions/command_stream_receiver_simulated_hw.h" -#include "opencl/source/helpers/hardware_context_controller.h" #include "opencl/test/unit_test/helpers/hw_helper_tests.h" #include "opencl/test/unit_test/mocks/mock_csr_simulated_common_hw.h" #include "opencl/test/unit_test/mocks/mock_gmm.h" diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_tests.cpp index 76c9af41f7..c1585b2b0d 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_tests.cpp @@ -6,6 +6,7 @@ */ #include "shared/source/command_stream/command_stream_receiver.h" +#include "shared/source/command_stream/command_stream_receiver_simulated_hw.h" #include "shared/source/command_stream/linear_stream.h" #include "shared/source/command_stream/preemption.h" #include "shared/source/command_stream/scratch_space_controller.h" @@ -30,7 +31,6 @@ #include "shared/test/common/test_macros/test_checks_shared.h" #include "shared/test/unit_test/direct_submission/direct_submission_controller_mock.h" -#include "opencl/source/command_stream/definitions/command_stream_receiver_simulated_hw.h" #include "opencl/source/mem_obj/buffer.h" #include "opencl/source/platform/platform.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_with_aub_dump_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_with_aub_dump_tests.cpp index 720439d898..2426814c8d 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_with_aub_dump_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_with_aub_dump_tests.cpp @@ -5,6 +5,9 @@ * */ +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.h" +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.inl" #include "shared/source/command_stream/preemption.h" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" #include "shared/source/execution_environment/execution_environment.h" @@ -20,9 +23,6 @@ #include "shared/test/common/mocks/mock_execution_environment.h" #include "shared/test/unit_test/fixtures/mock_aub_center_fixture.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.h" -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.inl" #include "opencl/source/helpers/dispatch_info.h" #include "opencl/source/platform/platform.h" #include "opencl/test/unit_test/libult/ult_command_stream_receiver.h" diff --git a/opencl/test/unit_test/command_stream/create_command_stream_receiver_tests.cpp b/opencl/test/unit_test/command_stream/create_command_stream_receiver_tests.cpp index 8f484c5d31..a705f9649c 100644 --- a/opencl/test/unit_test/command_stream/create_command_stream_receiver_tests.cpp +++ b/opencl/test/unit_test/command_stream/create_command_stream_receiver_tests.cpp @@ -6,6 +6,7 @@ */ #include "shared/source/command_stream/command_stream_receiver.h" +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.h" #include "shared/source/execution_environment/execution_environment.h" #include "shared/source/memory_manager/os_agnostic_memory_manager.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" @@ -14,7 +15,6 @@ #include "shared/test/common/libult/create_command_stream.h" #include "shared/test/unit_test/fixtures/mock_aub_center_fixture.h" -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.h" #include "opencl/test/unit_test/helpers/execution_environment_helper.h" #include "test.h" diff --git a/opencl/test/unit_test/command_stream/tbx_command_stream_tests.cpp b/opencl/test/unit_test/command_stream/tbx_command_stream_tests.cpp index 51db692e29..03ffe872de 100644 --- a/opencl/test/unit_test/command_stream/tbx_command_stream_tests.cpp +++ b/opencl/test/unit_test/command_stream/tbx_command_stream_tests.cpp @@ -8,9 +8,11 @@ #include "shared/source/aub_mem_dump/aub_alloc_dump.h" #include "shared/source/command_stream/aub_command_stream_receiver.h" #include "shared/source/command_stream/command_stream_receiver_hw.h" +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.h" #include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" #include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/helpers/engine_node_helper.h" +#include "shared/source/helpers/hardware_context_controller.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/helpers/ptr_math.h" #include "shared/source/memory_manager/memory_banks.h" @@ -26,8 +28,6 @@ #include "shared/test/common/mocks/mock_tbx_csr.h" #include "shared/test/unit_test/fixtures/mock_aub_center_fixture.h" -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.h" -#include "opencl/source/helpers/hardware_context_controller.h" #include "opencl/source/mem_obj/buffer.h" #include "opencl/source/mem_obj/mem_obj.h" #include "opencl/source/platform/platform.h" diff --git a/opencl/test/unit_test/gen12lp/aub_command_stream_receiver_tests_gen12lp.inl b/opencl/test/unit_test/gen12lp/aub_command_stream_receiver_tests_gen12lp.inl index a16e4934f3..7e39b467f9 100644 --- a/opencl/test/unit_test/gen12lp/aub_command_stream_receiver_tests_gen12lp.inl +++ b/opencl/test/unit_test/gen12lp/aub_command_stream_receiver_tests_gen12lp.inl @@ -6,12 +6,12 @@ */ #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/os_interface/os_context.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/engine_descriptor_helper.h" #include "shared/test/common/mocks/mock_graphics_allocation.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" #include "opencl/test/unit_test/helpers/hw_helper_tests.h" #include "opencl/test/unit_test/mocks/mock_aub_csr.h" diff --git a/opencl/test/unit_test/gen12lp/command_stream_receiver_simulated_common_hw_tests_gen12lp.inl b/opencl/test/unit_test/gen12lp/command_stream_receiver_simulated_common_hw_tests_gen12lp.inl index ab57267b3f..5ec871cdd2 100644 --- a/opencl/test/unit_test/gen12lp/command_stream_receiver_simulated_common_hw_tests_gen12lp.inl +++ b/opencl/test/unit_test/gen12lp/command_stream_receiver_simulated_common_hw_tests_gen12lp.inl @@ -5,9 +5,9 @@ * */ +#include "shared/source/command_stream/command_stream_receiver_simulated_hw.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" -#include "opencl/source/command_stream/definitions/command_stream_receiver_simulated_hw.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" #include "opencl/test/unit_test/mocks/mock_aub_stream.h" #include "test.h" diff --git a/opencl/test/unit_test/gen12lp/windows/gmm_callbacks_tests_gen12lp.cpp b/opencl/test/unit_test/gen12lp/windows/gmm_callbacks_tests_gen12lp.cpp index 133cd0f91f..04f6dd8b6b 100644 --- a/opencl/test/unit_test/gen12lp/windows/gmm_callbacks_tests_gen12lp.cpp +++ b/opencl/test/unit_test/gen12lp/windows/gmm_callbacks_tests_gen12lp.cpp @@ -5,6 +5,8 @@ * */ +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.h" #include "shared/source/command_stream/linear_stream.h" #include "shared/source/execution_environment/execution_environment.h" #include "shared/source/helpers/hw_helper.h" @@ -13,8 +15,6 @@ #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/default_hw_info.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.h" #include "opencl/source/os_interface/windows/wddm_device_command_stream.h" #include "opencl/source/platform/platform.h" #include "opencl/test/unit_test/helpers/execution_environment_helper.h" diff --git a/opencl/test/unit_test/helpers/api_specific_config_ocl_tests.cpp b/opencl/test/unit_test/helpers/api_specific_config_ocl_tests.cpp index 2fc1d04712..ca172e545f 100644 --- a/opencl/test/unit_test/helpers/api_specific_config_ocl_tests.cpp +++ b/opencl/test/unit_test/helpers/api_specific_config_ocl_tests.cpp @@ -7,6 +7,8 @@ #include "shared/source/helpers/api_specific_config.h" +#include "opencl/source/os_interface/ocl_reg_path.h" + #include "gtest/gtest.h" namespace NEO { @@ -31,4 +33,7 @@ TEST(ApiSpecificConfigOclTests, givenMaxAllocSizeWhenGettingReducedMaxAllocSizeT EXPECT_EQ(512u, ApiSpecificConfig::getReducedMaxAllocSize(1024)); } +TEST(ApiSpecificConfigOclTests, WhenGettingRegistryPathThenOclRegistryPathIsReturned) { + EXPECT_STREQ(oclRegPath, ApiSpecificConfig::getRegistryPath()); +} } // namespace NEO diff --git a/opencl/test/unit_test/libult/ult_aub_command_stream_receiver.h b/opencl/test/unit_test/libult/ult_aub_command_stream_receiver.h index 729695307a..11c974b08d 100644 --- a/opencl/test/unit_test/libult/ult_aub_command_stream_receiver.h +++ b/opencl/test/unit_test/libult/ult_aub_command_stream_receiver.h @@ -6,12 +6,11 @@ */ #pragma once +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" #include "shared/source/execution_environment/execution_environment.h" #include "shared/source/memory_manager/os_agnostic_memory_manager.h" #include "shared/test/common/mocks/mock_experimental_command_buffer.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" - namespace NEO { template diff --git a/opencl/test/unit_test/mocks/mock_aub_csr.h b/opencl/test/unit_test/mocks/mock_aub_csr.h index bb710829d8..ce719ac981 100644 --- a/opencl/test/unit_test/mocks/mock_aub_csr.h +++ b/opencl/test/unit_test/mocks/mock_aub_csr.h @@ -7,6 +7,7 @@ #pragma once +#include "shared/source/command_stream/aub_command_stream_receiver_hw.h" #include "shared/source/command_stream/preemption.h" #include "shared/source/execution_environment/execution_environment.h" #include "shared/source/execution_environment/root_device_environment.h" @@ -15,7 +16,6 @@ #include "shared/test/common/helpers/dispatch_flags_helper.h" #include "shared/test/common/helpers/engine_descriptor_helper.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" #include "opencl/source/platform/platform.h" #include "opencl/test/unit_test/mocks/mock_allocation_properties.h" diff --git a/opencl/test/unit_test/mocks/mock_csr_simulated_common_hw.h b/opencl/test/unit_test/mocks/mock_csr_simulated_common_hw.h index f87f4a6f58..3ec940efc3 100644 --- a/opencl/test/unit_test/mocks/mock_csr_simulated_common_hw.h +++ b/opencl/test/unit_test/mocks/mock_csr_simulated_common_hw.h @@ -7,7 +7,7 @@ #pragma once -#include "opencl/source/command_stream/definitions/command_stream_receiver_simulated_hw.h" +#include "shared/source/command_stream/command_stream_receiver_simulated_hw.h" namespace NEO { diff --git a/opencl/test/unit_test/mocks/ult_cl_device_factory.cpp b/opencl/test/unit_test/mocks/ult_cl_device_factory.cpp index 2c1e1c95df..5c81050a5b 100644 --- a/opencl/test/unit_test/mocks/ult_cl_device_factory.cpp +++ b/opencl/test/unit_test/mocks/ult_cl_device_factory.cpp @@ -7,11 +7,11 @@ #include "opencl/test/unit_test/mocks/ult_cl_device_factory.h" +#include "shared/source/command_stream/create_command_stream_impl.h" #include "shared/source/os_interface/device_factory.h" #include "shared/test/common/helpers/ult_hw_config.h" #include "shared/test/common/mocks/ult_device_factory.h" -#include "opencl/source/command_stream/create_command_stream_impl.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" #include "opencl/test/unit_test/mocks/mock_memory_manager.h" diff --git a/opencl/test/unit_test/os_interface/windows/device_command_stream_tests.cpp b/opencl/test/unit_test/os_interface/windows/device_command_stream_tests.cpp index 56ab0d3669..cfa00c49dc 100644 --- a/opencl/test/unit_test/os_interface/windows/device_command_stream_tests.cpp +++ b/opencl/test/unit_test/os_interface/windows/device_command_stream_tests.cpp @@ -7,6 +7,7 @@ #include "shared/source/command_stream/aub_command_stream_receiver.h" #include "shared/source/command_stream/command_stream_receiver.h" +#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.h" #include "shared/source/command_stream/device_command_stream.h" #include "shared/source/command_stream/linear_stream.h" #include "shared/source/command_stream/preemption.h" @@ -33,7 +34,6 @@ #include "shared/test/unit_test/fixtures/mock_aub_center_fixture.h" #include "shared/test/unit_test/os_interface/windows/mock_gdi_interface.h" -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.h" #include "opencl/source/mem_obj/buffer.h" #include "opencl/source/os_interface/windows/wddm_device_command_stream.h" #include "opencl/source/platform/platform.h" diff --git a/opencl/test/unit_test/perf_tests/fixtures/device_fixture.cpp b/opencl/test/unit_test/perf_tests/fixtures/device_fixture.cpp index 511ad93eab..997d1fb91c 100644 --- a/opencl/test/unit_test/perf_tests/fixtures/device_fixture.cpp +++ b/opencl/test/unit_test/perf_tests/fixtures/device_fixture.cpp @@ -7,7 +7,7 @@ #include "device_fixture.h" -#include "opencl/source/command_stream/command_stream_receiver.h" +#include "shared/source/command_stream/command_stream_receiver.h" #include "gtest/gtest.h" diff --git a/shared/source/command_stream/CMakeLists.txt b/shared/source/command_stream/CMakeLists.txt index 8e291ca053..6f916631ef 100644 --- a/shared/source/command_stream/CMakeLists.txt +++ b/shared/source/command_stream/CMakeLists.txt @@ -8,6 +8,9 @@ set(NEO_CORE_COMMAND_STREAM ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver.cpp ${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver.h + ${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_hw.h + ${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_hw_base.inl + ${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_hw_bdw_and_later.inl ${CMAKE_CURRENT_SOURCE_DIR}/aub_subcapture_status.h ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver.cpp ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver.h @@ -15,6 +18,14 @@ set(NEO_CORE_COMMAND_STREAM ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_base.inl ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_bdw_and_later.inl ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_tgllp_and_later.inl + ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw.h + ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw_base.inl + ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw_bdw_and_later.inl + ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_hw.h + ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_with_aub_dump.h + ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_with_aub_dump.inl + ${CMAKE_CURRENT_SOURCE_DIR}/create_command_stream_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/create_command_stream_impl.h ${CMAKE_CURRENT_SOURCE_DIR}/csr_definitions.h ${CMAKE_CURRENT_SOURCE_DIR}/csr_deps.cpp ${CMAKE_CURRENT_SOURCE_DIR}/csr_deps.h @@ -50,10 +61,13 @@ set(NEO_CORE_COMMAND_STREAM if(SUPPORT_XEHP_AND_LATER) list(APPEND NEO_CORE_COMMAND_STREAM + ${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_hw_xehp_and_later.inl ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_xehp_and_later.inl + ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw_xehp_and_later.inl ${CMAKE_CURRENT_SOURCE_DIR}/preemption_xehp_and_later.inl ${CMAKE_CURRENT_SOURCE_DIR}/scratch_space_controller_xehp_and_later.cpp ${CMAKE_CURRENT_SOURCE_DIR}/scratch_space_controller_xehp_and_later.h + ${CMAKE_CURRENT_SOURCE_DIR}/tbx_command_stream_receiver_xehp_and_later.inl ) endif() diff --git a/opencl/source/command_stream/aub_command_stream_receiver_hw.h b/shared/source/command_stream/aub_command_stream_receiver_hw.h similarity index 98% rename from opencl/source/command_stream/aub_command_stream_receiver_hw.h rename to shared/source/command_stream/aub_command_stream_receiver_hw.h index f6ad646dfd..158f802510 100644 --- a/opencl/source/command_stream/aub_command_stream_receiver_hw.h +++ b/shared/source/command_stream/aub_command_stream_receiver_hw.h @@ -8,14 +8,13 @@ #pragma once #include "shared/source/aub/aub_center.h" #include "shared/source/command_stream/aub_command_stream_receiver.h" +#include "shared/source/command_stream/command_stream_receiver_simulated_hw.h" #include "shared/source/helpers/array_count.h" #include "shared/source/memory_manager/os_agnostic_memory_manager.h" #include "shared/source/memory_manager/page_table.h" #include "shared/source/memory_manager/physical_address_allocator.h" #include "shared/source/utilities/spinlock.h" -#include "opencl/source/command_stream/definitions/command_stream_receiver_simulated_hw.h" - #include "aub_mapper.h" namespace NEO { diff --git a/opencl/source/command_stream/aub_command_stream_receiver_hw_base.inl b/shared/source/command_stream/aub_command_stream_receiver_hw_base.inl similarity index 99% rename from opencl/source/command_stream/aub_command_stream_receiver_hw_base.inl rename to shared/source/command_stream/aub_command_stream_receiver_hw_base.inl index e310d36848..36b0dcf295 100644 --- a/opencl/source/command_stream/aub_command_stream_receiver_hw_base.inl +++ b/shared/source/command_stream/aub_command_stream_receiver_hw_base.inl @@ -11,15 +11,19 @@ #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/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/hardware_context_controller.h" #include "shared/source/helpers/hash.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/memory_manager/graphics_allocation.h" @@ -28,12 +32,6 @@ #include "shared/source/os_interface/hw_info_config.h" #include "shared/source/os_interface/os_context.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw.h" -#include "opencl/source/helpers/hardware_context_controller.h" -#include "opencl/source/helpers/neo_driver_version.h" -#include "opencl/source/os_interface/ocl_reg_path.h" - -#include "driver_version.h" #include "third_party/aub_stream/headers/aub_manager.h" #include "third_party/aub_stream/headers/aubstream.h" @@ -57,7 +55,7 @@ AUBCommandStreamReceiverHw::AUBCommandStreamReceiverHw(const std::str auto subCaptureCommon = aubCenter->getSubCaptureCommon(); UNRECOVERABLE_IF(nullptr == subCaptureCommon); - subCaptureManager = std::make_unique(fileName, *subCaptureCommon, oclRegPath); + subCaptureManager = std::make_unique(fileName, *subCaptureCommon, ApiSpecificConfig::getRegistryPath()); aubManager = aubCenter->getAubManager(); diff --git a/opencl/source/command_stream/aub_command_stream_receiver_hw_bdw_and_later.inl b/shared/source/command_stream/aub_command_stream_receiver_hw_bdw_and_later.inl similarity index 93% rename from opencl/source/command_stream/aub_command_stream_receiver_hw_bdw_and_later.inl rename to shared/source/command_stream/aub_command_stream_receiver_hw_bdw_and_later.inl index 714f06711b..abeb5eef71 100644 --- a/opencl/source/command_stream/aub_command_stream_receiver_hw_bdw_and_later.inl +++ b/shared/source/command_stream/aub_command_stream_receiver_hw_bdw_and_later.inl @@ -5,7 +5,7 @@ * */ -#include "opencl/source/command_stream/aub_command_stream_receiver_hw_base.inl" +#include "shared/source/command_stream/aub_command_stream_receiver_hw_base.inl" namespace NEO { diff --git a/opencl/source/command_stream/aub_command_stream_receiver_hw_xehp_and_later.inl b/shared/source/command_stream/aub_command_stream_receiver_hw_xehp_and_later.inl similarity index 94% rename from opencl/source/command_stream/aub_command_stream_receiver_hw_xehp_and_later.inl rename to shared/source/command_stream/aub_command_stream_receiver_hw_xehp_and_later.inl index 89e883d692..279cef8745 100644 --- a/opencl/source/command_stream/aub_command_stream_receiver_hw_xehp_and_later.inl +++ b/shared/source/command_stream/aub_command_stream_receiver_hw_xehp_and_later.inl @@ -6,10 +6,9 @@ */ #include "shared/source/aub_mem_dump/page_table_entry_bits.h" +#include "shared/source/command_stream/aub_command_stream_receiver_hw_base.inl" #include "shared/source/helpers/engine_node_helper.h" -#include "opencl/source/command_stream/aub_command_stream_receiver_hw_base.inl" - namespace NEO { template diff --git a/opencl/source/command_stream/command_stream_receiver_simulated_common_hw.h b/shared/source/command_stream/command_stream_receiver_simulated_common_hw.h similarity index 100% rename from opencl/source/command_stream/command_stream_receiver_simulated_common_hw.h rename to shared/source/command_stream/command_stream_receiver_simulated_common_hw.h diff --git a/opencl/source/command_stream/command_stream_receiver_simulated_common_hw_base.inl b/shared/source/command_stream/command_stream_receiver_simulated_common_hw_base.inl similarity index 97% rename from opencl/source/command_stream/command_stream_receiver_simulated_common_hw_base.inl rename to shared/source/command_stream/command_stream_receiver_simulated_common_hw_base.inl index c0f927941f..779aa886f1 100644 --- a/opencl/source/command_stream/command_stream_receiver_simulated_common_hw_base.inl +++ b/shared/source/command_stream/command_stream_receiver_simulated_common_hw_base.inl @@ -7,17 +7,16 @@ #include "shared/source/aub/aub_helper.h" #include "shared/source/aub_mem_dump/page_table_entry_bits.h" +#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw.h" #include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/gmm_helper/gmm.h" #include "shared/source/gmm_helper/gmm_helper.h" #include "shared/source/gmm_helper/resource_info.h" +#include "shared/source/helpers/hardware_context_controller.h" #include "shared/source/memory_manager/address_mapper.h" #include "shared/source/memory_manager/memory_manager.h" #include "shared/source/os_interface/os_context.h" -#include "opencl/source/command_stream/command_stream_receiver_simulated_common_hw.h" -#include "opencl/source/helpers/hardware_context_controller.h" - #include "third_party/aub_stream/headers/aub_manager.h" namespace NEO { diff --git a/opencl/source/command_stream/command_stream_receiver_simulated_common_hw_bdw_and_later.inl b/shared/source/command_stream/command_stream_receiver_simulated_common_hw_bdw_and_later.inl similarity index 97% rename from opencl/source/command_stream/command_stream_receiver_simulated_common_hw_bdw_and_later.inl rename to shared/source/command_stream/command_stream_receiver_simulated_common_hw_bdw_and_later.inl index 0c31175189..485cd3d42e 100644 --- a/opencl/source/command_stream/command_stream_receiver_simulated_common_hw_bdw_and_later.inl +++ b/shared/source/command_stream/command_stream_receiver_simulated_common_hw_bdw_and_later.inl @@ -5,7 +5,7 @@ * */ -#include "opencl/source/command_stream/command_stream_receiver_simulated_common_hw_base.inl" +#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw_base.inl" namespace NEO { diff --git a/opencl/source/command_stream/command_stream_receiver_simulated_common_hw_xehp_and_later.inl b/shared/source/command_stream/command_stream_receiver_simulated_common_hw_xehp_and_later.inl similarity index 98% rename from opencl/source/command_stream/command_stream_receiver_simulated_common_hw_xehp_and_later.inl rename to shared/source/command_stream/command_stream_receiver_simulated_common_hw_xehp_and_later.inl index 037bb6a2f2..a9ab640427 100644 --- a/opencl/source/command_stream/command_stream_receiver_simulated_common_hw_xehp_and_later.inl +++ b/shared/source/command_stream/command_stream_receiver_simulated_common_hw_xehp_and_later.inl @@ -6,14 +6,13 @@ */ #include "shared/source/aub_mem_dump/page_table_entry_bits.h" +#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw_base.inl" #include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/memory_manager/memory_banks.h" #include "shared/source/memory_manager/memory_pool.h" #include "shared/source/memory_manager/physical_address_allocator.h" -#include "opencl/source/command_stream/command_stream_receiver_simulated_common_hw_base.inl" - namespace NEO { template diff --git a/opencl/source/command_stream/definitions/command_stream_receiver_simulated_hw.h b/shared/source/command_stream/command_stream_receiver_simulated_hw.h similarity index 98% rename from opencl/source/command_stream/definitions/command_stream_receiver_simulated_hw.h rename to shared/source/command_stream/command_stream_receiver_simulated_hw.h index 80511e5557..98b7350934 100644 --- a/opencl/source/command_stream/definitions/command_stream_receiver_simulated_hw.h +++ b/shared/source/command_stream/command_stream_receiver_simulated_hw.h @@ -7,7 +7,9 @@ #pragma once #include "shared/source/aub/aub_helper.h" +#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw.h" #include "shared/source/helpers/debug_helpers.h" +#include "shared/source/helpers/hardware_context_controller.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/memory_manager/graphics_allocation.h" #include "shared/source/memory_manager/memory_banks.h" @@ -15,9 +17,6 @@ #include "shared/source/memory_manager/physical_address_allocator.h" #include "shared/source/os_interface/os_context.h" -#include "opencl/source/command_stream/command_stream_receiver_simulated_common_hw.h" -#include "opencl/source/helpers/hardware_context_controller.h" - #include "aub_mem_dump.h" #include "third_party/aub_stream/headers/allocation_params.h" #include "third_party/aub_stream/headers/aub_manager.h" diff --git a/opencl/source/command_stream/command_stream_receiver_with_aub_dump.h b/shared/source/command_stream/command_stream_receiver_with_aub_dump.h similarity index 100% rename from opencl/source/command_stream/command_stream_receiver_with_aub_dump.h rename to shared/source/command_stream/command_stream_receiver_with_aub_dump.h diff --git a/opencl/source/command_stream/command_stream_receiver_with_aub_dump.inl b/shared/source/command_stream/command_stream_receiver_with_aub_dump.inl similarity index 98% rename from opencl/source/command_stream/command_stream_receiver_with_aub_dump.inl rename to shared/source/command_stream/command_stream_receiver_with_aub_dump.inl index 6c956ead80..eb88747123 100644 --- a/opencl/source/command_stream/command_stream_receiver_with_aub_dump.inl +++ b/shared/source/command_stream/command_stream_receiver_with_aub_dump.inl @@ -7,11 +7,10 @@ #include "shared/source/aub/aub_center.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/execution_environment/execution_environment.h" #include "shared/source/execution_environment/root_device_environment.h" -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.h" - namespace NEO { extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE]; diff --git a/opencl/source/command_stream/create_command_stream_impl.cpp b/shared/source/command_stream/create_command_stream_impl.cpp similarity index 97% rename from opencl/source/command_stream/create_command_stream_impl.cpp rename to shared/source/command_stream/create_command_stream_impl.cpp index d52c5f9a5f..9283f80d59 100644 --- a/opencl/source/command_stream/create_command_stream_impl.cpp +++ b/shared/source/command_stream/create_command_stream_impl.cpp @@ -6,14 +6,13 @@ */ #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/tbx_command_stream_receiver.h" #include "shared/source/execution_environment/execution_environment.h" #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/helpers/api_specific_config.h" #include "shared/source/os_interface/device_factory.h" -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.h" - namespace NEO { extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE]; diff --git a/opencl/source/command_stream/create_command_stream_impl.h b/shared/source/command_stream/create_command_stream_impl.h similarity index 92% rename from opencl/source/command_stream/create_command_stream_impl.h rename to shared/source/command_stream/create_command_stream_impl.h index 721222e329..3bc96c0278 100644 --- a/opencl/source/command_stream/create_command_stream_impl.h +++ b/shared/source/command_stream/create_command_stream_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2021 Intel Corporation * * SPDX-License-Identifier: MIT * diff --git a/shared/source/command_stream/tbx_command_stream_receiver_hw.h b/shared/source/command_stream/tbx_command_stream_receiver_hw.h index 9c64534735..2d4831da58 100644 --- a/shared/source/command_stream/tbx_command_stream_receiver_hw.h +++ b/shared/source/command_stream/tbx_command_stream_receiver_hw.h @@ -6,13 +6,12 @@ */ #pragma once +#include "shared/source/command_stream/command_stream_receiver_simulated_hw.h" #include "shared/source/command_stream/tbx_command_stream_receiver.h" #include "shared/source/memory_manager/address_mapper.h" #include "shared/source/memory_manager/os_agnostic_memory_manager.h" #include "shared/source/memory_manager/page_table.h" -#include "opencl/source/command_stream/definitions/command_stream_receiver_simulated_hw.h" - #include "aub_mapper.h" #include diff --git a/shared/source/command_stream/tbx_command_stream_receiver_hw.inl b/shared/source/command_stream/tbx_command_stream_receiver_hw.inl index b8a2e3e36a..bd9172c96b 100644 --- a/shared/source/command_stream/tbx_command_stream_receiver_hw.inl +++ b/shared/source/command_stream/tbx_command_stream_receiver_hw.inl @@ -11,13 +11,16 @@ #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/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/hardware_context_controller.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/helpers/populate_factory.h" #include "shared/source/helpers/ptr_math.h" @@ -27,10 +30,6 @@ #include "shared/source/os_interface/hw_info_config.h" #include "shared/source/os_interface/os_context.h" -#include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.h" -#include "opencl/source/helpers/hardware_context_controller.h" -#include "opencl/source/os_interface/ocl_reg_path.h" - #include namespace NEO { @@ -180,7 +179,7 @@ CommandStreamReceiver *TbxCommandStreamReceiverHw::create(const std:: UNRECOVERABLE_IF(nullptr == subCaptureCommon); if (subCaptureCommon->subCaptureMode > AubSubCaptureManager::SubCaptureMode::Off) { - csr->subCaptureManager = std::make_unique(fullName, *subCaptureCommon, oclRegPath); + csr->subCaptureManager = std::make_unique(fullName, *subCaptureCommon, ApiSpecificConfig::getRegistryPath()); } if (csr->aubManager) { diff --git a/opencl/source/command_stream/tbx_command_stream_receiver_xehp_and_later.inl b/shared/source/command_stream/tbx_command_stream_receiver_xehp_and_later.inl similarity index 100% rename from opencl/source/command_stream/tbx_command_stream_receiver_xehp_and_later.inl rename to shared/source/command_stream/tbx_command_stream_receiver_xehp_and_later.inl diff --git a/shared/source/gen12lp/helpers_gen12lp_dg1.cpp b/shared/source/gen12lp/helpers_gen12lp_dg1.cpp index b248c4f893..ea18db2143 100644 --- a/shared/source/gen12lp/helpers_gen12lp_dg1.cpp +++ b/shared/source/gen12lp/helpers_gen12lp_dg1.cpp @@ -7,10 +7,9 @@ #include "shared/source/aub_mem_dump/page_table_entry_bits.h" #include "shared/source/command_stream/command_stream_receiver.h" +#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw.h" #include "shared/source/gen12lp/helpers_gen12lp.h" -#include "opencl/source/command_stream/command_stream_receiver_simulated_common_hw.h" - namespace NEO { namespace Gen12LPHelpers { diff --git a/shared/source/helpers/CMakeLists.txt b/shared/source/helpers/CMakeLists.txt index f440235ed5..6975fd0b7c 100644 --- a/shared/source/helpers/CMakeLists.txt +++ b/shared/source/helpers/CMakeLists.txt @@ -50,6 +50,8 @@ set(NEO_CORE_HELPERS ${CMAKE_CURRENT_SOURCE_DIR}/flush_stamp.cpp ${CMAKE_CURRENT_SOURCE_DIR}/flush_stamp.h ${CMAKE_CURRENT_SOURCE_DIR}/get_info.h + ${CMAKE_CURRENT_SOURCE_DIR}/hardware_context_controller.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/hardware_context_controller.h ${CMAKE_CURRENT_SOURCE_DIR}/hash.h ${CMAKE_CURRENT_SOURCE_DIR}/heap_assigner.h ${CMAKE_CURRENT_SOURCE_DIR}/heap_assigner.cpp @@ -75,6 +77,7 @@ set(NEO_CORE_HELPERS ${CMAKE_CURRENT_SOURCE_DIR}/local_id_gen.inl ${CMAKE_CURRENT_SOURCE_DIR}/local_id_gen_special.inl ${CMAKE_CURRENT_SOURCE_DIR}/local_id_gen_sse4.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/neo_driver_version.h ${CMAKE_CURRENT_SOURCE_DIR}/non_copyable_or_moveable.h ${CMAKE_CURRENT_SOURCE_DIR}/options.h ${CMAKE_CURRENT_SOURCE_DIR}/pause_on_gpu_properties.h diff --git a/shared/source/helpers/api_specific_config.h b/shared/source/helpers/api_specific_config.h index 6e5199d07b..3d2f8e744e 100644 --- a/shared/source/helpers/api_specific_config.h +++ b/shared/source/helpers/api_specific_config.h @@ -19,6 +19,7 @@ struct ApiSpecificConfig { static ApiType getApiType(); static std::string getName(); static uint64_t getReducedMaxAllocSize(uint64_t maxAllocSize); + static const char *getRegistryPath(); static std::string getAubPrefixForSpecificApi() { return (getName() + "_"); diff --git a/shared/source/helpers/hardware_context_controller.cpp b/shared/source/helpers/hardware_context_controller.cpp new file mode 100644 index 0000000000..9630eb08ea --- /dev/null +++ b/shared/source/helpers/hardware_context_controller.cpp @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2019-2021 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/source/helpers/hardware_context_controller.h" + +#include "shared/source/helpers/constants.h" +#include "shared/source/os_interface/os_context.h" + +#include "aub_mem_dump.h" +#include "third_party/aub_stream/headers/allocation_params.h" +using namespace NEO; + +HardwareContextController::HardwareContextController(aub_stream::AubManager &aubManager, OsContext &osContext, uint32_t flags) { + auto deviceBitfield = osContext.getDeviceBitfield(); + for (uint32_t deviceIndex = 0; deviceIndex < deviceBitfield.size(); deviceIndex++) { + if (deviceBitfield.test(deviceIndex)) { + hardwareContexts.emplace_back(aubManager.createHardwareContext(deviceIndex, osContext.getEngineType(), flags)); + } + } +} + +void HardwareContextController::initialize() { + for (auto &hardwareContext : hardwareContexts) { + hardwareContext->initialize(); + } +} + +void HardwareContextController::pollForCompletion() { + for (auto &hardwareContext : hardwareContexts) { + hardwareContext->pollForCompletion(); + } +} + +void HardwareContextController::expectMemory(uint64_t gfxAddress, const void *srcAddress, size_t length, uint32_t compareOperation) { + for (auto &hardwareContext : hardwareContexts) { + hardwareContext->expectMemory(gfxAddress, srcAddress, length, compareOperation); + } +} + +void HardwareContextController::submit(uint64_t batchBufferGpuAddress, const void *batchBuffer, size_t batchBufferSize, + uint32_t memoryBank, uint64_t entryBits, bool overrideRingHead) { + for (auto &hardwareContext : hardwareContexts) { + hardwareContext->submitBatchBuffer(batchBufferGpuAddress, overrideRingHead); + } +} + +void HardwareContextController::writeMemory(aub_stream::AllocationParams &allocationParams) { + if (hardwareContexts.size() == 1u) { + hardwareContexts.at(0)->writeMemory2(allocationParams); + return; + } + + aub_stream::AllocationParams clonedParams = allocationParams; + + for (auto bankId = 0u; bankId < hardwareContexts.size(); bankId++) { + auto &hardwareContext = hardwareContexts.at(bankId); + + auto selectedBank = allocationParams.memoryBanks & (1 << bankId); + UNRECOVERABLE_IF(selectedBank == 0); + + clonedParams.memoryBanks = selectedBank; + hardwareContext->writeMemory2(clonedParams); + } +} + +void HardwareContextController::writeMMIO(uint32_t offset, uint32_t value) { + hardwareContexts[0]->writeMMIO(offset, value); +} + +void HardwareContextController::dumpBufferBIN(uint64_t gfxAddress, size_t size) { + hardwareContexts[0]->dumpBufferBIN(gfxAddress, size); +} + +void HardwareContextController::dumpSurface(const aub_stream::SurfaceInfo &surfaceInfo) { + hardwareContexts[0]->dumpSurface(surfaceInfo); +} + +void HardwareContextController::readMemory(uint64_t gfxAddress, void *memory, size_t size, uint32_t memoryBanks, size_t pageSize) { + hardwareContexts[0]->readMemory(gfxAddress, memory, size, memoryBanks, pageSize); +} diff --git a/opencl/source/helpers/hardware_context_controller.h b/shared/source/helpers/hardware_context_controller.h similarity index 100% rename from opencl/source/helpers/hardware_context_controller.h rename to shared/source/helpers/hardware_context_controller.h diff --git a/opencl/source/helpers/neo_driver_version.h b/shared/source/helpers/neo_driver_version.h similarity index 87% rename from opencl/source/helpers/neo_driver_version.h rename to shared/source/helpers/neo_driver_version.h index 13f480d65e..113a3355d3 100644 --- a/opencl/source/helpers/neo_driver_version.h +++ b/shared/source/helpers/neo_driver_version.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 Intel Corporation + * Copyright (C) 2019-2021 Intel Corporation * * SPDX-License-Identifier: MIT * diff --git a/shared/test/common/helpers/api_specific_config_shared_tests.cpp b/shared/test/common/helpers/api_specific_config_shared_tests.cpp index 7afe748e39..ce71e04690 100644 --- a/shared/test/common/helpers/api_specific_config_shared_tests.cpp +++ b/shared/test/common/helpers/api_specific_config_shared_tests.cpp @@ -33,5 +33,7 @@ uint64_t ApiSpecificConfig::getReducedMaxAllocSize(uint64_t maxAllocSize) { std::string ApiSpecificConfig::getName() { return "shared"; } - +const char *ApiSpecificConfig::getRegistryPath() { + return ""; +} } // namespace NEO diff --git a/shared/test/common/libult/create_command_stream.cpp b/shared/test/common/libult/create_command_stream.cpp index ba77707a19..e75b948447 100644 --- a/shared/test/common/libult/create_command_stream.cpp +++ b/shared/test/common/libult/create_command_stream.cpp @@ -7,13 +7,12 @@ #include "shared/test/common/libult/create_command_stream.h" +#include "shared/source/command_stream/create_command_stream_impl.h" #include "shared/source/execution_environment/root_device_environment.h" #include "shared/test/common/helpers/default_hw_info.h" #include "shared/test/common/helpers/ult_hw_config.h" #include "shared/test/common/mocks/ult_device_factory.h" -#include "opencl/source/command_stream/create_command_stream_impl.h" - #include namespace NEO {