diff --git a/CMakeLists.txt b/CMakeLists.txt index 480fdd7ae8..23ac6c8def 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -363,7 +363,7 @@ if(NOT INSTRUMENTATION_LIB_NAME) endif() endif() if(IS_DIRECTORY "${INSTRUMENTATION_SOURCE_DIR}") - message(STATUS "Intrumentation source dir is: ${INSTRUMENTATION_SOURCE_DIR}") + message(STATUS "Instrumentation source dir is: ${INSTRUMENTATION_SOURCE_DIR}") add_subdirectory("${INSTRUMENTATION_SOURCE_DIR}" "${IGDRCL_BUILD_DIR}/instrumentation") set(INSTRUMENTATION_LIB_NAME "instrumentation_umd") set(HAVE_INSTRUMENTATION TRUE) @@ -428,11 +428,16 @@ endif() add_subdirectory(third_party/gtest) + message(STATUS "AUB_STREAM_DIR = ${AUB_STREAM_DIR}" ) if(DEFINED AUB_STREAM_DIR) set(AUB_STREAM_PROJECT_NAME "aub_stream") add_subdirectory(${AUB_STREAM_DIR} ${CMAKE_BINARY_DIR}/aub_stream EXCLUDE_FROM_ALL) + set(ENGINE_NODE_DIR ${AUB_STREAM_DIR}/aub_mem_dump${BRANCH_DIR_SUFFIX}/includes) +else() + set(ENGINE_NODE_DIR ${AUB_STREAM_HEADERS_DIR}) endif() +message(STATUS "Engine node dir: ${ENGINE_NODE_DIR}") add_definitions(-DGMM_OCL) diff --git a/offline_compiler/CMakeLists.txt b/offline_compiler/CMakeLists.txt index 6c19b266b0..9871174684 100644 --- a/offline_compiler/CMakeLists.txt +++ b/offline_compiler/CMakeLists.txt @@ -75,6 +75,7 @@ add_subdirectories() create_project_source_tree(ocloc ${IGDRCL_SOURCE_DIR}/runtime) set(CLOC_INCLUDES + ${ENGINE_NODE_DIR} ${IGC_OCL_ADAPTOR_DIR} ${CIF_BASE_DIR} ${HW_SRC_INCLUDE_PATH} diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index ce5e5ca07e..d46697bdbe 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -58,6 +58,7 @@ target_include_directories(${NEO_STATIC_LIB_NAME} PRIVATE ) target_include_directories(${NEO_STATIC_LIB_NAME} PUBLIC + ${ENGINE_NODE_DIR} ${KHRONOS_HEADERS_DIR} ${KHRONOS_GL_HEADERS_DIR} ${CIF_BASE_DIR} diff --git a/runtime/built_ins/builtins_binary.cmake b/runtime/built_ins/builtins_binary.cmake index 04d91f2543..9e28b2a3b1 100644 --- a/runtime/built_ins/builtins_binary.cmake +++ b/runtime/built_ins/builtins_binary.cmake @@ -1,5 +1,5 @@ # -# Copyright (C) 2018 Intel Corporation +# Copyright (C) 2018-2019 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -51,6 +51,7 @@ set_target_properties(${BUILTINS_BINARIES_LIB_NAME} PROPERTIES POSITION_INDEPEND set_target_properties(${BUILTINS_BINARIES_LIB_NAME} PROPERTIES FOLDER "built_ins") target_include_directories(${BUILTINS_BINARIES_LIB_NAME} PRIVATE + ${ENGINE_NODE_DIR} ${KHRONOS_HEADERS_DIR} ${KHRONOS_GL_HEADERS_DIR} ${UMKM_SHAREDDATA_INCLUDE_PATHS} diff --git a/runtime/built_ins/registry/CMakeLists.txt b/runtime/built_ins/registry/CMakeLists.txt index d31f61bf66..0203c2bdde 100644 --- a/runtime/built_ins/registry/CMakeLists.txt +++ b/runtime/built_ins/registry/CMakeLists.txt @@ -1,22 +1,8 @@ -# Copyright (c) 2017, Intel Corporation # -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: +# Copyright (C) 2017-2019 Intel Corporation # -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. +# SPDX-License-Identifier: MIT # -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. add_library(${BUILTINS_SOURCES_LIB_NAME} OBJECT CMakeLists.txt @@ -29,6 +15,7 @@ set_target_properties(${BUILTINS_SOURCES_LIB_NAME} PROPERTIES POSITION_INDEPENDE set_target_properties(${BUILTINS_SOURCES_LIB_NAME} PROPERTIES FOLDER "built_ins") target_include_directories(${BUILTINS_SOURCES_LIB_NAME} PRIVATE + ${ENGINE_NODE_DIR} ${KHRONOS_HEADERS_DIR} ${KHRONOS_GL_HEADERS_DIR} ${UMKM_SHAREDDATA_INCLUDE_PATHS} diff --git a/runtime/builtin_kernels_simulation/CMakeLists.txt b/runtime/builtin_kernels_simulation/CMakeLists.txt index 3805ed81f3..fb933ec7f6 100644 --- a/runtime/builtin_kernels_simulation/CMakeLists.txt +++ b/runtime/builtin_kernels_simulation/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2017-2018 Intel Corporation +# Copyright (C) 2017-2019 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -44,6 +44,7 @@ apply_macro_for_each_gen("SUPPORTED") add_library(${BIKSIM_LIB_NAME} OBJECT ${BUILTIN_KERNELS_SIMULATION_SRCS}) target_include_directories(${BIKSIM_LIB_NAME} BEFORE PRIVATE + ${ENGINE_NODE_DIR} ${UMKM_SHAREDDATA_INCLUDE_PATHS} ${KHRONOS_HEADERS_DIR} ${KHRONOS_GL_HEADERS_DIR} diff --git a/runtime/command_queue/command_queue_hw.h b/runtime/command_queue/command_queue_hw.h index c5c2358ea6..70733304aa 100644 --- a/runtime/command_queue/command_queue_hw.h +++ b/runtime/command_queue/command_queue_hw.h @@ -36,7 +36,7 @@ class CommandQueueHw : public CommandQueue { if (clPriority & static_cast(CL_QUEUE_PRIORITY_LOW_KHR)) { priority = QueuePriority::LOW; - this->engine = &device->getEngine(EngineType::ENGINE_RCS, true); + this->engine = &device->getEngine(aub_stream::ENGINE_RCS, true); } else if (clPriority & static_cast(CL_QUEUE_PRIORITY_MED_KHR)) { priority = QueuePriority::MEDIUM; } else if (clPriority & static_cast(CL_QUEUE_PRIORITY_HIGH_KHR)) { diff --git a/runtime/command_stream/CMakeLists.txt b/runtime/command_stream/CMakeLists.txt index 5aac9be1cc..dcbd12fe3a 100644 --- a/runtime/command_stream/CMakeLists.txt +++ b/runtime/command_stream/CMakeLists.txt @@ -23,7 +23,6 @@ set(RUNTIME_SRCS_COMMAND_STREAM ${CMAKE_CURRENT_SOURCE_DIR}/create_command_stream_impl.h ${CMAKE_CURRENT_SOURCE_DIR}/csr_definitions.h ${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}/command_stream_receiver_simulated_hw.h - ${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}/engine_node.h ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw.h ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw.inl ${CMAKE_CURRENT_SOURCE_DIR}/device_command_stream.h diff --git a/runtime/command_stream/command_stream_receiver_simulated_common_hw.h b/runtime/command_stream/command_stream_receiver_simulated_common_hw.h index fef839d859..28cf5c18b7 100644 --- a/runtime/command_stream/command_stream_receiver_simulated_common_hw.h +++ b/runtime/command_stream/command_stream_receiver_simulated_common_hw.h @@ -42,7 +42,7 @@ class CommandStreamReceiverSimulatedCommonHw : public CommandStreamReceiverHw::getMemoryBankForGtt( } template -const AubMemDump::LrcaHelper &CommandStreamReceiverSimulatedCommonHw::getCsTraits(EngineType engineType) { +const AubMemDump::LrcaHelper &CommandStreamReceiverSimulatedCommonHw::getCsTraits(aub_stream::EngineType engineType) { return *AUBFamilyMapper::csTraits[engineType]; } diff --git a/runtime/device/device.cpp b/runtime/device/device.cpp index 498eb9debb..bd9d6f5cc3 100644 --- a/runtime/device/device.cpp +++ b/runtime/device/device.cpp @@ -278,7 +278,7 @@ void Device::initMaxPowerSavingMode() { } } -EngineControl &Device::getEngine(EngineType engineType, bool lowPriority) { +EngineControl &Device::getEngine(aub_stream::EngineType engineType, bool lowPriority) { for (auto &engine : engines) { if (engine.osContext->getEngineType() == engineType && engine.osContext->isLowPriority() == lowPriority) { diff --git a/runtime/device/device.h b/runtime/device/device.h index 22003b714c..02664c053d 100644 --- a/runtime/device/device.h +++ b/runtime/device/device.h @@ -72,7 +72,7 @@ class Device : public BaseObject<_cl_device_id> { deviceInfo.force32BitAddressess = value; } - EngineControl &getEngine(EngineType engineType, bool lowPriority); + EngineControl &getEngine(aub_stream::EngineType engineType, bool lowPriority); EngineControl &getDefaultEngine(); const char *getProductAbbrev() const; diff --git a/runtime/gen10/aub_mapper.h b/runtime/gen10/aub_mapper.h index e9886f0359..640eb1b087 100644 --- a/runtime/gen10/aub_mapper.h +++ b/runtime/gen10/aub_mapper.h @@ -9,6 +9,8 @@ #include "runtime/gen_common/aub_mapper_base.h" #include "runtime/memory_manager/memory_constants.h" +#include "engine_node.h" + namespace NEO { struct CNLFamily; @@ -18,10 +20,10 @@ struct AUBFamilyMapper { using AubTraits = AubMemDump::Traits; - static const AubMemDump::LrcaHelper *const csTraits[EngineType::NUM_ENGINES]; + static const AubMemDump::LrcaHelper *const csTraits[aub_stream::NUM_ENGINES]; static const MMIOList globalMMIO; - static const MMIOList *perEngineMMIO[EngineType::NUM_ENGINES]; + static const MMIOList *perEngineMMIO[aub_stream::NUM_ENGINES]; typedef AubMemDump::AubDump AUB; }; diff --git a/runtime/gen10/aub_mem_dump_gen10.cpp b/runtime/gen10/aub_mem_dump_gen10.cpp index b8c4fc69b6..8e4e897a10 100644 --- a/runtime/gen10/aub_mem_dump_gen10.cpp +++ b/runtime/gen10/aub_mem_dump_gen10.cpp @@ -35,7 +35,7 @@ static const AubMemDump::LrcaHelperBcs bcs(0x022000); static const AubMemDump::LrcaHelperVcs vcs(0x012000); static const AubMemDump::LrcaHelperVecs vecs(0x01a000); -const AubMemDump::LrcaHelper *const AUBFamilyMapper::csTraits[EngineType::NUM_ENGINES] = { +const AubMemDump::LrcaHelper *const AUBFamilyMapper::csTraits[aub_stream::NUM_ENGINES] = { &rcs, &bcs, &vcs, @@ -73,7 +73,7 @@ static const MMIOList mmioListVECS = { MMIOPair(AubMemDump::computeRegisterOffset(vecs.mmioBase, 0x229c), 0xffff8280), }; -const MMIOList *AUBFamilyMapper::perEngineMMIO[EngineType::NUM_ENGINES] = { +const MMIOList *AUBFamilyMapper::perEngineMMIO[aub_stream::NUM_ENGINES] = { &mmioListRCS, &mmioListBCS, &mmioListVCS, diff --git a/runtime/gen10/hw_info_cnl.inl b/runtime/gen10/hw_info_cnl.inl index 01b48fe9aa..f58375ccb5 100644 --- a/runtime/gen10/hw_info_cnl.inl +++ b/runtime/gen10/hw_info_cnl.inl @@ -47,7 +47,7 @@ const RuntimeCapabilityTable CNL::capabilityTable{ MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationCNL, // isSimulation PreemptionMode::MidThread, // defaultPreemptionMode - EngineType::ENGINE_RCS, // defaultEngineType + aub_stream::ENGINE_RCS, // defaultEngineType 0, // maxRenderFrequency 21, // clVersionSupport CmdServicesMemTraceVersion::DeviceValues::Cnl, // aubDeviceId diff --git a/runtime/gen8/aub_mapper.h b/runtime/gen8/aub_mapper.h index 16979c8005..0046cd30a4 100644 --- a/runtime/gen8/aub_mapper.h +++ b/runtime/gen8/aub_mapper.h @@ -9,6 +9,8 @@ #include "runtime/gen_common/aub_mapper_base.h" #include "runtime/memory_manager/memory_constants.h" +#include "engine_node.h" + namespace NEO { struct BDWFamily; @@ -18,10 +20,10 @@ struct AUBFamilyMapper { using AubTraits = AubMemDump::Traits; - static const AubMemDump::LrcaHelper *const csTraits[EngineType::NUM_ENGINES]; + static const AubMemDump::LrcaHelper *const csTraits[aub_stream::NUM_ENGINES]; static const MMIOList globalMMIO; - static const MMIOList *perEngineMMIO[EngineType::NUM_ENGINES]; + static const MMIOList *perEngineMMIO[aub_stream::NUM_ENGINES]; typedef AubMemDump::AubDump AUB; }; diff --git a/runtime/gen8/aub_mem_dump_gen8.cpp b/runtime/gen8/aub_mem_dump_gen8.cpp index 24e3f2dcdb..4db5aeeebf 100644 --- a/runtime/gen8/aub_mem_dump_gen8.cpp +++ b/runtime/gen8/aub_mem_dump_gen8.cpp @@ -33,7 +33,7 @@ static const AubMemDump::LrcaHelperBcs bcs(0x022000); static const AubMemDump::LrcaHelperVcs vcs(0x012000); static const AubMemDump::LrcaHelperVecs vecs(0x01a000); -const AubMemDump::LrcaHelper *const AUBFamilyMapper::csTraits[EngineType::NUM_ENGINES] = { +const AubMemDump::LrcaHelper *const AUBFamilyMapper::csTraits[aub_stream::NUM_ENGINES] = { &rcs, &bcs, &vcs, @@ -58,7 +58,7 @@ static const MMIOList mmioListVECS = { MMIOPair(AubMemDump::computeRegisterOffset(vecs.mmioBase, 0x229c), 0xffff8280), }; -const MMIOList *AUBFamilyMapper::perEngineMMIO[EngineType::NUM_ENGINES] = { +const MMIOList *AUBFamilyMapper::perEngineMMIO[aub_stream::NUM_ENGINES] = { &mmioListRCS, &mmioListBCS, &mmioListVCS, diff --git a/runtime/gen8/hw_info_bdw.inl b/runtime/gen8/hw_info_bdw.inl index 67d354977e..c2d6a9475d 100644 --- a/runtime/gen8/hw_info_bdw.inl +++ b/runtime/gen8/hw_info_bdw.inl @@ -48,7 +48,7 @@ const RuntimeCapabilityTable BDW::capabilityTable{ MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationBDW, // isSimulation PreemptionMode::Disabled, // defaultPreemptionMode - EngineType::ENGINE_RCS, // defaultEngineType + aub_stream::ENGINE_RCS, // defaultEngineType 0, // maxRenderFrequency 21, // clVersionSupport CmdServicesMemTraceVersion::DeviceValues::Bdw, // aubDeviceId diff --git a/runtime/gen9/aub_mapper.h b/runtime/gen9/aub_mapper.h index 7fa540ba4a..2847194ef8 100644 --- a/runtime/gen9/aub_mapper.h +++ b/runtime/gen9/aub_mapper.h @@ -9,6 +9,8 @@ #include "runtime/gen_common/aub_mapper_base.h" #include "runtime/memory_manager/memory_constants.h" +#include "engine_node.h" + namespace NEO { struct SKLFamily; @@ -18,10 +20,10 @@ struct AUBFamilyMapper { using AubTraits = AubMemDump::Traits; - static const AubMemDump::LrcaHelper *const csTraits[EngineType::NUM_ENGINES]; + static const AubMemDump::LrcaHelper *const csTraits[aub_stream::NUM_ENGINES]; static const MMIOList globalMMIO; - static const MMIOList *perEngineMMIO[EngineType::NUM_ENGINES]; + static const MMIOList *perEngineMMIO[aub_stream::NUM_ENGINES]; typedef AubMemDump::AubDump AUB; }; diff --git a/runtime/gen9/aub_mem_dump_gen9.cpp b/runtime/gen9/aub_mem_dump_gen9.cpp index 68437c7f51..a39080d641 100644 --- a/runtime/gen9/aub_mem_dump_gen9.cpp +++ b/runtime/gen9/aub_mem_dump_gen9.cpp @@ -33,7 +33,7 @@ static const AubMemDump::LrcaHelperBcs bcs(0x022000); static const AubMemDump::LrcaHelperVcs vcs(0x012000); static const AubMemDump::LrcaHelperVecs vecs(0x01a000); -const AubMemDump::LrcaHelper *const AUBFamilyMapper::csTraits[EngineType::NUM_ENGINES] = { +const AubMemDump::LrcaHelper *const AUBFamilyMapper::csTraits[aub_stream::NUM_ENGINES] = { &rcs, &bcs, &vcs, @@ -70,7 +70,7 @@ static const MMIOList mmioListVECS = { MMIOPair(AubMemDump::computeRegisterOffset(vecs.mmioBase, 0x229c), 0xffff8280), }; -const MMIOList *AUBFamilyMapper::perEngineMMIO[EngineType::NUM_ENGINES] = { +const MMIOList *AUBFamilyMapper::perEngineMMIO[aub_stream::NUM_ENGINES] = { &mmioListRCS, &mmioListBCS, &mmioListVCS, diff --git a/runtime/gen9/hw_info_bxt.inl b/runtime/gen9/hw_info_bxt.inl index 51a345a53d..1573fff1b8 100644 --- a/runtime/gen9/hw_info_bxt.inl +++ b/runtime/gen9/hw_info_bxt.inl @@ -45,7 +45,7 @@ const RuntimeCapabilityTable BXT::capabilityTable{ MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationBXT, // isSimulation PreemptionMode::MidThread, // defaultPreemptionMode - EngineType::ENGINE_RCS, // defaultEngineType + aub_stream::ENGINE_RCS, // defaultEngineType 0, // maxRenderFrequency 12, // clVersionSupport CmdServicesMemTraceVersion::DeviceValues::Bxt, // aubDeviceId diff --git a/runtime/gen9/hw_info_cfl.inl b/runtime/gen9/hw_info_cfl.inl index da8853520d..73cc2fd875 100644 --- a/runtime/gen9/hw_info_cfl.inl +++ b/runtime/gen9/hw_info_cfl.inl @@ -40,7 +40,7 @@ const RuntimeCapabilityTable CFL::capabilityTable{ MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationCFL, // isSimulation PreemptionMode::MidThread, // defaultPreemptionMode - EngineType::ENGINE_RCS, // defaultEngineType + aub_stream::ENGINE_RCS, // defaultEngineType 0, // maxRenderFrequency 21, // clVersionSupport CmdServicesMemTraceVersion::DeviceValues::Cfl, // aubDeviceId diff --git a/runtime/gen9/hw_info_glk.inl b/runtime/gen9/hw_info_glk.inl index e5af336aae..0275d361b0 100644 --- a/runtime/gen9/hw_info_glk.inl +++ b/runtime/gen9/hw_info_glk.inl @@ -40,7 +40,7 @@ const RuntimeCapabilityTable GLK::capabilityTable{ MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationGLK, // isSimulation PreemptionMode::MidThread, // defaultPreemptionMode - EngineType::ENGINE_RCS, // defaultEngineType + aub_stream::ENGINE_RCS, // defaultEngineType 0, // maxRenderFrequency 12, // clVersionSupport CmdServicesMemTraceVersion::DeviceValues::Glk, // aubDeviceId diff --git a/runtime/gen9/hw_info_kbl.inl b/runtime/gen9/hw_info_kbl.inl index f6f95608c9..5c84d0b7be 100644 --- a/runtime/gen9/hw_info_kbl.inl +++ b/runtime/gen9/hw_info_kbl.inl @@ -40,7 +40,7 @@ const RuntimeCapabilityTable KBL::capabilityTable{ MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationKBL, // isSimulation PreemptionMode::MidThread, // defaultPreemptionMode - EngineType::ENGINE_RCS, // defaultEngineType + aub_stream::ENGINE_RCS, // defaultEngineType 0, // maxRenderFrequency 21, // clVersionSupport CmdServicesMemTraceVersion::DeviceValues::Kbl, // aubDeviceId diff --git a/runtime/gen9/hw_info_skl.inl b/runtime/gen9/hw_info_skl.inl index aee82a94cb..bcc165e22e 100644 --- a/runtime/gen9/hw_info_skl.inl +++ b/runtime/gen9/hw_info_skl.inl @@ -48,7 +48,7 @@ const RuntimeCapabilityTable SKL::capabilityTable{ MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationSKL, // isSimulation PreemptionMode::MidThread, // defaultPreemptionMode - EngineType::ENGINE_RCS, // defaultEngineType + aub_stream::ENGINE_RCS, // defaultEngineType 0, // maxRenderFrequency 21, // clVersionSupport CmdServicesMemTraceVersion::DeviceValues::Skl, // aubDeviceId diff --git a/runtime/helpers/completion_stamp.h b/runtime/helpers/completion_stamp.h index 261c968658..ed318ad1f8 100644 --- a/runtime/helpers/completion_stamp.h +++ b/runtime/helpers/completion_stamp.h @@ -6,7 +6,6 @@ */ #pragma once -#include "engine_node.h" #include diff --git a/runtime/helpers/hw_helper.h b/runtime/helpers/hw_helper.h index 471c0f2ba4..0e48110f38 100644 --- a/runtime/helpers/hw_helper.h +++ b/runtime/helpers/hw_helper.h @@ -39,7 +39,7 @@ class HwHelper { virtual uint32_t getConfigureAddressSpaceMode() = 0; virtual bool isLocalMemoryEnabled(const HardwareInfo &hwInfo) const = 0; virtual bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const = 0; - virtual const AubMemDump::LrcaHelper &getCsTraits(EngineType engineType) const = 0; + virtual const AubMemDump::LrcaHelper &getCsTraits(aub_stream::EngineType engineType) const = 0; virtual bool supportsYTiling() const = 0; virtual bool obtainRenderBufferCompressionPreference(const HardwareInfo &hwInfo) const = 0; static bool renderCompressedBuffersSupported(const HardwareInfo &hwInfo); @@ -58,7 +58,7 @@ class HwHelper { uint32_t surfaceType, bool forceNonAuxMode) = 0; virtual size_t getScratchSpaceOffsetFor64bit() = 0; - virtual const std::vector getGpgpuEngineInstances() const = 0; + virtual const std::vector getGpgpuEngineInstances() const = 0; virtual bool getEnableLocalMemory(const HardwareInfo &hwInfo) const = 0; virtual std::string getExtensions() const = 0; @@ -103,7 +103,7 @@ class HwHelperHw : public HwHelper { return sizeof(RENDER_SURFACE_STATE); } - const AubMemDump::LrcaHelper &getCsTraits(EngineType engineType) const override; + const AubMemDump::LrcaHelper &getCsTraits(aub_stream::EngineType engineType) const override; size_t getMaxBarrierRegisterPerSlice() const override; @@ -144,7 +144,7 @@ class HwHelperHw : public HwHelper { size_t getScratchSpaceOffsetFor64bit() override; - const std::vector getGpgpuEngineInstances() const override; + const std::vector getGpgpuEngineInstances() const override; bool getEnableLocalMemory(const HardwareInfo &hwInfo) const override; diff --git a/runtime/helpers/hw_helper_common.inl b/runtime/helpers/hw_helper_common.inl index 972b938e4a..eb3b7722cb 100644 --- a/runtime/helpers/hw_helper_common.inl +++ b/runtime/helpers/hw_helper_common.inl @@ -77,7 +77,7 @@ size_t HwHelperHw::getMaxBarrierRegisterPerSlice() const { } template -const AubMemDump::LrcaHelper &HwHelperHw::getCsTraits(EngineType engineType) const { +const AubMemDump::LrcaHelper &HwHelperHw::getCsTraits(aub_stream::EngineType engineType) const { return *AUBFamilyMapper::csTraits[engineType]; } @@ -168,10 +168,10 @@ size_t HwHelperHw::getScratchSpaceOffsetFor64bit() { } template -const std::vector HwHelperHw::getGpgpuEngineInstances() const { - constexpr std::array gpgpuEngineInstances = {{ENGINE_RCS, - ENGINE_RCS}}; // low priority - return std::vector(gpgpuEngineInstances.begin(), gpgpuEngineInstances.end()); +const std::vector HwHelperHw::getGpgpuEngineInstances() const { + constexpr std::array gpgpuEngineInstances = {{aub_stream::ENGINE_RCS, + aub_stream::ENGINE_RCS}}; // low priority + return std::vector(gpgpuEngineInstances.begin(), gpgpuEngineInstances.end()); } template diff --git a/runtime/helpers/hw_info.cpp b/runtime/helpers/hw_info.cpp index b197edda68..d47647b13f 100644 --- a/runtime/helpers/hw_info.cpp +++ b/runtime/helpers/hw_info.cpp @@ -46,9 +46,9 @@ bool getHwInfoForPlatformString(const char *str, const HardwareInfo *&hwInfoIn) return ret; } -EngineType getChosenEngineType(const HardwareInfo &hwInfo) { +aub_stream::EngineType getChosenEngineType(const HardwareInfo &hwInfo) { return DebugManager.flags.NodeOrdinal.get() == -1 ? hwInfo.capabilityTable.defaultEngineType - : static_cast(DebugManager.flags.NodeOrdinal.get()); + : static_cast(DebugManager.flags.NodeOrdinal.get()); } } // namespace NEO diff --git a/runtime/helpers/hw_info.h b/runtime/helpers/hw_info.h index 0e7b8b8c66..b70d128200 100644 --- a/runtime/helpers/hw_info.h +++ b/runtime/helpers/hw_info.h @@ -32,7 +32,7 @@ struct RuntimeCapabilityTable { size_t requiredPreemptionSurfaceSize; bool (*isSimulation)(unsigned short); PreemptionMode defaultPreemptionMode; - EngineType defaultEngineType; + aub_stream::EngineType defaultEngineType; uint32_t maxRenderFrequency; unsigned int clVersionSupport; uint32_t aubDeviceId; @@ -101,5 +101,5 @@ struct EnableGfxFamilyHw { const char *getPlatformType(const HardwareInfo &hwInfo); bool getHwInfoForPlatformString(const char *str, const HardwareInfo *&hwInfoIn); -EngineType getChosenEngineType(const HardwareInfo &hwInfo); +aub_stream::EngineType getChosenEngineType(const HardwareInfo &hwInfo); } // namespace NEO diff --git a/runtime/memory_manager/memory_manager.cpp b/runtime/memory_manager/memory_manager.cpp index ca9dc0b205..40650fdc2b 100644 --- a/runtime/memory_manager/memory_manager.cpp +++ b/runtime/memory_manager/memory_manager.cpp @@ -199,7 +199,7 @@ bool MemoryManager::isMemoryBudgetExhausted() const { return false; } -OsContext *MemoryManager::createAndRegisterOsContext(CommandStreamReceiver *commandStreamReceiver, EngineType engineType, +OsContext *MemoryManager::createAndRegisterOsContext(CommandStreamReceiver *commandStreamReceiver, aub_stream::EngineType engineType, DeviceBitfield deviceBitfield, PreemptionMode preemptionMode, bool lowPriority) { auto contextId = ++latestContextId; auto osContext = OsContext::create(executionEnvironment.osInterface.get(), contextId, deviceBitfield, engineType, preemptionMode, lowPriority); diff --git a/runtime/memory_manager/memory_manager.h b/runtime/memory_manager/memory_manager.h index edc114a644..c1ea968f9c 100644 --- a/runtime/memory_manager/memory_manager.h +++ b/runtime/memory_manager/memory_manager.h @@ -175,7 +175,7 @@ class MemoryManager { ::alignedFree(ptr); } - OsContext *createAndRegisterOsContext(CommandStreamReceiver *commandStreamReceiver, EngineType engineType, + OsContext *createAndRegisterOsContext(CommandStreamReceiver *commandStreamReceiver, aub_stream::EngineType engineType, DeviceBitfield deviceBitfield, PreemptionMode preemptionMode, bool lowPriority); uint32_t getRegisteredEnginesCount() const { return static_cast(registeredEngines.size()); } CommandStreamReceiver *getDefaultCommandStreamReceiver(uint32_t deviceId) const; diff --git a/runtime/os_interface/linux/drm_engine_mapper.cpp b/runtime/os_interface/linux/drm_engine_mapper.cpp index bf36b08e25..d9c768e5ba 100644 --- a/runtime/os_interface/linux/drm_engine_mapper.cpp +++ b/runtime/os_interface/linux/drm_engine_mapper.cpp @@ -12,8 +12,8 @@ namespace NEO { -unsigned int DrmEngineMapper::engineNodeMap(EngineType engineType) { - if (EngineType::ENGINE_RCS == engineType) { +unsigned int DrmEngineMapper::engineNodeMap(aub_stream::EngineType engineType) { + if (aub_stream::ENGINE_RCS == engineType) { return I915_EXEC_RENDER; } UNRECOVERABLE_IF(true); diff --git a/runtime/os_interface/linux/drm_engine_mapper.h b/runtime/os_interface/linux/drm_engine_mapper.h index 3cc23e74fb..e17a498bbc 100644 --- a/runtime/os_interface/linux/drm_engine_mapper.h +++ b/runtime/os_interface/linux/drm_engine_mapper.h @@ -13,7 +13,7 @@ namespace NEO { class DrmEngineMapper { public: - static unsigned int engineNodeMap(EngineType engineType); + static unsigned int engineNodeMap(aub_stream::EngineType engineType); }; } // namespace NEO diff --git a/runtime/os_interface/linux/hw_info_config.cpp b/runtime/os_interface/linux/hw_info_config.cpp index 17e6910098..3c26541937 100644 --- a/runtime/os_interface/linux/hw_info_config.cpp +++ b/runtime/os_interface/linux/hw_info_config.cpp @@ -153,9 +153,7 @@ int HwInfoConfig::configureHwInfo(const HardwareInfo *inHwInfo, HardwareInfo *ou outHwInfo->capabilityTable.ftrSupportsCoherency = false; hwHelper.adjustDefaultEngineType(outHwInfo); - outHwInfo->capabilityTable.defaultEngineType = DebugManager.flags.NodeOrdinal.get() == -1 - ? outHwInfo->capabilityTable.defaultEngineType - : static_cast(DebugManager.flags.NodeOrdinal.get()); + outHwInfo->capabilityTable.defaultEngineType = getChosenEngineType(*outHwInfo); outHwInfo->capabilityTable.instrumentationEnabled = false; outHwInfo->capabilityTable.ftrRenderCompressedBuffers = false; diff --git a/runtime/os_interface/linux/os_context_linux.cpp b/runtime/os_interface/linux/os_context_linux.cpp index 9b56289151..6107e643f9 100644 --- a/runtime/os_interface/linux/os_context_linux.cpp +++ b/runtime/os_interface/linux/os_context_linux.cpp @@ -15,7 +15,7 @@ namespace NEO { OsContext *OsContext::create(OSInterface *osInterface, uint32_t contextId, DeviceBitfield deviceBitfield, - EngineType engineType, PreemptionMode preemptionMode, bool lowPriority) { + aub_stream::EngineType engineType, PreemptionMode preemptionMode, bool lowPriority) { if (osInterface) { return new OsContextLinux(*osInterface->get()->getDrm(), contextId, deviceBitfield, engineType, preemptionMode, lowPriority); } @@ -23,7 +23,7 @@ OsContext *OsContext::create(OSInterface *osInterface, uint32_t contextId, Devic } OsContextLinux::OsContextLinux(Drm &drm, uint32_t contextId, DeviceBitfield deviceBitfield, - EngineType engineType, PreemptionMode preemptionMode, bool lowPriority) + aub_stream::EngineType engineType, PreemptionMode preemptionMode, bool lowPriority) : OsContext(contextId, deviceBitfield, engineType, preemptionMode, lowPriority), drm(drm) { engineFlag = DrmEngineMapper::engineNodeMap(engineType); diff --git a/runtime/os_interface/linux/os_context_linux.h b/runtime/os_interface/linux/os_context_linux.h index 1cbbbb0522..62bf2b68f6 100644 --- a/runtime/os_interface/linux/os_context_linux.h +++ b/runtime/os_interface/linux/os_context_linux.h @@ -15,7 +15,7 @@ class OsContextLinux : public OsContext { OsContextLinux() = delete; ~OsContextLinux() override; OsContextLinux(Drm &drm, uint32_t contextId, DeviceBitfield deviceBitfield, - EngineType engineType, PreemptionMode preemptionMode, bool lowPriority); + aub_stream::EngineType engineType, PreemptionMode preemptionMode, bool lowPriority); unsigned int getEngineFlag() const { return engineFlag; } uint32_t getDrmContextId() const { return drmContextId; } diff --git a/runtime/os_interface/os_context.h b/runtime/os_interface/os_context.h index ec486188ab..fd5d164a6e 100644 --- a/runtime/os_interface/os_context.h +++ b/runtime/os_interface/os_context.h @@ -22,16 +22,16 @@ class OsContext : public ReferenceTrackedObject { OsContext() = delete; static OsContext *create(OSInterface *osInterface, uint32_t contextId, DeviceBitfield deviceBitfield, - EngineType engineType, PreemptionMode preemptionMode, bool lowPriority); + aub_stream::EngineType engineType, PreemptionMode preemptionMode, bool lowPriority); uint32_t getContextId() const { return contextId; } uint32_t getNumSupportedDevices() const { return numSupportedDevices; } DeviceBitfield getDeviceBitfield() const { return deviceBitfield; } PreemptionMode getPreemptionMode() const { return preemptionMode; } - EngineType &getEngineType() { return engineType; } + aub_stream::EngineType &getEngineType() { return engineType; } bool isLowPriority() const { return lowPriority; } protected: - OsContext(uint32_t contextId, DeviceBitfield deviceBitfield, EngineType engineType, PreemptionMode preemptionMode, bool lowPriority) + OsContext(uint32_t contextId, DeviceBitfield deviceBitfield, aub_stream::EngineType engineType, PreemptionMode preemptionMode, bool lowPriority) : contextId(contextId), deviceBitfield(deviceBitfield), preemptionMode(preemptionMode), @@ -43,7 +43,7 @@ class OsContext : public ReferenceTrackedObject { const DeviceBitfield deviceBitfield; const PreemptionMode preemptionMode; const uint32_t numSupportedDevices; - EngineType engineType = EngineType::ENGINE_RCS; + aub_stream::EngineType engineType = aub_stream::ENGINE_RCS; const bool lowPriority; }; } // namespace NEO diff --git a/runtime/os_interface/windows/hw_info_config.cpp b/runtime/os_interface/windows/hw_info_config.cpp index b9b57512f1..5eee956aa9 100644 --- a/runtime/os_interface/windows/hw_info_config.cpp +++ b/runtime/os_interface/windows/hw_info_config.cpp @@ -26,10 +26,7 @@ int HwInfoConfig::configureHwInfo(const HardwareInfo *inHwInfo, HardwareInfo *ou outHwInfo->capabilityTable.ftrSvm = outHwInfo->pSkuTable->ftrSVM; hwHelper.adjustDefaultEngineType(outHwInfo); - const auto nodeOrdinal = DebugManager.flags.NodeOrdinal.get(); - outHwInfo->capabilityTable.defaultEngineType = nodeOrdinal == -1 - ? outHwInfo->capabilityTable.defaultEngineType - : static_cast(nodeOrdinal); + outHwInfo->capabilityTable.defaultEngineType = getChosenEngineType(*outHwInfo); hwHelper.setCapabilityCoherencyFlag(outHwInfo, outHwInfo->capabilityTable.ftrSupportsCoherency); diff --git a/runtime/os_interface/windows/os_context_win.cpp b/runtime/os_interface/windows/os_context_win.cpp index 60c69d401f..3f56820599 100644 --- a/runtime/os_interface/windows/os_context_win.cpp +++ b/runtime/os_interface/windows/os_context_win.cpp @@ -14,7 +14,7 @@ namespace NEO { OsContext *OsContext::create(OSInterface *osInterface, uint32_t contextId, DeviceBitfield deviceBitfield, - EngineType engineType, PreemptionMode preemptionMode, bool lowPriority) { + aub_stream::EngineType engineType, PreemptionMode preemptionMode, bool lowPriority) { if (osInterface) { return new OsContextWin(*osInterface->get()->getWddm(), contextId, deviceBitfield, engineType, preemptionMode, lowPriority); } @@ -22,7 +22,7 @@ OsContext *OsContext::create(OSInterface *osInterface, uint32_t contextId, Devic } OsContextWin::OsContextWin(Wddm &wddm, uint32_t contextId, DeviceBitfield deviceBitfield, - EngineType engineType, PreemptionMode preemptionMode, bool lowPriority) + aub_stream::EngineType engineType, PreemptionMode preemptionMode, bool lowPriority) : OsContext(contextId, deviceBitfield, engineType, preemptionMode, lowPriority), wddm(wddm), residencyController(wddm, contextId) { UNRECOVERABLE_IF(!wddm.isInitialized()); diff --git a/runtime/os_interface/windows/os_context_win.h b/runtime/os_interface/windows/os_context_win.h index a84368772b..fa8f731194 100644 --- a/runtime/os_interface/windows/os_context_win.h +++ b/runtime/os_interface/windows/os_context_win.h @@ -18,7 +18,7 @@ class OsContextWin : public OsContext { ~OsContextWin() override; OsContextWin(Wddm &wddm, uint32_t contextId, DeviceBitfield deviceBitfield, - EngineType engineType, PreemptionMode preemptionMode, bool lowPriority); + aub_stream::EngineType engineType, PreemptionMode preemptionMode, bool lowPriority); D3DKMT_HANDLE getWddmContextHandle() const { return wddmContextHandle; } void setWddmContextHandle(D3DKMT_HANDLE wddmContextHandle) { this->wddmContextHandle = wddmContextHandle; } diff --git a/runtime/os_interface/windows/wddm_engine_mapper.cpp b/runtime/os_interface/windows/wddm_engine_mapper.cpp index 2cd0553136..470d13010f 100644 --- a/runtime/os_interface/windows/wddm_engine_mapper.cpp +++ b/runtime/os_interface/windows/wddm_engine_mapper.cpp @@ -11,8 +11,8 @@ namespace NEO { -GPUNODE_ORDINAL WddmEngineMapper::engineNodeMap(EngineType engineType) { - if (EngineType::ENGINE_RCS == engineType) { +GPUNODE_ORDINAL WddmEngineMapper::engineNodeMap(aub_stream::EngineType engineType) { + if (aub_stream::ENGINE_RCS == engineType) { return GPUNODE_3D; } UNRECOVERABLE_IF(true); diff --git a/runtime/os_interface/windows/wddm_engine_mapper.h b/runtime/os_interface/windows/wddm_engine_mapper.h index 5b037bd955..7059e0a92a 100644 --- a/runtime/os_interface/windows/wddm_engine_mapper.h +++ b/runtime/os_interface/windows/wddm_engine_mapper.h @@ -15,7 +15,7 @@ namespace NEO { class WddmEngineMapper { public: - static GPUNODE_ORDINAL engineNodeMap(EngineType engineType); + static GPUNODE_ORDINAL engineNodeMap(aub_stream::EngineType engineType); }; } // namespace NEO diff --git a/runtime/scheduler/scheduler_binary.cmake b/runtime/scheduler/scheduler_binary.cmake index eba6e83c06..1b12592b00 100644 --- a/runtime/scheduler/scheduler_binary.cmake +++ b/runtime/scheduler/scheduler_binary.cmake @@ -1,5 +1,5 @@ # -# Copyright (C) 2018 Intel Corporation +# Copyright (C) 2018-2019 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -89,6 +89,7 @@ set_target_properties(${SCHEDULER_BINARY_LIB_NAME} PROPERTIES FOLDER "scheduler" add_dependencies(${SCHEDULER_BINARY_LIB_NAME} scheduler) target_include_directories(${SCHEDULER_BINARY_LIB_NAME} PRIVATE + ${ENGINE_NODE_DIR} ${KHRONOS_HEADERS_DIR} ${UMKM_SHAREDDATA_INCLUDE_PATHS} ${IGDRCL__IGC_INCLUDE_DIR} diff --git a/runtime/command_stream/definitions/engine_node.h b/third_party/aub_stream/headers/engine_node.h similarity index 83% rename from runtime/command_stream/definitions/engine_node.h rename to third_party/aub_stream/headers/engine_node.h index 1382819e7d..c1859e4fb3 100644 --- a/runtime/command_stream/definitions/engine_node.h +++ b/third_party/aub_stream/headers/engine_node.h @@ -8,7 +8,7 @@ #pragma once #include -namespace NEO { +namespace aub_stream { enum EngineType : uint32_t { ENGINE_RCS = 0, @@ -18,4 +18,4 @@ enum EngineType : uint32_t { NUM_ENGINES }; -} // namespace NEO +} // namespace aub_stream diff --git a/unit_tests/CMakeLists.txt b/unit_tests/CMakeLists.txt index 393267ec9d..9ad3df81a1 100644 --- a/unit_tests/CMakeLists.txt +++ b/unit_tests/CMakeLists.txt @@ -136,6 +136,7 @@ endif() target_include_directories(igdrcl_tests PRIVATE ${IGDRCL_SOURCE_DIR}/unit_tests/mocks${BRANCH_DIR_SUFFIX} + ${ENGINE_NODE_DIR} ${KHRONOS_GL_HEADERS_DIR} ) diff --git a/unit_tests/api/cl_create_command_queue_with_properties_tests.cpp b/unit_tests/api/cl_create_command_queue_with_properties_tests.cpp index bcb5a8dd57..fc15bb712c 100644 --- a/unit_tests/api/cl_create_command_queue_with_properties_tests.cpp +++ b/unit_tests/api/cl_create_command_queue_with_properties_tests.cpp @@ -361,7 +361,7 @@ TEST_F(clCreateCommandQueueWithPropertiesApi, GivenLowPriorityWhenCreatingComman auto commandQueueObj = castToObject(cmdQ); auto &osContext = commandQueueObj->getCommandStreamReceiver().getOsContext(); - EXPECT_EQ(EngineType::ENGINE_RCS, osContext.getEngineType()); + EXPECT_EQ(aub_stream::ENGINE_RCS, osContext.getEngineType()); EXPECT_TRUE(osContext.isLowPriority()); clReleaseCommandQueue(cmdQ); diff --git a/unit_tests/aub/aub_helper_tests.inl b/unit_tests/aub/aub_helper_tests.inl index 6178587f3f..98e24f37a1 100644 --- a/unit_tests/aub/aub_helper_tests.inl +++ b/unit_tests/aub/aub_helper_tests.inl @@ -126,7 +126,7 @@ HWTEST_F(AubHelperHwTest, GivenEnabledLocalMemoryWhenGetMemTraceForPtEntryIsCall } HWTEST_F(AubHelperHwTest, giverLrcaHelperWhenContextIsInitializedThenContextFlagsAreSet) { - const auto &csTraits = CommandStreamReceiverSimulatedCommonHw::getCsTraits(EngineType::ENGINE_RCS); + const auto &csTraits = CommandStreamReceiverSimulatedCommonHw::getCsTraits(aub_stream::ENGINE_RCS); MockLrcaHelper lrcaHelper(csTraits.mmioBase); std::unique_ptr> lrcaBase(alignedMalloc(csTraits.sizeLRCA, csTraits.alignLRCA), alignedFree); diff --git a/unit_tests/aub_tests/command_stream/aub_command_stream_tests.cpp b/unit_tests/aub_tests/command_stream/aub_command_stream_tests.cpp index 9009e97f40..a1b827ca5d 100644 --- a/unit_tests/aub_tests/command_stream/aub_command_stream_tests.cpp +++ b/unit_tests/aub_tests/command_stream/aub_command_stream_tests.cpp @@ -40,7 +40,7 @@ struct AUBFixture : public AUBCommandStreamFixture, } template - void testNoopIdXcs(EngineType engineType) { + void testNoopIdXcs(aub_stream::EngineType engineType) { pCommandStreamReceiver->getOsContext().getEngineType() = engineType; typedef typename FamilyType::MI_NOOP MI_NOOP; @@ -84,19 +84,19 @@ HWTEST_F(AUBcommandstreamTests, testFlushTwice) { } HWTEST_F(AUBcommandstreamTests, testNoopIdRcs) { - testNoopIdXcs(EngineType::ENGINE_RCS); + testNoopIdXcs(aub_stream::ENGINE_RCS); } HWTEST_F(AUBcommandstreamTests, testNoopIdBcs) { - testNoopIdXcs(EngineType::ENGINE_BCS); + testNoopIdXcs(aub_stream::ENGINE_BCS); } HWTEST_F(AUBcommandstreamTests, testNoopIdVcs) { - testNoopIdXcs(EngineType::ENGINE_VCS); + testNoopIdXcs(aub_stream::ENGINE_VCS); } HWTEST_F(AUBcommandstreamTests, testNoopIdVecs) { - testNoopIdXcs(EngineType::ENGINE_VECS); + testNoopIdXcs(aub_stream::ENGINE_VECS); } TEST_F(AUBcommandstreamTests, makeResident) { diff --git a/unit_tests/aub_tests/command_stream/aub_mem_dump_tests.cpp b/unit_tests/aub_tests/command_stream/aub_mem_dump_tests.cpp index c346b490ce..ef7d1c068d 100644 --- a/unit_tests/aub_tests/command_stream/aub_mem_dump_tests.cpp +++ b/unit_tests/aub_tests/command_stream/aub_mem_dump_tests.cpp @@ -17,7 +17,6 @@ using NEO::AUBCommandStreamReceiver; using NEO::AUBCommandStreamReceiverHw; using NEO::AUBFamilyMapper; using NEO::DeviceFixture; -using NEO::EngineType; using NEO::folderAUB; std::string getAubFileName(const NEO::Device *pDevice, const std::string baseName) { @@ -189,19 +188,19 @@ HWTEST_F(AubMemDumpTests, writeVerifySevenBytesGGTT) { } HWTEST_F(AubMemDumpTests, simpleRCS) { - setupAUB(pDevice, EngineType::ENGINE_RCS); + setupAUB(pDevice, aub_stream::ENGINE_RCS); } HWTEST_F(AubMemDumpTests, simpleBCS) { - setupAUB(pDevice, EngineType::ENGINE_BCS); + setupAUB(pDevice, aub_stream::ENGINE_BCS); } HWTEST_F(AubMemDumpTests, simpleVCS) { - setupAUB(pDevice, EngineType::ENGINE_VCS); + setupAUB(pDevice, aub_stream::ENGINE_VCS); } HWTEST_F(AubMemDumpTests, simpleVECS) { - setupAUB(pDevice, EngineType::ENGINE_VECS); + setupAUB(pDevice, aub_stream::ENGINE_VECS); } TEST(AubMemDumpBasic, givenDebugOverrideMmioWhenMmioNotMatchThenDoNotAlterValue) { diff --git a/unit_tests/aub_tests/command_stream/aub_mem_dump_tests.h b/unit_tests/aub_tests/command_stream/aub_mem_dump_tests.h index b51d1a58d0..67471c1f6b 100644 --- a/unit_tests/aub_tests/command_stream/aub_mem_dump_tests.h +++ b/unit_tests/aub_tests/command_stream/aub_mem_dump_tests.h @@ -23,7 +23,7 @@ extern const char *fileSeparator; extern std::string getAubFileName(const NEO::Device *pDevice, const std::string baseName); template -void setupAUB(const NEO::Device *pDevice, NEO::EngineType engineType) { +void setupAUB(const NEO::Device *pDevice, aub_stream::EngineType engineType) { typedef typename NEO::AUBFamilyMapper::AUB AUB; const auto &csTraits = NEO::CommandStreamReceiverSimulatedCommonHw::getCsTraits(engineType); auto mmioBase = csTraits.mmioBase; diff --git a/unit_tests/aub_tests/fixtures/aub_fixture.h b/unit_tests/aub_tests/fixtures/aub_fixture.h index fc178b27f5..35e887cb23 100644 --- a/unit_tests/aub_tests/fixtures/aub_fixture.h +++ b/unit_tests/aub_tests/fixtures/aub_fixture.h @@ -29,7 +29,7 @@ class AUBFixture : public CommandQueueHwFixture { uint32_t deviceIndex = 0; auto &hwHelper = HwHelper::get(hwInfo.pPlatform->eRenderCoreFamily); - EngineType engineType = getChosenEngineType(hwInfo); + auto engineType = getChosenEngineType(hwInfo); const ::testing::TestInfo *const testInfo = ::testing::UnitTest::GetInstance()->current_test_info(); std::stringstream strfilename; diff --git a/unit_tests/aub_tests/gen10/batch_buffer/aub_batch_buffer_tests_gen10.cpp b/unit_tests/aub_tests/gen10/batch_buffer/aub_batch_buffer_tests_gen10.cpp index 5667458cbd..22c49ddc93 100644 --- a/unit_tests/aub_tests/gen10/batch_buffer/aub_batch_buffer_tests_gen10.cpp +++ b/unit_tests/aub_tests/gen10/batch_buffer/aub_batch_buffer_tests_gen10.cpp @@ -14,5 +14,5 @@ using Gen10AubBatchBufferTests = Test; static constexpr auto gpuBatchBufferAddr = 0x800400001000; // 48-bit GPU address GEN10TEST_F(Gen10AubBatchBufferTests, givenSimpleRCSWithBatchBufferWhenItHasMSBSetInGpuAddressThenAUBShouldBeSetupSuccessfully) { - setupAUBWithBatchBuffer(pDevice, NEO::EngineType::ENGINE_RCS, gpuBatchBufferAddr); + setupAUBWithBatchBuffer(pDevice, aub_stream::ENGINE_RCS, gpuBatchBufferAddr); } diff --git a/unit_tests/aub_tests/gen10/batch_buffer/aub_batch_buffer_tests_gen10.h b/unit_tests/aub_tests/gen10/batch_buffer/aub_batch_buffer_tests_gen10.h index 6fb16f9a0e..40d3caa82f 100644 --- a/unit_tests/aub_tests/gen10/batch_buffer/aub_batch_buffer_tests_gen10.h +++ b/unit_tests/aub_tests/gen10/batch_buffer/aub_batch_buffer_tests_gen10.h @@ -10,7 +10,7 @@ #include "unit_tests/aub_tests/command_stream/aub_mem_dump_tests.h" template -void setupAUBWithBatchBuffer(const NEO::Device *pDevice, NEO::EngineType engineType, uint64_t gpuBatchBufferAddr) { +void setupAUBWithBatchBuffer(const NEO::Device *pDevice, aub_stream::EngineType engineType, uint64_t gpuBatchBufferAddr) { typedef typename NEO::AUBFamilyMapper::AUB AUB; const auto &csTraits = NEO::AUBCommandStreamReceiverHw::getCsTraits(engineType); auto mmioBase = csTraits.mmioBase; diff --git a/unit_tests/aub_tests/gen9/batch_buffer/aub_batch_buffer_tests.cpp b/unit_tests/aub_tests/gen9/batch_buffer/aub_batch_buffer_tests.cpp index 2dc62432a6..93ae3c93d8 100644 --- a/unit_tests/aub_tests/gen9/batch_buffer/aub_batch_buffer_tests.cpp +++ b/unit_tests/aub_tests/gen9/batch_buffer/aub_batch_buffer_tests.cpp @@ -14,5 +14,5 @@ using AubBatchBufferTests = Test; static constexpr auto gpuBatchBufferAddr = 0x800400001000ull; // 48-bit GPU address GEN9TEST_F(AubBatchBufferTests, givenSimpleRCSWithBatchBufferWhenItHasMSBSetInGpuAddressThenAUBShouldBeSetupSuccessfully) { - setupAUBWithBatchBuffer(pDevice, NEO::EngineType::ENGINE_RCS, gpuBatchBufferAddr); + setupAUBWithBatchBuffer(pDevice, aub_stream::ENGINE_RCS, gpuBatchBufferAddr); } diff --git a/unit_tests/aub_tests/gen9/batch_buffer/aub_batch_buffer_tests.h b/unit_tests/aub_tests/gen9/batch_buffer/aub_batch_buffer_tests.h index 67fac8e4b2..2557651844 100644 --- a/unit_tests/aub_tests/gen9/batch_buffer/aub_batch_buffer_tests.h +++ b/unit_tests/aub_tests/gen9/batch_buffer/aub_batch_buffer_tests.h @@ -10,7 +10,7 @@ #include "unit_tests/aub_tests/command_stream/aub_mem_dump_tests.h" template -void setupAUBWithBatchBuffer(const NEO::Device *pDevice, NEO::EngineType engineType, uint64_t gpuBatchBufferAddr) { +void setupAUBWithBatchBuffer(const NEO::Device *pDevice, aub_stream::EngineType engineType, uint64_t gpuBatchBufferAddr) { typedef typename NEO::AUBFamilyMapper::AUB AUB; const auto &csTraits = NEO::CommandStreamReceiverSimulatedCommonHw::getCsTraits(engineType); auto mmioBase = csTraits.mmioBase; diff --git a/unit_tests/command_stream/aub_command_stream_receiver_1_tests.cpp b/unit_tests/command_stream/aub_command_stream_receiver_1_tests.cpp index e175487fb0..30f7e3b06a 100644 --- a/unit_tests/command_stream/aub_command_stream_receiver_1_tests.cpp +++ b/unit_tests/command_stream/aub_command_stream_receiver_1_tests.cpp @@ -168,7 +168,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWithAubMana HWTEST_F(AubCommandStreamReceiverTests, givenAubCsrWhenOsContextIsSetThenCreateHardwareContext) { uint32_t deviceIndex = 3; - MockOsContext osContext(0, 8, EngineType::ENGINE_BCS, PreemptionMode::Disabled, false); + MockOsContext osContext(0, 8, aub_stream::ENGINE_BCS, PreemptionMode::Disabled, false); std::string fileName = "file_name.aub"; MockAubManager *mockManager = new MockAubManager(); MockAubCenter *mockAubCenter = new MockAubCenter(platformDevices[0], false, fileName, CommandStreamReceiverType::CSR_AUB); @@ -186,7 +186,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCsrWhenOsContextIsSetThenCreateH } HWTEST_F(AubCommandStreamReceiverTests, givenAubCsrWhenLowPriorityOsContextIsSetThenDontCreateHardwareContext) { - MockOsContext osContext(0, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, true); + MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, true); std::string fileName = "file_name.aub"; MockAubManager *mockManager = new MockAubManager(); MockAubCenter *mockAubCenter = new MockAubCenter(platformDevices[0], false, fileName, CommandStreamReceiverType::CSR_AUB); @@ -777,7 +777,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenOsContextWithMultipleDevicesSupport DeviceBitfield deviceBitfield; deviceBitfield.set(0); deviceBitfield.set(1); - MockOsContext osContext(1, deviceBitfield, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(1, deviceBitfield, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); auto aubCsr = std::make_unique>("", true, *pDevice->executionEnvironment); aubCsr->setupContext(osContext); @@ -1088,7 +1088,7 @@ TEST_F(HardwareContextContainerTests, givenOsContextWithMultipleDevicesSupported DeviceBitfield deviceBitfield; deviceBitfield.set(0); deviceBitfield.set(1); - MockOsContext osContext(1, deviceBitfield, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(1, deviceBitfield, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); HardwareContextController hwContextControler(aubManager, osContext, 0); EXPECT_EQ(2u, hwContextControler.hardwareContexts.size()); @@ -1104,7 +1104,7 @@ TEST_F(HardwareContextContainerTests, givenMultipleHwContextWhenSingleMethodIsCa DeviceBitfield deviceBitfield; deviceBitfield.set(0); deviceBitfield.set(1); - MockOsContext osContext(1, deviceBitfield, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(1, deviceBitfield, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); HardwareContextController hwContextContainer(aubManager, osContext, 0); EXPECT_EQ(2u, hwContextContainer.hardwareContexts.size()); @@ -1145,7 +1145,7 @@ TEST_F(HardwareContextContainerTests, givenMultipleHwContextWhenSingleMethodIsCa DeviceBitfield deviceBitfield; deviceBitfield.set(0); deviceBitfield.set(1); - MockOsContext osContext(1, deviceBitfield, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(1, deviceBitfield, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); HardwareContextController hwContextContainer(aubManager, osContext, 0); EXPECT_EQ(2u, hwContextContainer.hardwareContexts.size()); diff --git a/unit_tests/command_stream/aub_command_stream_receiver_2_tests.cpp b/unit_tests/command_stream/aub_command_stream_receiver_2_tests.cpp index 6492dda3e3..f79fa6aff5 100644 --- a/unit_tests/command_stream/aub_command_stream_receiver_2_tests.cpp +++ b/unit_tests/command_stream/aub_command_stream_receiver_2_tests.cpp @@ -889,7 +889,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationWritableWhenDumpA pDevice->executionEnvironment->aubCenter.reset(mockAubCenter); MockAubCsr aubCsr("", true, *pDevice->executionEnvironment); - MockOsContext osContext(0, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); aubCsr.setupContext(osContext); auto mockHardwareContext = static_cast(aubCsr.hardwareContextController->hardwareContexts[0].get()); @@ -914,7 +914,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationWritableWhenDumpA pDevice->executionEnvironment->aubCenter.reset(mockAubCenter); MockAubCsr aubCsr("", true, *pDevice->executionEnvironment); - MockOsContext osContext(0, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); aubCsr.setupContext(osContext); auto mockHardwareContext = static_cast(aubCsr.hardwareContextController->hardwareContexts[0].get()); @@ -941,7 +941,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationNonWritableWhenDu pDevice->executionEnvironment->aubCenter.reset(mockAubCenter); MockAubCsr aubCsr("", true, *pDevice->executionEnvironment); - MockOsContext osContext(0, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); aubCsr.setupContext(osContext); auto mockHardwareContext = static_cast(aubCsr.hardwareContextController->hardwareContexts[0].get()); @@ -969,7 +969,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationNotDumpableWhenDu pDevice->executionEnvironment->aubCenter.reset(mockAubCenter); MockAubCsr aubCsr("", true, *pDevice->executionEnvironment); - MockOsContext osContext(0, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); aubCsr.setupContext(osContext); auto mockHardwareContext = static_cast(aubCsr.hardwareContextController->hardwareContexts[0].get()); @@ -998,7 +998,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationDumpableWhenDumpA pDevice->executionEnvironment->aubCenter.reset(mockAubCenter); MockAubCsr aubCsr("", true, *pDevice->executionEnvironment); - MockOsContext osContext(0, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); aubCsr.setupContext(osContext); auto mockHardwareContext = static_cast(aubCsr.hardwareContextController->hardwareContexts[0].get()); @@ -1026,7 +1026,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationWritableWhenDumpA pDevice->executionEnvironment->aubCenter.reset(mockAubCenter); MockAubCsr aubCsr("", true, *pDevice->executionEnvironment); - MockOsContext osContext(0, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); aubCsr.setupContext(osContext); aubCsr.latestSentTaskCount = 1; diff --git a/unit_tests/command_stream/aub_file_stream_tests.cpp b/unit_tests/command_stream/aub_file_stream_tests.cpp index 4f930ff16c..cb438e6a8b 100644 --- a/unit_tests/command_stream/aub_file_stream_tests.cpp +++ b/unit_tests/command_stream/aub_file_stream_tests.cpp @@ -262,7 +262,7 @@ HWTEST_F(AubFileStreamTests, givenNewTasksAndHardwareContextPresentWhenCallingPo pDevice->executionEnvironment->aubCenter.reset(mockAubCenter); MockAubCsr aubCsr("", true, *pDevice->executionEnvironment); - MockOsContext osContext(0, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); aubCsr.setupContext(osContext); auto hardwareContext = static_cast(aubCsr.hardwareContextController->hardwareContexts[0].get()); aubCsr.stream = aubStream.get(); @@ -282,7 +282,7 @@ HWTEST_F(AubFileStreamTests, givenNoNewTasksAndHardwareContextPresentWhenCalling pDevice->executionEnvironment->aubCenter.reset(mockAubCenter); MockAubCsr aubCsr("", true, *pDevice->executionEnvironment); - MockOsContext osContext(0, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); aubCsr.setupContext(osContext); auto hardwareContext = static_cast(aubCsr.hardwareContextController->hardwareContexts[0].get()); aubCsr.stream = aubStream.get(); @@ -365,7 +365,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenFlushIsCalledThenI pDevice->executionEnvironment->aubCenter.reset(mockAubCenter); MockAubCsr aubCsr("", true, *pDevice->executionEnvironment); - MockOsContext osContext(0, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); aubCsr.setupContext(osContext); auto mockHardwareContext = static_cast(aubCsr.hardwareContextController->hardwareContexts[0].get()); aubCsr.stream = aubStream.get(); @@ -394,7 +394,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenFlushIsCalledWithZ pDevice->executionEnvironment->aubCenter.reset(mockAubCenter); MockAubCsr aubCsr("", true, *pDevice->executionEnvironment); - MockOsContext osContext(0, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); aubCsr.setupContext(osContext); auto mockHardwareContext = static_cast(aubCsr.hardwareContextController->hardwareContexts[0].get()); aubCsr.stream = aubStream.get(); @@ -418,7 +418,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenMakeResidentIsCall pDevice->executionEnvironment->aubCenter.reset(mockAubCenter); MockAubCsr aubCsr("", true, *pDevice->executionEnvironment); - MockOsContext osContext(0, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); aubCsr.setupContext(osContext); MockGraphicsAllocation allocation(reinterpret_cast(0x1000), 0x1000); @@ -434,7 +434,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenExpectMemoryEqualI pDevice->executionEnvironment->aubCenter.reset(mockAubCenter); MockAubCsr aubCsr("", true, *pDevice->executionEnvironment); - MockOsContext osContext(0, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); aubCsr.setupContext(osContext); auto mockHardwareContext = static_cast(aubCsr.hardwareContextController->hardwareContexts[0].get()); @@ -450,7 +450,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenExpectMemoryNotEqu pDevice->executionEnvironment->aubCenter.reset(mockAubCenter); MockAubCsr aubCsr("", true, *pDevice->executionEnvironment); - MockOsContext osContext(0, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); aubCsr.setupContext(osContext); auto mockHardwareContext = static_cast(aubCsr.hardwareContextController->hardwareContexts[0].get()); diff --git a/unit_tests/command_stream/command_stream_receiver_with_aub_dump_tests.cpp b/unit_tests/command_stream/command_stream_receiver_with_aub_dump_tests.cpp index 3fd9967f2c..230a7c87c0 100644 --- a/unit_tests/command_stream/command_stream_receiver_with_aub_dump_tests.cpp +++ b/unit_tests/command_stream/command_stream_receiver_with_aub_dump_tests.cpp @@ -65,7 +65,7 @@ struct MyMockCsr : UltCommandStreamReceiver { bool wasCalled = false; FlushStamp flushStampToReturn = 1; BatchBuffer *receivedBatchBuffer = nullptr; - EngineType receivedEngine = EngineType::ENGINE_RCS; + aub_stream::EngineType receivedEngine = aub_stream::ENGINE_RCS; ResidencyContainer *receivedAllocationsForResidency = nullptr; } flushParametrization; diff --git a/unit_tests/command_stream/tbx_command_stream_tests.cpp b/unit_tests/command_stream/tbx_command_stream_tests.cpp index 7f0d6a9acd..1cac1562de 100644 --- a/unit_tests/command_stream/tbx_command_stream_tests.cpp +++ b/unit_tests/command_stream/tbx_command_stream_tests.cpp @@ -117,10 +117,10 @@ HWTEST_F(TbxCommandStreamTests, DISABLED_flushUntilTailRingBufferLargerThanSizeR HWTEST_F(TbxCommandStreamTests, DISABLED_getCsTraits) { TbxCommandStreamReceiverHw *tbxCsr = (TbxCommandStreamReceiverHw *)pCommandStreamReceiver; - tbxCsr->getCsTraits(EngineType::ENGINE_RCS); - tbxCsr->getCsTraits(EngineType::ENGINE_BCS); - tbxCsr->getCsTraits(EngineType::ENGINE_VCS); - tbxCsr->getCsTraits(EngineType::ENGINE_VECS); + tbxCsr->getCsTraits(aub_stream::ENGINE_RCS); + tbxCsr->getCsTraits(aub_stream::ENGINE_BCS); + tbxCsr->getCsTraits(aub_stream::ENGINE_VCS); + tbxCsr->getCsTraits(aub_stream::ENGINE_VECS); } TEST(TbxCommandStreamReceiverTest, givenNullFactoryEntryWhenTbxCsrIsCreatedThenNullptrIsReturned) { @@ -349,7 +349,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenFlushIsCalledTh pDevice->executionEnvironment->aubCenter.reset(mockAubCenter); MockTbxCsr tbxCsr(*pDevice->executionEnvironment); - MockOsContext osContext(0, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); tbxCsr.setupContext(osContext); auto mockHardwareContext = static_cast(tbxCsr.hardwareContextController->hardwareContexts[0].get()); @@ -379,7 +379,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverInBatchedModeWhenFl pDevice->executionEnvironment->aubCenter.reset(mockAubCenter); MockTbxCsr tbxCsr(*pDevice->executionEnvironment); - MockOsContext osContext(0, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); tbxCsr.setupContext(osContext); auto commandBuffer = pDevice->executionEnvironment->memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{MemoryConstants::pageSize}); @@ -401,7 +401,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenFlushIsCalledWi pDevice->executionEnvironment->aubCenter.reset(mockAubCenter); MockTbxCsr tbxCsr(*pDevice->executionEnvironment); - MockOsContext osContext(0, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); tbxCsr.setupContext(osContext); auto mockHardwareContext = static_cast(tbxCsr.hardwareContextController->hardwareContexts[0].get()); @@ -423,7 +423,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenMakeResidentIsC pDevice->executionEnvironment->aubCenter.reset(mockAubCenter); MockTbxCsr tbxCsr(*pDevice->executionEnvironment); - MockOsContext osContext(0, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); tbxCsr.setupContext(osContext); MockGraphicsAllocation allocation(reinterpret_cast(0x1000), 0x1000); @@ -439,7 +439,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenMakeCoherentIsC pDevice->executionEnvironment->aubCenter.reset(mockAubCenter); MockTbxCsr tbxCsr(*pDevice->executionEnvironment); - MockOsContext osContext(0, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + MockOsContext osContext(0, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); tbxCsr.setupContext(osContext); auto mockHardwareContext = static_cast(tbxCsr.hardwareContextController->hardwareContexts[0].get()); diff --git a/unit_tests/device/device_tests.cpp b/unit_tests/device/device_tests.cpp index f518834b14..e23754ca2e 100644 --- a/unit_tests/device/device_tests.cpp +++ b/unit_tests/device/device_tests.cpp @@ -64,7 +64,7 @@ TEST_F(DeviceTest, givenDeviceWhenAskedForSpecificEngineThenRetrunIt) { EXPECT_EQ(deviceEngine.osContext->isLowPriority(), lowPriority); } - EXPECT_THROW(pDevice->getEngine(EngineType::ENGINE_VCS, false), std::exception); + EXPECT_THROW(pDevice->getEngine(aub_stream::ENGINE_VCS, false), std::exception); } TEST_F(DeviceTest, WhenGetOSTimeThenNotNull) { @@ -102,8 +102,8 @@ TEST_F(DeviceTest, retainAndRelease) { TEST_F(DeviceTest, getEngineTypeDefault) { auto pTestDevice = std::unique_ptr(createWithUsDeviceId(0)); - EngineType actualEngineType = pDevice->getDefaultEngine().osContext->getEngineType(); - EngineType defaultEngineType = pDevice->getHardwareInfo().capabilityTable.defaultEngineType; + auto actualEngineType = pDevice->getDefaultEngine().osContext->getEngineType(); + auto defaultEngineType = pDevice->getHardwareInfo().capabilityTable.defaultEngineType; EXPECT_EQ(&pDevice->getDefaultEngine().commandStreamReceiver->getOsContext(), pDevice->getDefaultEngine().osContext); EXPECT_EQ(defaultEngineType, actualEngineType); diff --git a/unit_tests/gen10/linux/hw_info_config_tests_gen10.cpp b/unit_tests/gen10/linux/hw_info_config_tests_gen10.cpp index 2ed8f39b51..199dbc0f41 100644 --- a/unit_tests/gen10/linux/hw_info_config_tests_gen10.cpp +++ b/unit_tests/gen10/linux/hw_info_config_tests_gen10.cpp @@ -30,7 +30,7 @@ CNLTEST_F(HwInfoConfigTestLinuxCnl, configureHwInfo) { EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount); EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount); EXPECT_EQ(1u, outHwInfo.pSysInfo->SliceCount); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GT2, outHwInfo.pPlatform->eGTType); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1); @@ -81,7 +81,7 @@ CNLTEST_F(HwInfoConfigTestLinuxCnl, configureHwInfo) { EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount); EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount); EXPECT_EQ(2u, outHwInfo.pSysInfo->SliceCount); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GT1, outHwInfo.pPlatform->eGTType); EXPECT_EQ(1u, outHwInfo.pSkuTable->ftrGT1); @@ -105,7 +105,7 @@ CNLTEST_F(HwInfoConfigTestLinuxCnl, configureHwInfo) { EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount); EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount); EXPECT_EQ(3u, outHwInfo.pSysInfo->SliceCount); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GT2_5, outHwInfo.pPlatform->eGTType); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1); diff --git a/unit_tests/gen8/bdw/linux/hw_info_config_tests_bdw.cpp b/unit_tests/gen8/bdw/linux/hw_info_config_tests_bdw.cpp index 0ace437934..31361afdeb 100644 --- a/unit_tests/gen8/bdw/linux/hw_info_config_tests_bdw.cpp +++ b/unit_tests/gen8/bdw/linux/hw_info_config_tests_bdw.cpp @@ -29,7 +29,7 @@ BDWTEST_F(HwInfoConfigTestLinuxBdw, configureHwInfo) { EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount); EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount); EXPECT_EQ(1u, outHwInfo.pSysInfo->SliceCount); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GT2, outHwInfo.pPlatform->eGTType); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1); @@ -53,7 +53,7 @@ BDWTEST_F(HwInfoConfigTestLinuxBdw, configureHwInfo) { EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.pPlatform->usRevId); EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount); EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GT1, outHwInfo.pPlatform->eGTType); EXPECT_EQ(1u, outHwInfo.pSkuTable->ftrGT1); @@ -77,7 +77,7 @@ BDWTEST_F(HwInfoConfigTestLinuxBdw, configureHwInfo) { EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount); EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount); EXPECT_EQ(2u, outHwInfo.pSysInfo->SliceCount); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GT3, outHwInfo.pPlatform->eGTType); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1); diff --git a/unit_tests/gen9/bxt/linux/hw_info_config_tests.cpp b/unit_tests/gen9/bxt/linux/hw_info_config_tests.cpp index ffd1ffad30..a419cc5092 100644 --- a/unit_tests/gen9/bxt/linux/hw_info_config_tests.cpp +++ b/unit_tests/gen9/bxt/linux/hw_info_config_tests.cpp @@ -35,7 +35,7 @@ BXTTEST_F(HwInfoConfigTestLinuxBxt, configureHwInfo) { EXPECT_EQ((uint32_t)drm->StoredMinEUinPool, outHwInfo.pSysInfo->EuCountPerPoolMin); EXPECT_EQ((outHwInfo.pSysInfo->EUCount - outHwInfo.pSysInfo->EuCountPerPoolMin), outHwInfo.pSysInfo->EuCountPerPoolMax); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGttCacheInvalidation); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); //constant sysInfo/ftr flags EXPECT_EQ(1u, outHwInfo.pSysInfo->VEBoxInfo.Instances.Bits.VEBox0Enabled); @@ -88,7 +88,7 @@ BXTTEST_F(HwInfoConfigTestLinuxBxt, configureHwInfo) { EXPECT_EQ((uint32_t)drm->StoredMinEUinPool, outHwInfo.pSysInfo->EuCountPerPoolMin); EXPECT_EQ((outHwInfo.pSysInfo->EUCount - outHwInfo.pSysInfo->EuCountPerPoolMin), outHwInfo.pSysInfo->EuCountPerPoolMax); EXPECT_EQ(1u, outHwInfo.pSkuTable->ftrGttCacheInvalidation); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GTC, outHwInfo.pPlatform->eGTType); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1); @@ -114,7 +114,7 @@ BXTTEST_F(HwInfoConfigTestLinuxBxt, configureHwInfo) { EXPECT_EQ((unsigned int)drm->StoredHasPooledEU, outHwInfo.pSkuTable->ftrPooledEuEnabled); EXPECT_EQ((uint32_t)drm->StoredMinEUinPool, outHwInfo.pSysInfo->EuCountPerPoolMin); EXPECT_EQ((outHwInfo.pSysInfo->EUCount - outHwInfo.pSysInfo->EuCountPerPoolMin), outHwInfo.pSysInfo->EuCountPerPoolMax); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GTX, outHwInfo.pPlatform->eGTType); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1); diff --git a/unit_tests/gen9/cfl/linux/hw_info_config_tests_cfl.cpp b/unit_tests/gen9/cfl/linux/hw_info_config_tests_cfl.cpp index 481c6e5df9..93b7d51331 100644 --- a/unit_tests/gen9/cfl/linux/hw_info_config_tests_cfl.cpp +++ b/unit_tests/gen9/cfl/linux/hw_info_config_tests_cfl.cpp @@ -27,7 +27,7 @@ CFLTEST_F(HwInfoConfigTestLinuxCfl, configureHwInfo) { EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.pPlatform->usRevId); EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount); EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GT2, outHwInfo.pPlatform->eGTType); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1); @@ -75,7 +75,7 @@ CFLTEST_F(HwInfoConfigTestLinuxCfl, configureHwInfo) { EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount); EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount); EXPECT_EQ(1u, outHwInfo.pSysInfo->SliceCount); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GT1, outHwInfo.pPlatform->eGTType); EXPECT_EQ(1u, outHwInfo.pSkuTable->ftrGT1); @@ -99,7 +99,7 @@ CFLTEST_F(HwInfoConfigTestLinuxCfl, configureHwInfo) { EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount); EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount); EXPECT_EQ(2u, outHwInfo.pSysInfo->SliceCount); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GT3, outHwInfo.pPlatform->eGTType); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1); diff --git a/unit_tests/gen9/glk/linux/hw_info_config_tests_glk.cpp b/unit_tests/gen9/glk/linux/hw_info_config_tests_glk.cpp index 72cdc400a3..52b4321170 100644 --- a/unit_tests/gen9/glk/linux/hw_info_config_tests_glk.cpp +++ b/unit_tests/gen9/glk/linux/hw_info_config_tests_glk.cpp @@ -32,7 +32,7 @@ GLKTEST_F(HwInfoConfigTestLinuxGlk, configureHwInfo) { EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.pPlatform->usRevId); EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount); EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GTA, outHwInfo.pPlatform->eGTType); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1); @@ -80,7 +80,7 @@ GLKTEST_F(HwInfoConfigTestLinuxGlk, configureHwInfo) { EXPECT_EQ((unsigned int)drm->StoredHasPooledEU, outHwInfo.pSkuTable->ftrPooledEuEnabled); EXPECT_EQ((uint32_t)drm->StoredMinEUinPool, outHwInfo.pSysInfo->EuCountPerPoolMin); EXPECT_EQ((outHwInfo.pSysInfo->EUCount - outHwInfo.pSysInfo->EuCountPerPoolMin), outHwInfo.pSysInfo->EuCountPerPoolMax); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GTC, outHwInfo.pPlatform->eGTType); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1); @@ -106,7 +106,7 @@ GLKTEST_F(HwInfoConfigTestLinuxGlk, configureHwInfo) { EXPECT_EQ((unsigned int)drm->StoredHasPooledEU, outHwInfo.pSkuTable->ftrPooledEuEnabled); EXPECT_EQ((uint32_t)drm->StoredMinEUinPool, outHwInfo.pSysInfo->EuCountPerPoolMin); EXPECT_EQ((outHwInfo.pSysInfo->EUCount - outHwInfo.pSysInfo->EuCountPerPoolMin), outHwInfo.pSysInfo->EuCountPerPoolMax); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GTX, outHwInfo.pPlatform->eGTType); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1); diff --git a/unit_tests/gen9/kbl/linux/hw_info_config_tests_kbl.cpp b/unit_tests/gen9/kbl/linux/hw_info_config_tests_kbl.cpp index 7022849b89..4b79525a8e 100644 --- a/unit_tests/gen9/kbl/linux/hw_info_config_tests_kbl.cpp +++ b/unit_tests/gen9/kbl/linux/hw_info_config_tests_kbl.cpp @@ -27,7 +27,7 @@ KBLTEST_F(HwInfoConfigTestLinuxKbl, configureHwInfo) { EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.pPlatform->usRevId); EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount); EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GT2, outHwInfo.pPlatform->eGTType); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1); @@ -75,7 +75,7 @@ KBLTEST_F(HwInfoConfigTestLinuxKbl, configureHwInfo) { EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount); EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount); EXPECT_EQ(1u, outHwInfo.pSysInfo->SliceCount); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GT1, outHwInfo.pPlatform->eGTType); EXPECT_EQ(1u, outHwInfo.pSkuTable->ftrGT1); @@ -97,7 +97,7 @@ KBLTEST_F(HwInfoConfigTestLinuxKbl, configureHwInfo) { EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.pPlatform->usRevId); EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount); EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GT1_5, outHwInfo.pPlatform->eGTType); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1); @@ -121,7 +121,7 @@ KBLTEST_F(HwInfoConfigTestLinuxKbl, configureHwInfo) { EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount); EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount); EXPECT_EQ(2u, outHwInfo.pSysInfo->SliceCount); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GT3, outHwInfo.pPlatform->eGTType); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1); @@ -145,7 +145,7 @@ KBLTEST_F(HwInfoConfigTestLinuxKbl, configureHwInfo) { EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount); EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount); EXPECT_EQ(2u, outHwInfo.pSysInfo->SliceCount); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GT4, outHwInfo.pPlatform->eGTType); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1); diff --git a/unit_tests/gen9/skl/linux/hw_info_config_tests_skl.cpp b/unit_tests/gen9/skl/linux/hw_info_config_tests_skl.cpp index fe0a8bd721..7ab4164f61 100644 --- a/unit_tests/gen9/skl/linux/hw_info_config_tests_skl.cpp +++ b/unit_tests/gen9/skl/linux/hw_info_config_tests_skl.cpp @@ -27,7 +27,7 @@ SKLTEST_F(HwInfoConfigTestLinuxSkl, configureHwInfo) { EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.pPlatform->usRevId); EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount); EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GT2, outHwInfo.pPlatform->eGTType); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1); @@ -77,7 +77,7 @@ SKLTEST_F(HwInfoConfigTestLinuxSkl, configureHwInfo) { EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount); EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount); EXPECT_EQ(1u, outHwInfo.pSysInfo->SliceCount); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GT1, outHwInfo.pPlatform->eGTType); EXPECT_EQ(1u, outHwInfo.pSkuTable->ftrGT1); @@ -99,7 +99,7 @@ SKLTEST_F(HwInfoConfigTestLinuxSkl, configureHwInfo) { EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.pPlatform->usRevId); EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount); EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GT1_5, outHwInfo.pPlatform->eGTType); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1); @@ -121,7 +121,7 @@ SKLTEST_F(HwInfoConfigTestLinuxSkl, configureHwInfo) { EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.pPlatform->usRevId); EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount); EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GT3, outHwInfo.pPlatform->eGTType); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1); @@ -145,7 +145,7 @@ SKLTEST_F(HwInfoConfigTestLinuxSkl, configureHwInfo) { EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount); EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount); EXPECT_EQ(2u, outHwInfo.pSysInfo->SliceCount); - EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType); EXPECT_EQ(GTTYPE_GT4, outHwInfo.pPlatform->eGTType); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1); diff --git a/unit_tests/helpers/get_gpgpu_engines_tests.inl b/unit_tests/helpers/get_gpgpu_engines_tests.inl index 90a074f7bd..dc489d15b8 100644 --- a/unit_tests/helpers/get_gpgpu_engines_tests.inl +++ b/unit_tests/helpers/get_gpgpu_engines_tests.inl @@ -14,6 +14,6 @@ template void whenGetGpgpuEnginesThenReturnTwoRcsEngines() { auto gpgpuEngines = HwHelperHw::get().getGpgpuEngineInstances(); EXPECT_EQ(2u, gpgpuEngines.size()); - EXPECT_EQ(ENGINE_RCS, gpgpuEngines[0]); - EXPECT_EQ(ENGINE_RCS, gpgpuEngines[1]); + EXPECT_EQ(aub_stream::ENGINE_RCS, gpgpuEngines[0]); + EXPECT_EQ(aub_stream::ENGINE_RCS, gpgpuEngines[1]); } diff --git a/unit_tests/helpers/hw_helper_tests.cpp b/unit_tests/helpers/hw_helper_tests.cpp index 50cc28e528..7a96fa5afa 100644 --- a/unit_tests/helpers/hw_helper_tests.cpp +++ b/unit_tests/helpers/hw_helper_tests.cpp @@ -112,7 +112,7 @@ TEST_F(HwHelperTest, givenEngineTypeRcsWhenCsTraitsAreQueiredThenCorrectNameInTr auto &helper = HwHelper::get(renderCoreFamily); EXPECT_NE(nullptr, &helper); - auto &csTraits = helper.getCsTraits(EngineType::ENGINE_RCS); + auto &csTraits = helper.getCsTraits(aub_stream::ENGINE_RCS); EXPECT_STREQ("RCS", csTraits.name); } @@ -246,18 +246,18 @@ TEST(HwInfoTest, givenHwInfoWhenIsNotCoreThenPlatformTypeIsLp) { TEST(HwInfoTest, givenHwInfoWhenChosenEngineTypeQueriedThenDefaultIsReturned) { HardwareInfo hwInfo; - hwInfo.capabilityTable.defaultEngineType = EngineType::ENGINE_RCS; + hwInfo.capabilityTable.defaultEngineType = aub_stream::ENGINE_RCS; auto engineType = getChosenEngineType(hwInfo); - EXPECT_EQ(EngineType::ENGINE_RCS, engineType); + EXPECT_EQ(aub_stream::ENGINE_RCS, engineType); } TEST(HwInfoTest, givenNodeOrdinalSetWhenChosenEngineTypeQueriedThenSetValueIsReturned) { DebugManagerStateRestore dbgRestore; - DebugManager.flags.NodeOrdinal.set(EngineType::ENGINE_VECS); + DebugManager.flags.NodeOrdinal.set(aub_stream::ENGINE_VECS); HardwareInfo hwInfo; - hwInfo.capabilityTable.defaultEngineType = EngineType::ENGINE_RCS; + hwInfo.capabilityTable.defaultEngineType = aub_stream::ENGINE_RCS; auto engineType = getChosenEngineType(hwInfo); - EXPECT_EQ(EngineType::ENGINE_VECS, engineType); + EXPECT_EQ(aub_stream::ENGINE_VECS, engineType); } HWTEST_F(HwHelperTest, givenCreatedSurfaceStateBufferWhenNoAllocationProvidedThenUseArgumentsasInput) { diff --git a/unit_tests/libult/mock_gfx_family.cpp b/unit_tests/libult/mock_gfx_family.cpp index de6645c6db..d7be4153fe 100644 --- a/unit_tests/libult/mock_gfx_family.cpp +++ b/unit_tests/libult/mock_gfx_family.cpp @@ -25,7 +25,7 @@ static AubMemDump::LrcaHelperBcs bcs(0x020000); static AubMemDump::LrcaHelperVcs vcs(0x010000); static AubMemDump::LrcaHelperVecs vecs(0x018000); -const AubMemDump::LrcaHelper *AUBFamilyMapper::csTraits[EngineType::NUM_ENGINES] = { +const AubMemDump::LrcaHelper *AUBFamilyMapper::csTraits[aub_stream::NUM_ENGINES] = { &rcs, &bcs, &vcs, @@ -80,7 +80,7 @@ bool HwHelperHw::setupPreemptionRegisters(HardwareInfo *pHwInfo, bool enab } template <> -const AubMemDump::LrcaHelper &HwHelperHw::getCsTraits(EngineType engineType) const { +const AubMemDump::LrcaHelper &HwHelperHw::getCsTraits(aub_stream::EngineType engineType) const { return *AUBFamilyMapper::csTraits[engineType]; } diff --git a/unit_tests/libult/mock_gfx_family.h b/unit_tests/libult/mock_gfx_family.h index 405d017a7b..da8123bc7e 100644 --- a/unit_tests/libult/mock_gfx_family.h +++ b/unit_tests/libult/mock_gfx_family.h @@ -535,9 +535,9 @@ struct GENX { template <> struct AUBFamilyMapper { - static const AubMemDump::LrcaHelper *csTraits[EngineType::NUM_ENGINES]; + static const AubMemDump::LrcaHelper *csTraits[aub_stream::NUM_ENGINES]; static const MMIOList globalMMIO; - static const MMIOList *perEngineMMIO[EngineType::NUM_ENGINES]; + static const MMIOList *perEngineMMIO[aub_stream::NUM_ENGINES]; }; } // namespace NEO diff --git a/unit_tests/mocks/mock_os_context.h b/unit_tests/mocks/mock_os_context.h index e60a5608cd..168096a56f 100644 --- a/unit_tests/mocks/mock_os_context.h +++ b/unit_tests/mocks/mock_os_context.h @@ -12,7 +12,7 @@ namespace NEO { class MockOsContext : public OsContext { public: MockOsContext(uint32_t contextId, DeviceBitfield deviceBitfield, - EngineType engineType, PreemptionMode preemptionMode, bool lowPriority) + aub_stream::EngineType engineType, PreemptionMode preemptionMode, bool lowPriority) : OsContext(contextId, deviceBitfield, engineType, preemptionMode, lowPriority) {} }; } // namespace NEO diff --git a/unit_tests/os_interface/linux/drm_mapper_tests.cpp b/unit_tests/os_interface/linux/drm_mapper_tests.cpp index adfe985ece..13d8c27421 100644 --- a/unit_tests/os_interface/linux/drm_mapper_tests.cpp +++ b/unit_tests/os_interface/linux/drm_mapper_tests.cpp @@ -13,11 +13,11 @@ using namespace NEO; TEST(DrmMapperTests, engineNodeMapPass) { - unsigned int flag = DrmEngineMapper::engineNodeMap(EngineType::ENGINE_RCS); + unsigned int flag = DrmEngineMapper::engineNodeMap(aub_stream::ENGINE_RCS); unsigned int expected = I915_EXEC_RENDER; EXPECT_EQ(expected, flag); } TEST(DrmMapperTests, engineNodeMapNegative) { - EXPECT_THROW(DrmEngineMapper::engineNodeMap(EngineType::ENGINE_BCS), std::exception); + EXPECT_THROW(DrmEngineMapper::engineNodeMap(aub_stream::ENGINE_BCS), std::exception); } diff --git a/unit_tests/os_interface/linux/drm_tests.cpp b/unit_tests/os_interface/linux/drm_tests.cpp index ff5d192e72..ab0e6ef74d 100644 --- a/unit_tests/os_interface/linux/drm_tests.cpp +++ b/unit_tests/os_interface/linux/drm_tests.cpp @@ -172,14 +172,14 @@ TEST(DrmTest, givenDrmWhenOsContextIsCreatedThenCreateAndDestroyNewDrmOsContext) { drmMock.StoredCtxId = drmContextId1; - OsContextLinux osContext1(drmMock, 0u, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + OsContextLinux osContext1(drmMock, 0u, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); EXPECT_EQ(drmContextId1, osContext1.getDrmContextId()); EXPECT_EQ(0u, drmMock.receivedDestroyContextId); { drmMock.StoredCtxId = drmContextId2; - OsContextLinux osContext2(drmMock, 0u, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + OsContextLinux osContext2(drmMock, 0u, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); EXPECT_EQ(drmContextId2, osContext2.getDrmContextId()); EXPECT_EQ(0u, drmMock.receivedDestroyContextId); } @@ -195,17 +195,17 @@ TEST(DrmTest, givenDrmPreemptionEnabledAndLowPriorityEngineWhenCreatingOsContext drmMock.StoredCtxId = 123; drmMock.preemptionSupported = false; - OsContextLinux osContext1(drmMock, 0u, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); - OsContextLinux osContext2(drmMock, 0u, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, true); + OsContextLinux osContext1(drmMock, 0u, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); + OsContextLinux osContext2(drmMock, 0u, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, true); EXPECT_EQ(0u, drmMock.receivedContextParamRequestCount); drmMock.preemptionSupported = true; - OsContextLinux osContext3(drmMock, 0u, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, false); + OsContextLinux osContext3(drmMock, 0u, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, false); EXPECT_EQ(0u, drmMock.receivedContextParamRequestCount); - OsContextLinux osContext4(drmMock, 0u, 1, EngineType::ENGINE_RCS, PreemptionMode::Disabled, true); + OsContextLinux osContext4(drmMock, 0u, 1, aub_stream::ENGINE_RCS, PreemptionMode::Disabled, true); EXPECT_EQ(1u, drmMock.receivedContextParamRequestCount); EXPECT_EQ(drmMock.StoredCtxId, drmMock.receivedContextParamRequest.ctx_id); EXPECT_EQ(static_cast(I915_CONTEXT_PARAM_PRIORITY), drmMock.receivedContextParamRequest.param); diff --git a/unit_tests/os_interface/windows/wddm_mapper_tests.cpp b/unit_tests/os_interface/windows/wddm_mapper_tests.cpp index 58af70a9cd..1253f45c02 100644 --- a/unit_tests/os_interface/windows/wddm_mapper_tests.cpp +++ b/unit_tests/os_interface/windows/wddm_mapper_tests.cpp @@ -11,11 +11,11 @@ using namespace NEO; TEST(WddmMapperTests, givenRcsEngineTypeWhenAskedForNodeOrdinalThenReturn3d) { - GPUNODE_ORDINAL gpuNode = WddmEngineMapper::engineNodeMap(EngineType::ENGINE_RCS); + GPUNODE_ORDINAL gpuNode = WddmEngineMapper::engineNodeMap(aub_stream::ENGINE_RCS); GPUNODE_ORDINAL expected = GPUNODE_3D; EXPECT_EQ(expected, gpuNode); } TEST(WddmMapperTests, givenNotSupportedEngineWhenAskedForNodeThenAbort) { - EXPECT_THROW(WddmEngineMapper::engineNodeMap(EngineType::ENGINE_BCS), std::exception); + EXPECT_THROW(WddmEngineMapper::engineNodeMap(aub_stream::ENGINE_BCS), std::exception); } diff --git a/unit_tests/os_interface/windows/wddm_memory_manager_tests.cpp b/unit_tests/os_interface/windows/wddm_memory_manager_tests.cpp index 04471c1558..bb11989d63 100644 --- a/unit_tests/os_interface/windows/wddm_memory_manager_tests.cpp +++ b/unit_tests/os_interface/windows/wddm_memory_manager_tests.cpp @@ -69,7 +69,7 @@ TEST(WddmMemoryManager, NonAssignable) { TEST(WddmAllocationTest, givenAllocationIsTrimCandidateInOneOsContextWhenGettingTrimCandidatePositionThenReturnItsPositionAndUnusedPositionInOtherContexts) { WddmAllocation allocation{GraphicsAllocation::AllocationType::UNDECIDED, nullptr, 0, nullptr, MemoryPool::MemoryNull, false}; - MockOsContext osContext(1u, 1, ENGINE_RCS, PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false); + MockOsContext osContext(1u, 1, aub_stream::ENGINE_RCS, PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false); allocation.setTrimCandidateListPosition(osContext.getContextId(), 700u); EXPECT_EQ(trimListUnusedPosition, allocation.getTrimCandidateListPosition(0u)); EXPECT_EQ(700u, allocation.getTrimCandidateListPosition(1u)); @@ -1344,16 +1344,16 @@ TEST_F(WddmMemoryManagerTest, givenWddmMemoryManagerWithNoRegisteredOsContextsWh } TEST_F(WddmMemoryManagerTest, givenWddmMemoryManagerWithRegisteredOsContextWhenCallingIsMemoryBudgetExhaustedThenReturnFalse) { - memoryManager->createAndRegisterOsContext(nullptr, ENGINE_RCS, 1, PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false); - memoryManager->createAndRegisterOsContext(nullptr, ENGINE_RCS, 1, PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false); - memoryManager->createAndRegisterOsContext(nullptr, ENGINE_RCS, 1, PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false); + memoryManager->createAndRegisterOsContext(nullptr, aub_stream::ENGINE_RCS, 1, PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false); + memoryManager->createAndRegisterOsContext(nullptr, aub_stream::ENGINE_RCS, 1, PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false); + memoryManager->createAndRegisterOsContext(nullptr, aub_stream::ENGINE_RCS, 1, PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false); EXPECT_FALSE(memoryManager->isMemoryBudgetExhausted()); } TEST_F(WddmMemoryManagerTest, givenWddmMemoryManagerWithRegisteredOsContextWithExhaustedMemoryBudgetWhenCallingIsMemoryBudgetExhaustedThenReturnTrue) { - memoryManager->createAndRegisterOsContext(nullptr, ENGINE_RCS, 1, PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false); - memoryManager->createAndRegisterOsContext(nullptr, ENGINE_RCS, 1, PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false); - memoryManager->createAndRegisterOsContext(nullptr, ENGINE_RCS, 1, PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false); + memoryManager->createAndRegisterOsContext(nullptr, aub_stream::ENGINE_RCS, 1, PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false); + memoryManager->createAndRegisterOsContext(nullptr, aub_stream::ENGINE_RCS, 1, PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false); + memoryManager->createAndRegisterOsContext(nullptr, aub_stream::ENGINE_RCS, 1, PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false); auto osContext = static_cast(memoryManager->getRegisteredEngines()[1].osContext); osContext->getResidencyController().setMemoryBudgetExhausted(); EXPECT_TRUE(memoryManager->isMemoryBudgetExhausted()); @@ -1572,7 +1572,7 @@ TEST(WddmMemoryManagerCleanupTest, givenUsedTagAllocationInWddmMemoryManagerWhen executionEnvironment.commandStreamReceivers.resize(1); executionEnvironment.commandStreamReceivers[0].push_back(std::unique_ptr(csr)); executionEnvironment.memoryManager = std::make_unique(executionEnvironment); - auto osContext = executionEnvironment.memoryManager->createAndRegisterOsContext(csr, ENGINE_RCS, 1, preemptionMode, false); + auto osContext = executionEnvironment.memoryManager->createAndRegisterOsContext(csr, aub_stream::ENGINE_RCS, 1, preemptionMode, false); csr->setupContext(*osContext); EXPECT_EQ(csr, executionEnvironment.memoryManager->getDefaultCommandStreamReceiver(0));