mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 16:45:25 +08:00
Move command stream tests to shared
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
2647d563c7
commit
1df68ad71f
@@ -6,11 +6,6 @@
|
|||||||
|
|
||||||
set(IGDRCL_SRCS_tests_command_stream
|
set(IGDRCL_SRCS_tests_command_stream
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_1_tests.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_2_tests.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_3_tests.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/aub_file_stream_tests.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/aub_subcapture_tests.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cl_command_stream_receiver_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/cl_command_stream_receiver_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cl_tbx_command_stream_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/cl_tbx_command_stream_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_tests.cpp
|
||||||
@@ -26,13 +21,11 @@ set(IGDRCL_SRCS_tests_command_stream
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_flush_task_4_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_flush_task_4_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_flush_task_gmock_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_flush_task_gmock_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_with_aub_dump_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_with_aub_dump_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_tests.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/create_command_stream_receiver_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/create_command_stream_receiver_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/get_devices_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/get_devices_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/experimental_command_buffer_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/experimental_command_buffer_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/implicit_scaling_ocl_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/implicit_scaling_ocl_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/submissions_aggregator_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/submissions_aggregator_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/tbx_command_stream_tests.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/thread_arbitration_policy_helper.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/thread_arbitration_policy_helper.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/thread_arbitration_policy_helper.h
|
${CMAKE_CURRENT_SOURCE_DIR}/thread_arbitration_policy_helper.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/compute_mode_tests.h
|
${CMAKE_CURRENT_SOURCE_DIR}/compute_mode_tests.h
|
||||||
@@ -40,12 +33,9 @@ set(IGDRCL_SRCS_tests_command_stream
|
|||||||
|
|
||||||
if(TESTS_XEHP_AND_LATER)
|
if(TESTS_XEHP_AND_LATER)
|
||||||
list(APPEND IGDRCL_SRCS_tests_command_stream
|
list(APPEND IGDRCL_SRCS_tests_command_stream
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_tests_xehp_and_later.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_flush_task_tests_xehp_and_later.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_flush_task_tests_xehp_and_later.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_tests_xehp_and_later.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_tests_xehp_and_later.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw_tests_xehp_and_later.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/compute_mode_tests_xehp_and_later.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/compute_mode_tests_xehp_and_later.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/tbx_command_stream_receiver_tests_xehp_and_later.cpp
|
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -13,11 +13,9 @@ if(TESTS_GEN12LP)
|
|||||||
set(IGDRCL_SRCS_tests_gen12lp
|
set(IGDRCL_SRCS_tests_gen12lp
|
||||||
${IGDRCL_SRCS_tests_gen12lp_excludes}
|
${IGDRCL_SRCS_tests_gen12lp_excludes}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_tests_gen12lp.inl
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/buffer_tests_gen12lp.inl
|
${CMAKE_CURRENT_SOURCE_DIR}/buffer_tests_gen12lp.inl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/coherency_tests_gen12lp.inl
|
${CMAKE_CURRENT_SOURCE_DIR}/coherency_tests_gen12lp.inl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_tests_gen12lp.inl
|
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_tests_gen12lp.inl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw_tests_gen12lp.inl
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/compute_mode_tests_gen12lp.inl
|
${CMAKE_CURRENT_SOURCE_DIR}/compute_mode_tests_gen12lp.inl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_media_kernel_gen12lp.inl
|
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_media_kernel_gen12lp.inl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/gen12lp_tests_wrapper.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/gen12lp_tests_wrapper.cpp
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include "opencl/source/cl_device/cl_device.h"
|
#include "opencl/source/cl_device/cl_device.h"
|
||||||
#include "opencl/source/mem_obj/buffer.h"
|
#include "opencl/source/mem_obj/buffer.h"
|
||||||
|
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||||
#include "opencl/test/unit_test/mocks/mock_context.h"
|
#include "opencl/test/unit_test/mocks/mock_context.h"
|
||||||
|
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
@@ -161,4 +162,4 @@ GEN12LPTEST_F(Gen12lpCreateBufferTest, WhenCreatingBufferWithCopyHostPtrThenDont
|
|||||||
cl_int retVal = 0;
|
cl_int retVal = 0;
|
||||||
auto bufferForBlt = clUniquePtr(Buffer::create(newBcsMockContext.get(), CL_MEM_COPY_HOST_PTR, sizeof(hostPtr), &hostPtr, retVal));
|
auto bufferForBlt = clUniquePtr(Buffer::create(newBcsMockContext.get(), CL_MEM_COPY_HOST_PTR, sizeof(hostPtr), &hostPtr, retVal));
|
||||||
EXPECT_EQ(0u, bcsCsr->blitBufferCalled);
|
EXPECT_EQ(0u, bcsCsr->blitBufferCalled);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#include "shared/test/common/cmd_parse/hw_parse.h"
|
#include "shared/test/common/cmd_parse/hw_parse.h"
|
||||||
#include "shared/test/common/helpers/dispatch_flags_helper.h"
|
#include "shared/test/common/helpers/dispatch_flags_helper.h"
|
||||||
#include "shared/test/common/libult/gen12lp/special_ult_helper_gen12lp.h"
|
#include "shared/test/common/libult/gen12lp/special_ult_helper_gen12lp.h"
|
||||||
|
#include "shared/test/common/mocks/mock_allocation_properties.h"
|
||||||
#include "shared/test/common/mocks/mock_device.h"
|
#include "shared/test/common/mocks/mock_device.h"
|
||||||
#include "shared/test/common/test_macros/test.h"
|
#include "shared/test/common/test_macros/test.h"
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencl/test/unit_test/gen12lp/aub_command_stream_receiver_tests_gen12lp.inl"
|
|
||||||
#include "opencl/test/unit_test/gen12lp/buffer_tests_gen12lp.inl"
|
#include "opencl/test/unit_test/gen12lp/buffer_tests_gen12lp.inl"
|
||||||
#include "opencl/test/unit_test/gen12lp/coherency_tests_gen12lp.inl"
|
#include "opencl/test/unit_test/gen12lp/coherency_tests_gen12lp.inl"
|
||||||
#include "opencl/test/unit_test/gen12lp/command_stream_receiver_hw_tests_gen12lp.inl"
|
#include "opencl/test/unit_test/gen12lp/command_stream_receiver_hw_tests_gen12lp.inl"
|
||||||
#include "opencl/test/unit_test/gen12lp/command_stream_receiver_simulated_common_hw_tests_gen12lp.inl"
|
|
||||||
#include "opencl/test/unit_test/gen12lp/compute_mode_tests_gen12lp.inl"
|
#include "opencl/test/unit_test/gen12lp/compute_mode_tests_gen12lp.inl"
|
||||||
#include "opencl/test/unit_test/gen12lp/enqueue_media_kernel_gen12lp.inl"
|
#include "opencl/test/unit_test/gen12lp/enqueue_media_kernel_gen12lp.inl"
|
||||||
#include "opencl/test/unit_test/gen12lp/hw_helper_tests_gen12lp.inl"
|
#include "opencl/test/unit_test/gen12lp/hw_helper_tests_gen12lp.inl"
|
||||||
|
|||||||
@@ -14,8 +14,6 @@
|
|||||||
#include "opencl/source/platform/platform.h"
|
#include "opencl/source/platform/platform.h"
|
||||||
#include "opencl/test/unit_test/mocks/mock_platform.h"
|
#include "opencl/test/unit_test/mocks/mock_platform.h"
|
||||||
|
|
||||||
#include "third_party/aub_stream/headers/aubstream.h"
|
|
||||||
|
|
||||||
void NEO::UltConfigListener::OnTestStart(const ::testing::TestInfo &testInfo) {
|
void NEO::UltConfigListener::OnTestStart(const ::testing::TestInfo &testInfo) {
|
||||||
BaseUltConfigListener::OnTestStart(testInfo);
|
BaseUltConfigListener::OnTestStart(testInfo);
|
||||||
|
|
||||||
@@ -30,7 +28,6 @@ void NEO::UltConfigListener::OnTestEnd(const ::testing::TestInfo &testInfo) {
|
|||||||
// Clear global platform that it shouldn't be reused between tests
|
// Clear global platform that it shouldn't be reused between tests
|
||||||
platformsImpl->clear();
|
platformsImpl->clear();
|
||||||
MemoryManager::maxOsContextCount = 0u;
|
MemoryManager::maxOsContextCount = 0u;
|
||||||
aub_stream::injectMMIOList(aub_stream::MMIOList{});
|
|
||||||
|
|
||||||
BaseUltConfigListener::OnTestEnd(testInfo);
|
BaseUltConfigListener::OnTestEnd(testInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ if(TESTS_XE_HPC_CORE)
|
|||||||
set(IGDRCL_SRCS_tests_xe_hpc_core
|
set(IGDRCL_SRCS_tests_xe_hpc_core
|
||||||
${IGDRCL_SRCS_tests_xe_hpc_core_excludes}
|
${IGDRCL_SRCS_tests_xe_hpc_core_excludes}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_2_tests_xe_hpc_core.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_tests_xe_hpc_core.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_tests_xe_hpc_core.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/test_cmds_programming_xe_hpc_core.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/test_cmds_programming_xe_hpc_core.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/copy_engine_tests_xe_hpc_core.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/copy_engine_tests_xe_hpc_core.cpp
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
#include "shared/test/common/helpers/default_hw_info.h"
|
#include "shared/test/common/helpers/default_hw_info.h"
|
||||||
#include "shared/test/common/helpers/ult_hw_config.h"
|
#include "shared/test/common/helpers/ult_hw_config.h"
|
||||||
|
|
||||||
|
#include "third_party/aub_stream/headers/aubstream.h"
|
||||||
|
|
||||||
void NEO::BaseUltConfigListener::OnTestStart(const ::testing::TestInfo &) {
|
void NEO::BaseUltConfigListener::OnTestStart(const ::testing::TestInfo &) {
|
||||||
debugVarSnapshot = DebugManager.flags;
|
debugVarSnapshot = DebugManager.flags;
|
||||||
injectFcnSnapshot = DebugManager.injectFcn;
|
injectFcnSnapshot = DebugManager.injectFcn;
|
||||||
@@ -18,6 +20,8 @@ void NEO::BaseUltConfigListener::OnTestStart(const ::testing::TestInfo &) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void NEO::BaseUltConfigListener::OnTestEnd(const ::testing::TestInfo &) {
|
void NEO::BaseUltConfigListener::OnTestEnd(const ::testing::TestInfo &) {
|
||||||
|
aub_stream::injectMMIOList(aub_stream::MMIOList{});
|
||||||
|
|
||||||
#undef DECLARE_DEBUG_VARIABLE
|
#undef DECLARE_DEBUG_VARIABLE
|
||||||
#define DECLARE_DEBUG_VARIABLE(dataType, variableName, defaultValue, description) \
|
#define DECLARE_DEBUG_VARIABLE(dataType, variableName, defaultValue, description) \
|
||||||
EXPECT_EQ(debugVarSnapshot.variableName.getRef(), DebugManager.flags.variableName.getRef());
|
EXPECT_EQ(debugVarSnapshot.variableName.getRef(), DebugManager.flags.variableName.getRef());
|
||||||
|
|||||||
@@ -4,13 +4,31 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
#
|
#
|
||||||
|
|
||||||
target_sources(${TARGET_NAME} PRIVATE
|
set(NEO_SHARED_tests_command_stream
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_1_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/linear_stream_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_2_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}stream_properties_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_3_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/stream_properties_tests_common.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/aub_file_stream_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/stream_properties_tests_common.h
|
${CMAKE_CURRENT_SOURCE_DIR}/aub_subcapture_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/tbx_stream_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_tests.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_tests.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/linear_stream_tests.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}stream_properties_tests.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/stream_properties_tests_common.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/stream_properties_tests_common.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/tbx_command_stream_tests.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/tbx_stream_tests.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(TESTS_XEHP_AND_LATER)
|
||||||
|
list(APPEND NEO_SHARED_tests_command_stream
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_tests_xehp_and_later.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw_tests_xehp_and_later.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/tbx_command_stream_receiver_tests_xehp_and_later.cpp
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_sources(${TARGET_NAME} PRIVATE ${NEO_SHARED_tests_command_stream})
|
||||||
|
|
||||||
add_subdirectories()
|
add_subdirectories()
|
||||||
|
|||||||
@@ -23,8 +23,6 @@
|
|||||||
#include "shared/test/common/mocks/mock_os_context.h"
|
#include "shared/test/common/mocks/mock_os_context.h"
|
||||||
#include "shared/test/common/test_macros/test.h"
|
#include "shared/test/common/test_macros/test.h"
|
||||||
|
|
||||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
|
||||||
|
|
||||||
#include "driver_version.h"
|
#include "driver_version.h"
|
||||||
#include "sys_calls.h"
|
#include "sys_calls.h"
|
||||||
|
|
||||||
@@ -8,14 +8,13 @@
|
|||||||
#include "shared/source/aub/aub_helper.h"
|
#include "shared/source/aub/aub_helper.h"
|
||||||
#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw.h"
|
#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw.h"
|
||||||
#include "shared/source/helpers/hardware_context_controller.h"
|
#include "shared/source/helpers/hardware_context_controller.h"
|
||||||
|
#include "shared/test/common/fixtures/device_fixture.h"
|
||||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||||
#include "shared/test/common/mocks/mock_aub_stream.h"
|
#include "shared/test/common/mocks/mock_aub_stream.h"
|
||||||
#include "shared/test/common/mocks/mock_csr_simulated_common_hw.h"
|
#include "shared/test/common/mocks/mock_csr_simulated_common_hw.h"
|
||||||
#include "shared/test/common/test_macros/test.h"
|
#include "shared/test/common/test_macros/test.h"
|
||||||
|
|
||||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
using XeHPAndLaterMockSimulatedCsrHwTests = Test<DeviceFixture>;
|
||||||
|
|
||||||
using XeHPAndLaterMockSimulatedCsrHwTests = Test<ClDeviceFixture>;
|
|
||||||
|
|
||||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterMockSimulatedCsrHwTests, givenLocalMemoryEnabledWhenGlobalMmiosAreInitializedThenLmemIsInitializedAndLmemCfgMmioIsWritten) {
|
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterMockSimulatedCsrHwTests, givenLocalMemoryEnabledWhenGlobalMmiosAreInitializedThenLmemIsInitializedAndLmemCfgMmioIsWritten) {
|
||||||
std::unique_ptr<MockSimulatedCsrHw<FamilyType>> csrSimulatedCommonHw(new MockSimulatedCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
std::unique_ptr<MockSimulatedCsrHw<FamilyType>> csrSimulatedCommonHw(new MockSimulatedCsrHw<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||||
@@ -189,21 +188,21 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterMockSimulatedCsrHwTests, givenAubComman
|
|||||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004DFC, 0x00000000)));
|
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x00004DFC, 0x00000000)));
|
||||||
}
|
}
|
||||||
|
|
||||||
class XeHPAndLaterTileRangeRegisterTest : public ClDeviceFixture, public ::testing::Test {
|
class XeHPAndLaterTileRangeRegisterTest : public DeviceFixture, public ::testing::Test {
|
||||||
public:
|
public:
|
||||||
template <typename FamilyType>
|
template <typename FamilyType>
|
||||||
void setUpImpl() {
|
void setUpImpl() {
|
||||||
hardwareInfo = *defaultHwInfo;
|
hardwareInfo = *defaultHwInfo;
|
||||||
hardwareInfoSetup[hardwareInfo.platform.eProductFamily](&hardwareInfo, true, 0);
|
hardwareInfoSetup[hardwareInfo.platform.eProductFamily](&hardwareInfo, true, 0);
|
||||||
hardwareInfo.gtSystemInfo.MultiTileArchInfo.IsValid = true;
|
hardwareInfo.gtSystemInfo.MultiTileArchInfo.IsValid = true;
|
||||||
ClDeviceFixture::SetUpImpl(&hardwareInfo);
|
DeviceFixture::SetUpImpl(&hardwareInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetUp() override {
|
void SetUp() override {
|
||||||
}
|
}
|
||||||
|
|
||||||
void TearDown() override {
|
void TearDown() override {
|
||||||
ClDeviceFixture::TearDown();
|
DeviceFixture::TearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
void checkMMIOs(MMIOList &list, uint32_t tilesNumber, uint32_t localMemorySizeTotalInGB) {
|
void checkMMIOs(MMIOList &list, uint32_t tilesNumber, uint32_t localMemorySizeTotalInGB) {
|
||||||
@@ -7,6 +7,9 @@
|
|||||||
if(TESTS_GEN12LP)
|
if(TESTS_GEN12LP)
|
||||||
target_sources(neo_shared_tests PRIVATE
|
target_sources(neo_shared_tests PRIVATE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_tests_gen12lp.inl
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw_tests_gen12lp.inl
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/gen12lp_shared_tests_wrapper.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_gen12lp_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_gen12lp_tests.cpp
|
||||||
)
|
)
|
||||||
add_subdirectories()
|
add_subdirectories()
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "shared/source/aub_mem_dump/page_table_entry_bits.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/command_stream/aub_command_stream_receiver_hw.h"
|
||||||
#include "shared/source/os_interface/os_context.h"
|
#include "shared/source/os_interface/os_context.h"
|
||||||
|
#include "shared/test/common/fixtures/device_fixture.h"
|
||||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||||
#include "shared/test/common/helpers/engine_descriptor_helper.h"
|
#include "shared/test/common/helpers/engine_descriptor_helper.h"
|
||||||
#include "shared/test/common/helpers/hw_helper_tests.h"
|
#include "shared/test/common/helpers/hw_helper_tests.h"
|
||||||
@@ -16,11 +17,9 @@
|
|||||||
#include "shared/test/common/mocks/mock_os_context.h"
|
#include "shared/test/common/mocks/mock_os_context.h"
|
||||||
#include "shared/test/common/test_macros/test.h"
|
#include "shared/test/common/test_macros/test.h"
|
||||||
|
|
||||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
|
||||||
|
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
|
|
||||||
using Gen12LPAubCommandStreamReceiverTests = Test<ClDeviceFixture>;
|
using Gen12LPAubCommandStreamReceiverTests = Test<DeviceFixture>;
|
||||||
|
|
||||||
GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenGetGUCWorkQueueItemHeaderIsCalledThenAppropriateValueDependingOnEngineTypeIsReturned) {
|
GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenGetGUCWorkQueueItemHeaderIsCalledThenAppropriateValueDependingOnEngineTypeIsReturned) {
|
||||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||||
@@ -6,16 +6,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "shared/source/command_stream/command_stream_receiver_simulated_hw.h"
|
#include "shared/source/command_stream/command_stream_receiver_simulated_hw.h"
|
||||||
|
#include "shared/test/common/fixtures/device_fixture.h"
|
||||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||||
#include "shared/test/common/mocks/mock_aub_stream.h"
|
#include "shared/test/common/mocks/mock_aub_stream.h"
|
||||||
#include "shared/test/common/mocks/mock_csr_simulated_common_hw.h"
|
#include "shared/test/common/mocks/mock_csr_simulated_common_hw.h"
|
||||||
#include "shared/test/common/test_macros/test.h"
|
#include "shared/test/common/test_macros/test.h"
|
||||||
|
|
||||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
|
||||||
|
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
|
|
||||||
using Gen12LPCommandStreamReceiverSimulatedCommonHwTests = Test<ClDeviceFixture>;
|
using Gen12LPCommandStreamReceiverSimulatedCommonHwTests = Test<DeviceFixture>;
|
||||||
|
|
||||||
GEN12LPTEST_F(Gen12LPCommandStreamReceiverSimulatedCommonHwTests, givenAubCommandStreamReceiverWhewGlobalMmiosAreInitializedThenMOCSRegistersAreConfigured) {
|
GEN12LPTEST_F(Gen12LPCommandStreamReceiverSimulatedCommonHwTests, givenAubCommandStreamReceiverWhewGlobalMmiosAreInitializedThenMOCSRegistersAreConfigured) {
|
||||||
MockSimulatedCsrHw<FamilyType> csrSimulatedCommonHw(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
MockSimulatedCsrHw<FamilyType> csrSimulatedCommonHw(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 Intel Corporation
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "shared/test/unit_test/gen12lp/aub_command_stream_receiver_tests_gen12lp.inl"
|
||||||
|
#include "shared/test/unit_test/gen12lp/command_stream_receiver_simulated_common_hw_tests_gen12lp.inl"
|
||||||
@@ -10,5 +10,13 @@
|
|||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
|
||||||
void MockGmmResourceInfo::setSurfaceFormat() {
|
void MockGmmResourceInfo::setSurfaceFormat() {
|
||||||
|
if (mockResourceCreateParams.Format == GMM_FORMAT_GENERIC_8BIT) {
|
||||||
|
static const NEO::SurfaceFormatInfo surfaceFormatGMM8BITCommon = {GMM_FORMAT_GENERIC_8BIT, GFX3DSTATE_SURFACEFORMAT_R8_UNORM, 0, 1, 1, 1};
|
||||||
|
surfaceFormatInfo = &surfaceFormatGMM8BITCommon;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const NEO::SurfaceFormatInfo surfaceFormatGeneric = {GMM_FORMAT_R8_UINT_TYPE, GFX3DSTATE_SURFACEFORMAT_R8_UINT, 0, 1, 1, 1};
|
||||||
|
surfaceFormatInfo = &surfaceFormatGeneric;
|
||||||
}
|
}
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
if(TESTS_XE_HPC_CORE)
|
if(TESTS_XE_HPC_CORE)
|
||||||
target_sources(neo_shared_tests PRIVATE
|
target_sources(neo_shared_tests PRIVATE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_2_tests_xe_hpc_core.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_xe_hpc_core_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_xe_hpc_core_tests.cpp
|
||||||
)
|
)
|
||||||
add_subdirectories()
|
add_subdirectories()
|
||||||
|
|||||||
Reference in New Issue
Block a user