diff --git a/opencl/source/helpers/CMakeLists.txt b/opencl/source/helpers/CMakeLists.txt index 2cf5401974..d1a8afb912 100644 --- a/opencl/source/helpers/CMakeLists.txt +++ b/opencl/source/helpers/CMakeLists.txt @@ -62,7 +62,14 @@ if(SUPPORT_PVC_AND_LATER) list(APPEND RUNTIME_SRCS_HELPERS_BASE ${CMAKE_CURRENT_SOURCE_DIR}/cl_hw_helper_pvc_and_later.inl) endif() +set(RUNTIME_SRCS_HELPERS_WINDOWS + ${CMAKE_CURRENT_SOURCE_DIR}/windows/gl_helper.h +) + target_sources(${NEO_STATIC_LIB_NAME} PRIVATE ${RUNTIME_SRCS_HELPERS_BASE}) +if(WIN32) + target_sources(${NEO_STATIC_LIB_NAME} PRIVATE ${RUNTIME_SRCS_HELPERS_WINDOWS}) +endif() set_property(GLOBAL PROPERTY RUNTIME_SRCS_HELPERS_BASE ${RUNTIME_SRCS_HELPERS_BASE}) diff --git a/shared/source/helpers/windows/gl_helper.h b/opencl/source/helpers/windows/gl_helper.h similarity index 100% rename from shared/source/helpers/windows/gl_helper.h rename to opencl/source/helpers/windows/gl_helper.h diff --git a/opencl/source/sharings/gl/windows/gl_sharing_windows.cpp b/opencl/source/sharings/gl/windows/gl_sharing_windows.cpp index 4b3c2f3e14..1ac77026a2 100644 --- a/opencl/source/sharings/gl/windows/gl_sharing_windows.cpp +++ b/opencl/source/sharings/gl/windows/gl_sharing_windows.cpp @@ -7,9 +7,8 @@ #include "opencl/source/sharings/gl/windows/gl_sharing_windows.h" -#include "shared/source/helpers/windows/gl_helper.h" - #include "opencl/source/context/context.inl" +#include "opencl/source/helpers/windows/gl_helper.h" #include "opencl/source/sharings/gl/gl_arb_sync_event.h" namespace NEO { diff --git a/opencl/test/unit_test/CMakeLists.txt b/opencl/test/unit_test/CMakeLists.txt index cbd0a833ea..9ebcfbd4aa 100644 --- a/opencl/test/unit_test/CMakeLists.txt +++ b/opencl/test/unit_test/CMakeLists.txt @@ -85,6 +85,10 @@ if(USE_ASAN) set(GTEST_ENV "LSAN_OPTIONS=suppressions=${CMAKE_CURRENT_SOURCE_DIR}/lsan_suppressions.txt") endif() +if(COMPILER_SUPPORTS_SSE42) + set_source_files_properties(helpers/uint16_sse4_tests.cpp PROPERTIES COMPILE_FLAGS -msse4.2) +endif() + target_link_libraries(igdrcl_tests ${NEO_MOCKABLE_LIB_NAME} ${NEO_SHARED_MOCKABLE_LIB_NAME}) target_link_libraries(igdrcl_tests igdrcl_mocks) diff --git a/opencl/test/unit_test/api/cl_api_tests.h b/opencl/test/unit_test/api/cl_api_tests.h index 61223778b7..713cba0ad7 100644 --- a/opencl/test/unit_test/api/cl_api_tests.h +++ b/opencl/test/unit_test/api/cl_api_tests.h @@ -12,12 +12,12 @@ #include "shared/test/common/helpers/default_hw_info.h" #include "shared/test/common/mocks/mock_device.h" #include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/helpers/ult_limits.h" #include "opencl/source/api/api.h" #include "opencl/source/command_queue/command_queue.h" #include "opencl/source/execution_environment/cl_execution_environment.h" #include "opencl/source/tracing/tracing_api.h" +#include "opencl/test/unit_test/helpers/ult_limits.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" #include "opencl/test/unit_test/mocks/mock_command_queue.h" #include "opencl/test/unit_test/mocks/mock_kernel.h" diff --git a/opencl/test/unit_test/aub_tests/command_queue/aub_enqueue_resource_barrier_xehp_and_later.cpp b/opencl/test/unit_test/aub_tests/command_queue/aub_enqueue_resource_barrier_xehp_and_later.cpp index 403ced9763..2ca0b62fa3 100644 --- a/opencl/test/unit_test/aub_tests/command_queue/aub_enqueue_resource_barrier_xehp_and_later.cpp +++ b/opencl/test/unit_test/aub_tests/command_queue/aub_enqueue_resource_barrier_xehp_and_later.cpp @@ -7,12 +7,12 @@ #include "shared/test/common/mocks/mock_device.h" #include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/helpers/cmd_buffer_validator.h" #include "opencl/source/command_queue/resource_barrier.h" #include "opencl/source/mem_obj/buffer.h" #include "opencl/test/unit_test/aub_tests/fixtures/aub_fixture.h" #include "opencl/test/unit_test/aub_tests/fixtures/hello_world_fixture.h" +#include "opencl/test/unit_test/helpers/cmd_buffer_validator.h" #include "opencl/test/unit_test/mocks/mock_command_queue.h" #include "opencl/test/unit_test/mocks/mock_context.h" diff --git a/opencl/test/unit_test/aub_tests/command_stream/aub_range_based_flush_tests_xehp_and_later.cpp b/opencl/test/unit_test/aub_tests/command_stream/aub_range_based_flush_tests_xehp_and_later.cpp index 06458bc76b..b9c8451d08 100644 --- a/opencl/test/unit_test/aub_tests/command_stream/aub_range_based_flush_tests_xehp_and_later.cpp +++ b/opencl/test/unit_test/aub_tests/command_stream/aub_range_based_flush_tests_xehp_and_later.cpp @@ -13,11 +13,11 @@ #include "shared/test/common/helpers/dispatch_flags_helper.h" #include "shared/test/common/mocks/mock_device.h" #include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/helpers/cmd_buffer_validator.h" #include "opencl/source/mem_obj/buffer.h" #include "opencl/test/unit_test/aub_tests/fixtures/aub_fixture.h" #include "opencl/test/unit_test/aub_tests/fixtures/hello_world_fixture.h" +#include "opencl/test/unit_test/helpers/cmd_buffer_validator.h" #include "opencl/test/unit_test/mocks/mock_command_queue.h" #include "opencl/test/unit_test/mocks/mock_context.h" diff --git a/opencl/test/unit_test/command_queue/command_queue_tests.cpp b/opencl/test/unit_test/command_queue/command_queue_tests.cpp index 8eed8817ed..3ce81eb004 100644 --- a/opencl/test/unit_test/command_queue/command_queue_tests.cpp +++ b/opencl/test/unit_test/command_queue/command_queue_tests.cpp @@ -27,7 +27,6 @@ #include "shared/test/common/mocks/mock_os_context.h" #include "shared/test/common/test_macros/test.h" #include "shared/test/common/test_macros/test_checks_shared.h" -#include "shared/test/unit_test/helpers/raii_hw_helper.h" #include "opencl/source/command_queue/command_queue_hw.h" #include "opencl/source/event/event.h" @@ -42,6 +41,7 @@ #include "opencl/test/unit_test/fixtures/dispatch_flags_fixture.h" #include "opencl/test/unit_test/fixtures/image_fixture.h" #include "opencl/test/unit_test/fixtures/multi_tile_fixture.h" +#include "opencl/test/unit_test/helpers/raii_hw_helper.h" #include "opencl/test/unit_test/mocks/mock_command_queue.h" #include "opencl/test/unit_test/mocks/mock_context.h" #include "opencl/test/unit_test/mocks/mock_event.h" diff --git a/opencl/test/unit_test/command_stream/cache_flush_tests_dg2_and_later.cpp b/opencl/test/unit_test/command_stream/cache_flush_tests_dg2_and_later.cpp index 25d7039350..dd38129cc9 100644 --- a/opencl/test/unit_test/command_stream/cache_flush_tests_dg2_and_later.cpp +++ b/opencl/test/unit_test/command_stream/cache_flush_tests_dg2_and_later.cpp @@ -10,10 +10,10 @@ #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/mocks/mock_csr.h" #include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/helpers/cmd_buffer_validator.h" #include "opencl/source/command_queue/command_queue_hw.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" +#include "opencl/test/unit_test/helpers/cmd_buffer_validator.h" #include "opencl/test/unit_test/helpers/hardware_commands_helper_tests.h" using namespace NEO; diff --git a/opencl/test/unit_test/command_stream/cl_command_stream_receiver_tests.cpp b/opencl/test/unit_test/command_stream/cl_command_stream_receiver_tests.cpp index defdedb6bc..ff42bd634e 100644 --- a/opencl/test/unit_test/command_stream/cl_command_stream_receiver_tests.cpp +++ b/opencl/test/unit_test/command_stream/cl_command_stream_receiver_tests.cpp @@ -10,10 +10,10 @@ #include "shared/test/common/mocks/mock_csr.h" #include "shared/test/common/mocks/mock_hw_helper.h" #include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/helpers/raii_hw_helper.h" #include "opencl/source/mem_obj/buffer.h" #include "opencl/test/unit_test/fixtures/multi_root_device_fixture.h" +#include "opencl/test/unit_test/helpers/raii_hw_helper.h" #include "opencl/test/unit_test/mocks/mock_context.h" #include "gtest/gtest.h" diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_2_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_2_tests.cpp index bc7eaae0f2..779d029c6c 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_2_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_2_tests.cpp @@ -21,9 +21,9 @@ #include "shared/test/common/mocks/mock_hw_helper.h" #include "shared/test/common/mocks/mock_submissions_aggregator.h" #include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/helpers/raii_hw_helper.h" #include "opencl/test/unit_test/fixtures/ult_command_stream_receiver_fixture.h" +#include "opencl/test/unit_test/helpers/raii_hw_helper.h" #include "opencl/test/unit_test/mocks/mock_buffer.h" #include "opencl/test/unit_test/mocks/mock_command_queue.h" #include "opencl/test/unit_test/mocks/mock_event.h" diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp index 2aebe93b69..060a41c08f 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp @@ -18,7 +18,6 @@ #include "shared/test/common/mocks/mock_memory_manager.h" #include "shared/test/common/mocks/mock_timestamp_container.h" #include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/helpers/raii_hw_helper.h" #include "shared/test/unit_test/utilities/base_object_utils.h" #include "opencl/source/event/user_event.h" @@ -27,6 +26,7 @@ #include "opencl/test/unit_test/command_stream/command_stream_receiver_hw_fixture.h" #include "opencl/test/unit_test/fixtures/image_fixture.h" #include "opencl/test/unit_test/fixtures/ult_command_stream_receiver_fixture.h" +#include "opencl/test/unit_test/helpers/raii_hw_helper.h" #include "opencl/test/unit_test/mocks/mock_image.h" #include "opencl/test/unit_test/mocks/mock_kernel.h" diff --git a/opencl/test/unit_test/device/device_caps_tests.cpp b/opencl/test/unit_test/device/device_caps_tests.cpp index 3bd56bb1fb..a5043390d6 100644 --- a/opencl/test/unit_test/device/device_caps_tests.cpp +++ b/opencl/test/unit_test/device/device_caps_tests.cpp @@ -19,10 +19,10 @@ #include "shared/test/common/mocks/mock_execution_environment.h" #include "shared/test/common/mocks/mock_sip.h" #include "shared/test/unit_test/helpers/gtest_helpers.h" -#include "shared/test/unit_test/helpers/raii_hw_helper.h" #include "opencl/source/helpers/cl_hw_helper.h" #include "opencl/test/unit_test/fixtures/device_info_fixture.h" +#include "opencl/test/unit_test/helpers/raii_hw_helper.h" #include "opencl/test/unit_test/mocks/ult_cl_device_factory.h" #include "opencl/test/unit_test/test_macros/test_checks_ocl.h" diff --git a/opencl/test/unit_test/device/device_tests.cpp b/opencl/test/unit_test/device/device_tests.cpp index d79e07be2a..dada61bbcd 100644 --- a/opencl/test/unit_test/device/device_tests.cpp +++ b/opencl/test/unit_test/device/device_tests.cpp @@ -24,10 +24,10 @@ #include "shared/test/common/mocks/ult_device_factory.h" #include "shared/test/common/test_macros/test.h" #include "shared/test/common/test_macros/test_checks_shared.h" -#include "shared/test/unit_test/helpers/raii_hw_helper.h" #include "opencl/source/platform/platform.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" +#include "opencl/test/unit_test/helpers/raii_hw_helper.h" #include "opencl/test/unit_test/mocks/mock_context.h" #include "opencl/test/unit_test/mocks/mock_platform.h" diff --git a/opencl/test/unit_test/device/get_device_info_tests.cpp b/opencl/test/unit_test/device/get_device_info_tests.cpp index ce47fbf822..f4439108cb 100644 --- a/opencl/test/unit_test/device/get_device_info_tests.cpp +++ b/opencl/test/unit_test/device/get_device_info_tests.cpp @@ -10,12 +10,12 @@ #include "shared/test/common/mocks/mock_driver_info.h" #include "shared/test/common/mocks/mock_os_context.h" #include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/helpers/raii_hw_helper.h" #include "opencl/source/cl_device/cl_device_info_map.h" #include "opencl/source/helpers/cl_hw_helper.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" #include "opencl/test/unit_test/fixtures/device_info_fixture.h" +#include "opencl/test/unit_test/helpers/raii_hw_helper.h" #include "opencl/test/unit_test/mocks/mock_command_queue.h" #include "opencl/test/unit_test/mocks/mock_context.h" #include "opencl/test/unit_test/mocks/ult_cl_device_factory.h" diff --git a/opencl/test/unit_test/gen11/enqueue_kernel_gen11.cpp b/opencl/test/unit_test/gen11/enqueue_kernel_gen11.cpp index 08ec52f107..758d6cccab 100644 --- a/opencl/test/unit_test/gen11/enqueue_kernel_gen11.cpp +++ b/opencl/test/unit_test/gen11/enqueue_kernel_gen11.cpp @@ -6,11 +6,11 @@ */ #include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/helpers/static_size3.h" #include "opencl/source/command_queue/command_queue_hw.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" #include "opencl/test/unit_test/helpers/cl_hw_parse.h" +#include "opencl/test/unit_test/helpers/static_size3.h" #include "opencl/test/unit_test/mocks/mock_kernel.h" #include "reg_configs_common.h" diff --git a/opencl/test/unit_test/gen9/enqueue_kernel_gen9.cpp b/opencl/test/unit_test/gen9/enqueue_kernel_gen9.cpp index 4752ac8a26..47c4856184 100644 --- a/opencl/test/unit_test/gen9/enqueue_kernel_gen9.cpp +++ b/opencl/test/unit_test/gen9/enqueue_kernel_gen9.cpp @@ -8,11 +8,11 @@ #include "shared/source/gen9/reg_configs.h" #include "shared/test/common/fixtures/memory_management_fixture.h" #include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/helpers/static_size3.h" #include "opencl/source/command_queue/command_queue_hw.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" #include "opencl/test/unit_test/helpers/cl_hw_parse.h" +#include "opencl/test/unit_test/helpers/static_size3.h" #include "opencl/test/unit_test/mocks/mock_kernel.h" namespace NEO { diff --git a/opencl/test/unit_test/helpers/CMakeLists.txt b/opencl/test/unit_test/helpers/CMakeLists.txt index f6e193ab32..8fac679486 100644 --- a/opencl/test/unit_test/helpers/CMakeLists.txt +++ b/opencl/test/unit_test/helpers/CMakeLists.txt @@ -10,6 +10,8 @@ set(IGDRCL_SRCS_tests_helpers ${CMAKE_CURRENT_SOURCE_DIR}/base_object_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/cl_helper_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/cl_hw_parse.h + ${CMAKE_CURRENT_SOURCE_DIR}/cmd_buffer_validator.h + ${CMAKE_CURRENT_SOURCE_DIR}/cmd_buffer_validator_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/dispatch_info_builder_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/dispatch_info_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/get_info_status_mapper_tests.cpp @@ -20,10 +22,12 @@ set(IGDRCL_SRCS_tests_helpers ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests_dg2_or_below.cpp ${CMAKE_CURRENT_SOURCE_DIR}/kmd_notify_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/memory_management_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/memory_properties_helpers_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/mipmap_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/per_thread_data_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/queue_helpers_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/raii_hw_helper.h ${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 @@ -31,11 +35,18 @@ set(IGDRCL_SRCS_tests_helpers ${CMAKE_CURRENT_SOURCE_DIR}/timestamp_packet_2_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/timestamp_packet_tests.h ${CMAKE_CURRENT_SOURCE_DIR}/transfer_properties_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ult_limits.h ${CMAKE_CURRENT_SOURCE_DIR}/validator_tests.cpp ${NEO_SHARED_TEST_DIRECTORY}/common/helpers/aligned_memory_tests.cpp ${NEO_SHARED_TEST_DIRECTORY}/common/helpers/debug_manager_state_restore.h ) +if(MSVC OR COMPILER_SUPPORTS_SSE42) + list(APPEND IGDRCL_SRCS_tests_helpers + ${CMAKE_CURRENT_SOURCE_DIR}/uint16_sse4_tests.cpp + ) +endif() + if(TESTS_XEHP_AND_LATER) list(APPEND IGDRCL_SRCS_tests_helpers ${CMAKE_CURRENT_SOURCE_DIR}/aub_helper_hw_tests_xehp_and_later.cpp diff --git a/shared/test/unit_test/helpers/cmd_buffer_validator.h b/opencl/test/unit_test/helpers/cmd_buffer_validator.h similarity index 100% rename from shared/test/unit_test/helpers/cmd_buffer_validator.h rename to opencl/test/unit_test/helpers/cmd_buffer_validator.h diff --git a/shared/test/unit_test/helpers/cmd_buffer_validator_tests.cpp b/opencl/test/unit_test/helpers/cmd_buffer_validator_tests.cpp similarity index 99% rename from shared/test/unit_test/helpers/cmd_buffer_validator_tests.cpp rename to opencl/test/unit_test/helpers/cmd_buffer_validator_tests.cpp index 8c0bd2a981..c819b4e007 100644 --- a/shared/test/unit_test/helpers/cmd_buffer_validator_tests.cpp +++ b/opencl/test/unit_test/helpers/cmd_buffer_validator_tests.cpp @@ -7,7 +7,8 @@ #include "shared/test/common/cmd_parse/hw_parse.h" #include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/helpers/cmd_buffer_validator.h" + +#include "opencl/test/unit_test/helpers/cmd_buffer_validator.h" using HwParseTest = ::testing::Test; diff --git a/opencl/test/unit_test/helpers/linux/CMakeLists.txt b/opencl/test/unit_test/helpers/linux/CMakeLists.txt new file mode 100644 index 0000000000..7873c0bb7f --- /dev/null +++ b/opencl/test/unit_test/helpers/linux/CMakeLists.txt @@ -0,0 +1,15 @@ +# +# Copyright (C) 2019-2022 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +if(UNIX) + set(IGDRCL_SRCS_tests_helpers_linux + ${CMAKE_CURRENT_SOURCE_DIR}/kmd_notify_linux_tests.cpp + ) + + target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_helpers_linux}) + add_subdirectories() + set_property(GLOBAL PROPERTY IGDRCL_SRCS_tests_helpers_linux ${IGDRCL_SRCS_tests_helpers_linux}) +endif() diff --git a/shared/test/unit_test/helpers/linux/kmd_notify_linux_tests.cpp b/opencl/test/unit_test/helpers/linux/kmd_notify_linux_tests.cpp similarity index 100% rename from shared/test/unit_test/helpers/linux/kmd_notify_linux_tests.cpp rename to opencl/test/unit_test/helpers/linux/kmd_notify_linux_tests.cpp diff --git a/shared/test/unit_test/helpers/memory_management_tests.cpp b/opencl/test/unit_test/helpers/memory_management_tests.cpp similarity index 100% rename from shared/test/unit_test/helpers/memory_management_tests.cpp rename to opencl/test/unit_test/helpers/memory_management_tests.cpp diff --git a/shared/test/unit_test/helpers/raii_hw_helper.h b/opencl/test/unit_test/helpers/raii_hw_helper.h similarity index 100% rename from shared/test/unit_test/helpers/raii_hw_helper.h rename to opencl/test/unit_test/helpers/raii_hw_helper.h diff --git a/shared/test/unit_test/helpers/static_size3.h b/opencl/test/unit_test/helpers/static_size3.h similarity index 100% rename from shared/test/unit_test/helpers/static_size3.h rename to opencl/test/unit_test/helpers/static_size3.h diff --git a/shared/test/unit_test/helpers/uint16_sse4_tests.cpp b/opencl/test/unit_test/helpers/uint16_sse4_tests.cpp similarity index 100% rename from shared/test/unit_test/helpers/uint16_sse4_tests.cpp rename to opencl/test/unit_test/helpers/uint16_sse4_tests.cpp diff --git a/shared/test/unit_test/helpers/ult_limits.h b/opencl/test/unit_test/helpers/ult_limits.h similarity index 100% rename from shared/test/unit_test/helpers/ult_limits.h rename to opencl/test/unit_test/helpers/ult_limits.h diff --git a/opencl/test/unit_test/helpers/windows/CMakeLists.txt b/opencl/test/unit_test/helpers/windows/CMakeLists.txt new file mode 100644 index 0000000000..c0f75b181e --- /dev/null +++ b/opencl/test/unit_test/helpers/windows/CMakeLists.txt @@ -0,0 +1,17 @@ +# +# Copyright (C) 2019-2022 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +if(WIN32) + set(IGDRCL_SRCS_tests_helpers_windows + ${CMAKE_CURRENT_SOURCE_DIR}/kmd_notify_windows_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gl_helper_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mock_function.h + ${CMAKE_CURRENT_SOURCE_DIR}/mock_function.cpp + ) + + target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_helpers_windows}) + add_subdirectories() +endif() diff --git a/shared/test/unit_test/helpers/windows/gl_helper_tests.cpp b/opencl/test/unit_test/helpers/windows/gl_helper_tests.cpp similarity index 93% rename from shared/test/unit_test/helpers/windows/gl_helper_tests.cpp rename to opencl/test/unit_test/helpers/windows/gl_helper_tests.cpp index b3e24d2712..0aa639d4bc 100644 --- a/shared/test/unit_test/helpers/windows/gl_helper_tests.cpp +++ b/opencl/test/unit_test/helpers/windows/gl_helper_tests.cpp @@ -5,11 +5,12 @@ * */ -#include "shared/source/helpers/windows/gl_helper.h" #include "shared/source/os_interface/os_library.h" #include "shared/source/os_interface/windows/windows_wrapper.h" #include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/helpers/windows/mock_function.h" + +#include "opencl/source/helpers/windows/gl_helper.h" +#include "opencl/test/unit_test/helpers/windows/mock_function.h" #include "gtest/gtest.h" diff --git a/shared/test/unit_test/helpers/windows/kmd_notify_windows_tests.cpp b/opencl/test/unit_test/helpers/windows/kmd_notify_windows_tests.cpp similarity index 100% rename from shared/test/unit_test/helpers/windows/kmd_notify_windows_tests.cpp rename to opencl/test/unit_test/helpers/windows/kmd_notify_windows_tests.cpp diff --git a/shared/test/unit_test/helpers/windows/mock_function.cpp b/opencl/test/unit_test/helpers/windows/mock_function.cpp similarity index 100% rename from shared/test/unit_test/helpers/windows/mock_function.cpp rename to opencl/test/unit_test/helpers/windows/mock_function.cpp diff --git a/shared/test/unit_test/helpers/windows/mock_function.h b/opencl/test/unit_test/helpers/windows/mock_function.h similarity index 100% rename from shared/test/unit_test/helpers/windows/mock_function.h rename to opencl/test/unit_test/helpers/windows/mock_function.h diff --git a/opencl/test/unit_test/kernel/cache_flush_tests.inl b/opencl/test/unit_test/kernel/cache_flush_tests.inl index 883f19b28b..a39ddc48c2 100644 --- a/opencl/test/unit_test/kernel/cache_flush_tests.inl +++ b/opencl/test/unit_test/kernel/cache_flush_tests.inl @@ -15,15 +15,15 @@ #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/mocks/mock_allocation_properties.h" #include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/helpers/cmd_buffer_validator.h" -#include "shared/test/unit_test/helpers/static_size3.h" #include "opencl/source/command_queue/command_queue_hw.h" #include "opencl/source/command_queue/gpgpu_walker.h" #include "opencl/source/command_queue/resource_barrier.h" #include "opencl/source/helpers/hardware_commands_helper.h" #include "opencl/test/unit_test/fixtures/hello_world_fixture.h" +#include "opencl/test/unit_test/helpers/cmd_buffer_validator.h" #include "opencl/test/unit_test/helpers/hardware_commands_helper_tests.h" +#include "opencl/test/unit_test/helpers/static_size3.h" #include "opencl/test/unit_test/mocks/mock_command_queue.h" using namespace NEO; diff --git a/opencl/test/unit_test/kernel/cache_flush_xehp_and_later_tests.inl b/opencl/test/unit_test/kernel/cache_flush_xehp_and_later_tests.inl index 67691cd7fc..5a1cadccbf 100644 --- a/opencl/test/unit_test/kernel/cache_flush_xehp_and_later_tests.inl +++ b/opencl/test/unit_test/kernel/cache_flush_xehp_and_later_tests.inl @@ -11,11 +11,11 @@ #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/mocks/mock_allocation_properties.h" #include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/helpers/cmd_buffer_validator.h" -#include "shared/test/unit_test/helpers/static_size3.h" #include "opencl/test/unit_test/fixtures/hello_world_fixture.h" +#include "opencl/test/unit_test/helpers/cmd_buffer_validator.h" #include "opencl/test/unit_test/helpers/hardware_commands_helper_tests.h" +#include "opencl/test/unit_test/helpers/static_size3.h" #include "opencl/test/unit_test/mocks/mock_command_queue.h" using namespace NEO; diff --git a/opencl/test/unit_test/mem_obj/image2d_from_buffer_tests.cpp b/opencl/test/unit_test/mem_obj/image2d_from_buffer_tests.cpp index 2399292ad9..c2a0345e49 100644 --- a/opencl/test/unit_test/mem_obj/image2d_from_buffer_tests.cpp +++ b/opencl/test/unit_test/mem_obj/image2d_from_buffer_tests.cpp @@ -10,13 +10,13 @@ #include "shared/source/helpers/hw_helper.h" #include "shared/test/common/mocks/mock_gmm.h" #include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/helpers/raii_hw_helper.h" #include "opencl/source/cl_device/cl_device_info_map.h" #include "opencl/source/helpers/cl_memory_properties_helpers.h" #include "opencl/source/mem_obj/buffer.h" #include "opencl/source/mem_obj/image.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" +#include "opencl/test/unit_test/helpers/raii_hw_helper.h" #include "opencl/test/unit_test/mocks/mock_context.h" #include "opencl/test/unit_test/test_macros/test_checks_ocl.h" diff --git a/opencl/test/unit_test/memory_manager/memory_manager_tests.cpp b/opencl/test/unit_test/memory_manager/memory_manager_tests.cpp index 751c9b8a7d..ce122c773f 100644 --- a/opencl/test/unit_test/memory_manager/memory_manager_tests.cpp +++ b/opencl/test/unit_test/memory_manager/memory_manager_tests.cpp @@ -36,7 +36,6 @@ #include "shared/test/common/mocks/mock_os_context.h" #include "shared/test/common/test_macros/test.h" #include "shared/test/unit_test/compiler_interface/linker_mock.h" -#include "shared/test/unit_test/helpers/raii_hw_helper.h" #include "opencl/source/event/event.h" #include "opencl/source/helpers/dispatch_info.h" @@ -48,6 +47,7 @@ #include "opencl/source/program/program.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" #include "opencl/test/unit_test/fixtures/multi_root_device_fixture.h" +#include "opencl/test/unit_test/helpers/raii_hw_helper.h" #include "opencl/test/unit_test/mocks/mock_context.h" #include "opencl/test/unit_test/mocks/mock_kernel.h" #include "opencl/test/unit_test/mocks/mock_mdi.h" diff --git a/opencl/test/unit_test/mock_gl/windows/CMakeLists.txt b/opencl/test/unit_test/mock_gl/windows/CMakeLists.txt index e16109791a..a113522c01 100644 --- a/opencl/test/unit_test/mock_gl/windows/CMakeLists.txt +++ b/opencl/test/unit_test/mock_gl/windows/CMakeLists.txt @@ -8,7 +8,7 @@ if(WIN32) set(IGDRCL_SRCS_mock_opengl32 ${CMAKE_CURRENT_SOURCE_DIR}/mock_opengl32.cpp ${CMAKE_CURRENT_SOURCE_DIR}/mock_opengl32.def - ${NEO_SOURCE_DIR}/shared/test/unit_test/helpers/windows/mock_function.cpp + ${NEO_SOURCE_DIR}/opencl/test/unit_test/helpers/windows/mock_function.cpp ) add_library(mock_opengl32 SHARED ${IGDRCL_SRCS_mock_opengl32}) diff --git a/opencl/test/unit_test/mock_gl/windows/mock_opengl32.cpp b/opencl/test/unit_test/mock_gl/windows/mock_opengl32.cpp index 274f38b3e7..7c9fba8202 100644 --- a/opencl/test/unit_test/mock_gl/windows/mock_opengl32.cpp +++ b/opencl/test/unit_test/mock_gl/windows/mock_opengl32.cpp @@ -7,8 +7,7 @@ #define _GDI32_ //It causes that definitions of functions are not loaded from dll in file wingdi.h because they are in this file. -#include "shared/test/unit_test/helpers/windows/mock_function.h" - +#include "opencl/test/unit_test/helpers/windows/mock_function.h" #include "opencl/test/unit_test/mocks/gl/windows/mock_gl_sharing_windows.h" #include "GL/gl.h" diff --git a/opencl/test/unit_test/mocks/mock_program.cpp b/opencl/test/unit_test/mocks/mock_program.cpp index 8c237e553a..31fd497ab6 100644 --- a/opencl/test/unit_test/mocks/mock_program.cpp +++ b/opencl/test/unit_test/mocks/mock_program.cpp @@ -15,10 +15,10 @@ #include "shared/test/common/mocks/mock_compiler_interface.h" #include "shared/test/common/mocks/mock_compilers.h" #include "shared/test/common/mocks/mock_graphics_allocation.h" -#include "shared/test/unit_test/helpers/ult_limits.h" #include "opencl/source/context/context.h" #include "opencl/source/program/create.inl" +#include "opencl/test/unit_test/helpers/ult_limits.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" namespace NEO { diff --git a/opencl/test/unit_test/mt_tests/api/cl_intel_tracing_tests_mt.inl b/opencl/test/unit_test/mt_tests/api/cl_intel_tracing_tests_mt.inl index 72a6d4759a..8fc73f699a 100644 --- a/opencl/test/unit_test/mt_tests/api/cl_intel_tracing_tests_mt.inl +++ b/opencl/test/unit_test/mt_tests/api/cl_intel_tracing_tests_mt.inl @@ -7,12 +7,12 @@ #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/test_macros/test.h" -#include "shared/test/unit_test/helpers/ult_limits.h" #include "opencl/source/cl_device/cl_device.h" #include "opencl/source/tracing/tracing_api.h" #include "opencl/source/tracing/tracing_notify.h" #include "opencl/test/unit_test/fixtures/platform_fixture.h" +#include "opencl/test/unit_test/helpers/ult_limits.h" using namespace NEO; diff --git a/shared/source/CMakeLists.txt b/shared/source/CMakeLists.txt index ee4ba33e83..435b372890 100644 --- a/shared/source/CMakeLists.txt +++ b/shared/source/CMakeLists.txt @@ -145,7 +145,7 @@ append_sources_from_properties(CORE_SOURCES if(WIN32) append_sources_from_properties(CORE_SOURCES NEO_CORE_GMM_HELPER_WINDOWS - NEO_CORE_HELPERS_WINDOWS + NEO_CORE_HELPERS_GMM_CALLBACKS_WINDOWS NEO_CORE_DIRECT_SUBMISSION_WINDOWS NEO_CORE_OS_INTERFACE_WINDOWS NEO_CORE_OS_INTERFACE_WDDM @@ -167,7 +167,7 @@ else() ) if(NOT DISABLE_WDDM_LINUX) append_sources_from_properties(CORE_SOURCES - NEO_CORE_HELPERS_WINDOWS + NEO_CORE_HELPERS_GMM_CALLBACKS_WINDOWS NEO_CORE_SRCS_HELPERS_WINDOWS NEO_CORE_GMM_HELPER_WINDOWS NEO_CORE_OS_INTERFACE_WDDM diff --git a/shared/source/helpers/CMakeLists.txt b/shared/source/helpers/CMakeLists.txt index 90cd1b8ec7..ba45490538 100644 --- a/shared/source/helpers/CMakeLists.txt +++ b/shared/source/helpers/CMakeLists.txt @@ -155,15 +155,14 @@ if(SUPPORT_PVC_AND_LATER) ) endif() -set(NEO_CORE_HELPERS_WINDOWS - ${CMAKE_CURRENT_SOURCE_DIR}/windows/gl_helper.h +set(NEO_CORE_HELPERS_GMM_CALLBACKS_WINDOWS ${CMAKE_CURRENT_SOURCE_DIR}/windows/gmm_callbacks.cpp ${CMAKE_CURRENT_SOURCE_DIR}/windows/gmm_callbacks.h ${CMAKE_CURRENT_SOURCE_DIR}/windows/gmm_callbacks.inl ${CMAKE_CURRENT_SOURCE_DIR}/windows/gmm_callbacks_tgllp_and_later.inl ) -set_property(GLOBAL PROPERTY NEO_CORE_HELPERS_WINDOWS ${NEO_CORE_HELPERS_WINDOWS}) +set_property(GLOBAL PROPERTY NEO_CORE_HELPERS_GMM_CALLBACKS_WINDOWS ${NEO_CORE_HELPERS_GMM_CALLBACKS_WINDOWS}) set_property(GLOBAL PROPERTY NEO_CORE_HELPERS ${NEO_CORE_HELPERS}) add_subdirectories() diff --git a/shared/test/unit_test/CMakeLists.txt b/shared/test/unit_test/CMakeLists.txt index d2fb95376c..432c657de1 100644 --- a/shared/test/unit_test/CMakeLists.txt +++ b/shared/test/unit_test/CMakeLists.txt @@ -43,7 +43,6 @@ if(NOT NEO_SKIP_UNIT_TESTS) target_include_directories(${TARGET_NAME} PRIVATE ${NEO_SHARED_TEST_DIRECTORY}/common/test_configuration/unit_tests ${ENGINE_NODE_DIR} - ${KHRONOS_GL_HEADERS_DIR} ${NEO_SHARED_TEST_DIRECTORY}/common/test_macros/header${BRANCH_DIR_SUFFIX} ${NEO_SHARED_TEST_DIRECTORY}/common/helpers/includes${BRANCH_DIR_SUFFIX} ) @@ -65,10 +64,6 @@ if(NOT NEO_SKIP_UNIT_TESTS) ) endif() - if(COMPILER_SUPPORTS_SSE42) - set_source_files_properties(helpers/uint16_sse4_tests.cpp PROPERTIES COMPILE_FLAGS -msse4.2) - endif() - add_subdirectory(${NEO_SHARED_TEST_DIRECTORY}/common "${NEO_BUILD_DIR}/shared/test/common") add_subdirectory_unique(mocks) diff --git a/shared/test/unit_test/helpers/CMakeLists.txt b/shared/test/unit_test/helpers/CMakeLists.txt index 8c5ff86bad..8255f8f5ea 100644 --- a/shared/test/unit_test/helpers/CMakeLists.txt +++ b/shared/test/unit_test/helpers/CMakeLists.txt @@ -10,8 +10,6 @@ set(IGDRCL_SRCS_tests_helpers ${CMAKE_CURRENT_SOURCE_DIR}/array_count_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/basic_math_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/bit_helpers_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cmd_buffer_validator.h - ${CMAKE_CURRENT_SOURCE_DIR}/cmd_buffer_validator_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/compiler_hw_info_config_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/debug_helpers_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/deferred_deleter_helpers_tests.cpp @@ -22,21 +20,11 @@ set(IGDRCL_SRCS_tests_helpers ${CMAKE_CURRENT_SOURCE_DIR}/get_info_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/gtest_helpers.h ${CMAKE_CURRENT_SOURCE_DIR}/l3_range_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/memory_management_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/ptr_math_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/raii_hw_helper.h - ${CMAKE_CURRENT_SOURCE_DIR}/static_size3.h ${CMAKE_CURRENT_SOURCE_DIR}/test_debug_variables.inl ${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ult_limits.h ) -if(MSVC OR COMPILER_SUPPORTS_SSE42) - list(APPEND IGDRCL_SRCS_tests_helpers - ${CMAKE_CURRENT_SOURCE_DIR}/uint16_sse4_tests.cpp - ) -endif() - if(COMPILER_SUPPORTS_NEON) list(APPEND IGDRCL_SRCS_tests_helpers ${CMAKE_CURRENT_SOURCE_DIR}/uint16_neon_tests.cpp diff --git a/shared/test/unit_test/helpers/linux/CMakeLists.txt b/shared/test/unit_test/helpers/linux/CMakeLists.txt deleted file mode 100644 index 05cf728a06..0000000000 --- a/shared/test/unit_test/helpers/linux/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -# -# Copyright (C) 2019-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(UNIX) - target_sources(${TARGET_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/kmd_notify_linux_tests.cpp - ) - - add_subdirectories() -endif() diff --git a/shared/test/unit_test/helpers/windows/CMakeLists.txt b/shared/test/unit_test/helpers/windows/CMakeLists.txt deleted file mode 100644 index b92d811e19..0000000000 --- a/shared/test/unit_test/helpers/windows/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2019-2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(WIN32) - target_sources(${TARGET_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/gl_helper_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/kmd_notify_windows_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/mock_function.h - ${CMAKE_CURRENT_SOURCE_DIR}/mock_function.cpp - ) - - add_subdirectories() -endif()