Move helpers tests to shared

ray tracing tests
engine node helper xehp and later tests
hw helper tests

move shared ult from command queue to helpers

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-11-07 14:46:13 +00:00
committed by Compute-Runtime-Automation
parent 5b11a4a5fa
commit 04a66d2b61
9 changed files with 19 additions and 33 deletions

View File

@ -16,13 +16,11 @@ set(IGDRCL_SRCS_tests_helpers
${CMAKE_CURRENT_SOURCE_DIR}/hardware_commands_helper_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hardware_commands_helper_tests.h
${CMAKE_CURRENT_SOURCE_DIR}/heap_assigner_ocl_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_default_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/kmd_notify_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/memory_properties_helpers_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/mipmap_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/queue_helpers_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ray_tracing_helper_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/sampler_helpers_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/task_information_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/timestamp_packet_1_tests.cpp
@ -34,8 +32,6 @@ set(IGDRCL_SRCS_tests_helpers
if(TESTS_XEHP_AND_LATER)
list(APPEND IGDRCL_SRCS_tests_helpers
${CMAKE_CURRENT_SOURCE_DIR}/aub_helper_hw_tests_xehp_and_later.cpp
${CMAKE_CURRENT_SOURCE_DIR}/engine_node_helper_tests_xehp_and_later.cpp
${CMAKE_CURRENT_SOURCE_DIR}/cl_hw_helper_tests_xehp_and_later.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_xehp_and_later.cpp
)

View File

@ -1,11 +0,0 @@
#
# Copyright (C) 2021-2022 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
target_sources(neo_shared_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/flattened_id_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/local_id_tests.cpp
)

View File

@ -22,17 +22,22 @@ target_sources(neo_shared_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/engine_node_helper_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/extendable_enum_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/file_io_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/flattened_id_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/flush_stamp_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/get_gpgpu_engines_tests.inl
${CMAKE_CURRENT_SOURCE_DIR}/get_info_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hash_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/heap_assigner_shared_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/kernel_helpers_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_default_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests_dg2_or_below.cpp
${CMAKE_CURRENT_SOURCE_DIR}/local_id_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/l3_range_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/kernel_helpers_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/matcher_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/memory_management_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/product_config_helper_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ptr_math_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ray_tracing_helper_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/state_base_address_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/string_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/string_to_hash_tests.cpp
@ -40,7 +45,6 @@ target_sources(neo_shared_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config.cpp
${CMAKE_CURRENT_SOURCE_DIR}/cache_policy_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/timestamp_packet_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests_dg2_or_below.cpp
)
if(MSVC OR COMPILER_SUPPORTS_SSE42)
@ -52,7 +56,11 @@ if(COMPILER_SUPPORTS_NEON)
endif()
if(TESTS_XEHP_AND_LATER)
target_sources(neo_shared_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/test_blit_commands_helper_xehp_and_later.cpp)
target_sources(neo_shared_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/aub_helper_hw_tests_xehp_and_later.cpp
${CMAKE_CURRENT_SOURCE_DIR}/engine_node_helper_tests_xehp_and_later.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_blit_commands_helper_xehp_and_later.cpp
)
endif()
if(TESTS_DG2_AND_LATER)
@ -67,4 +75,4 @@ if(TESTS_PVC_AND_LATER)
)
endif()
add_subdirectories()
add_subdirectories()

View File

@ -9,11 +9,9 @@
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "shared/test/common/test_macros/hw_test.h"
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
using namespace NEO;
using AubHelperHwTestXeHPAndLater = Test<ClDeviceFixture>;
using AubHelperHwTestXeHPAndLater = ::testing::Test;
HWCMDTEST_F(IGFX_XE_HP_CORE, AubHelperHwTestXeHPAndLater, givenAubHelperWhenGetDataHintForPml4EntryIsCalledThenTracePpgttLevel4IsReturned) {
AubHelperHw<FamilyType> aubHelper(true);

View File

@ -6,14 +6,13 @@
*/
#include "shared/source/helpers/engine_node_helper.h"
#include "shared/test/common/fixtures/device_fixture.h"
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "shared/test/common/test_macros/hw_test.h"
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
using namespace NEO;
using EngineNodeHelperTestsXeHPAndLater = ::Test<ClDeviceFixture>;
using EngineNodeHelperTestsXeHPAndLater = ::Test<DeviceFixture>;
HWCMDTEST_F(IGFX_XE_HP_CORE, EngineNodeHelperTestsXeHPAndLater, WhenGetBcsEngineTypeIsCalledThenBcsEngineIsReturned) {
const auto hwInfo = pDevice->getHardwareInfo();
@ -246,4 +245,4 @@ HWTEST2_F(EngineNodeHelperTestsXeHPAndLater, givenEnableCmdQRoundRobindBcsEngine
expectedEngineType = aub_stream::EngineType::ENGINE_BCS3;
}
}
}
}

View File

@ -10,9 +10,6 @@
#include "shared/test/common/mocks/mock_device.h"
#include "shared/test/common/test_macros/test.h"
#include "opencl/test/unit_test/mocks/mock_cl_device.h"
#include "opencl/test/unit_test/mocks/mock_context.h"
using namespace NEO;
TEST(RayTracingHelperTests, whenGetMemoryBackedFifoSizeToPatchIsCalledCorrectValueIsReturned) {
@ -33,17 +30,16 @@ TEST(RayTracingHelperTests, whenMemoryBackedFifoSizeIsRequestedThenCorrectValueI
}
TEST(RayTracingHelperTests, whenGlobalDispatchSizeIsRequestedThenCorrectValueIsReturned) {
MockClDevice device{new MockDevice};
MockContext context(&device);
MockDevice device;
uint32_t maxBvhLevel = 2;
uint32_t extraBytesLocal = 20;
uint32_t extraBytesGlobal = 100;
size_t expectedSize = alignUp(sizeof(RTDispatchGlobals), MemoryConstants::cacheLineSize) +
(RayTracingHelper::hitInfoSize + RayTracingHelper::bvhStackSize * maxBvhLevel + extraBytesLocal) * RayTracingHelper::getNumRtStacks(device.getDevice()) +
(RayTracingHelper::hitInfoSize + RayTracingHelper::bvhStackSize * maxBvhLevel + extraBytesLocal) * RayTracingHelper::getNumRtStacks(device) +
extraBytesGlobal;
size_t size = RayTracingHelper::getDispatchGlobalSize(device.getDevice(), maxBvhLevel, extraBytesLocal, extraBytesGlobal);
size_t size = RayTracingHelper::getDispatchGlobalSize(device, maxBvhLevel, extraBytesLocal, extraBytesGlobal);
EXPECT_EQ(expectedSize, size);
}