From e053f3a83949fa3edfc309925983df1177014efc Mon Sep 17 00:00:00 2001 From: "Chodor, Jaroslaw" Date: Sun, 26 May 2024 14:46:04 +0000 Subject: [PATCH] feature: Add support for legacy acronyms in ocloc's ids query Expands support for deprecated acronyms to ids query. Additionally, this commit changes default devices for legacy acronyms. Related-To: NEO-10190 Signed-off-by: Chodor, Jaroslaw --- cmake/common_macros.cmake | 17 ++++- cmake/run_aub_test_target.cmake | 10 ++- cmake/run_ult_target.cmake | 28 ++++--- cmake/setup_platform_flags.cmake | 6 +- .../test/common/test_modules/CMakeLists.txt | 9 ++- .../test/common/test_modules/gen_kernel.cmake | 22 +++--- .../gen12lp/test_device_gen12lp.cpp | 7 +- .../sources/debugger/test_l0_debugger_1.cpp | 3 +- opencl/test/unit_test/CMakeLists.txt | 74 ++++++++++--------- .../helpers/test_preamble_xehp_and_later.cpp | 20 ++++- .../unit_test/offline_compiler/CMakeLists.txt | 7 +- .../test_cl_device_caps_xe_hpg_core.cpp | 3 +- .../source/offline_compiler.cpp | 12 ++- .../enable_compiler_product_helper_arl.cpp | 6 ++ .../enable_compiler_product_helper_dg2.cpp | 2 +- .../enable_compiler_product_helper_mtl.cpp | 8 +- .../xe_lpg/compiler_product_helper_xe_lpg.inl | 9 +-- shared/test/common/common_main.cpp | 13 ++++ .../test/common/mocks/mock_memory_manager.h | 1 + shared/test/common/test_files/CMakeLists.txt | 12 +-- .../unit_test/helpers/hw_aot_config_tests.cpp | 3 +- ...m_additional_apater_info_options_tests.cpp | 3 +- .../compute_mode_tests_xe_hpg_core.cpp | 54 +++++++++++--- .../dg2/gfx_core_helper_tests_dg2.cpp | 5 +- .../dg2/memory_manager_tests_dg2.cpp | 14 +++- .../dg2/product_config_helper_tests_dg2.cpp | 7 +- ...s_agnostic_product_helper_xe_lpg_tests.cpp | 6 +- .../xe_hpg_core/arl/enable_arl_testing.cmake | 4 +- .../xe_hpg_core/dg2/enable_dg2_testing.cmake | 4 +- .../xe_hpg_core/mtl/enable_mtl_testing.cmake | 4 +- 30 files changed, 253 insertions(+), 120 deletions(-) diff --git a/cmake/common_macros.cmake b/cmake/common_macros.cmake index c2e74a235f..27c924867b 100644 --- a/cmake/common_macros.cmake +++ b/cmake/common_macros.cmake @@ -1,5 +1,5 @@ # -# Copyright (C) 2018-2023 Intel Corporation +# Copyright (C) 2018-2024 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -84,3 +84,18 @@ macro(append_sources_from_properties list_name) list(APPEND ${list_name} ${${name}}) endforeach() endmacro() + +function(parse_revision_config config default_device out_device out_revision_id) + string(REPLACE "/" ";" config_as_list ${config}) + list(LENGTH config_as_list config_entries) + if(${config_entries} EQUAL 2) + list(GET config_as_list 0 device_id) + list(GET config_as_list 1 revision_id) + set(${out_device} ${device_id} PARENT_SCOPE) + set(${out_revision_id} ${revision_id} PARENT_SCOPE) + else() + list(GET config_as_list 0 revision_id) + set(${out_device} ${default_device} PARENT_SCOPE) + set(${out_revision_id} ${revision_id} PARENT_SCOPE) + endif() +endfunction() diff --git a/cmake/run_aub_test_target.cmake b/cmake/run_aub_test_target.cmake index d44a8d0aa7..e0075e493b 100644 --- a/cmake/run_aub_test_target.cmake +++ b/cmake/run_aub_test_target.cmake @@ -10,6 +10,12 @@ list(GET aub_test_config 1 slices) list(GET aub_test_config 2 subslices) list(GET aub_test_config 3 eu_per_ss) list(GET aub_test_config 4 revision_id) +list(LENGTH aub_test_config aub_test_config_num_entries) +if(${aub_test_config_num_entries} GREATER_EQUAL 6) + list(GET aub_test_config 5 device_id) +else() + set(device_id 0) +endif() if(NOT TARGET aub_tests) add_custom_target(aub_tests) @@ -84,7 +90,7 @@ if(TARGET igdrcl_aub_tests) POST_BUILD COMMAND WORKING_DIRECTORY ${TargetDir} COMMAND echo Running AUB generation for ${product} in ${TargetDir}/${product}_aub - COMMAND ${aub_test_cmd_prefix} --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} --gtest_repeat=1 ${aub_tests_options} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_OUTPUT} --rev_id ${revision_id} + COMMAND ${aub_test_cmd_prefix} --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} --gtest_repeat=1 ${aub_tests_options} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_OUTPUT} --rev_id ${revision_id} --dev_id ${device_id} ) endif() @@ -108,7 +114,7 @@ if(TARGET ze_intel_gpu_aub_tests) POST_BUILD COMMAND WORKING_DIRECTORY ${TargetDir} COMMAND echo Running Level Zero AUB generation for ${product} in ${TargetDir}/${product}_aub - COMMAND ${l0_aub_test_cmd_prefix} --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} --gtest_repeat=1 ${aub_tests_options} ${GTEST_OUTPUT} --rev_id ${revision_id} + COMMAND ${l0_aub_test_cmd_prefix} --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} --gtest_repeat=1 ${aub_tests_options} ${GTEST_OUTPUT} --rev_id ${revision_id} --dev_id ${device_id} ) endif() diff --git a/cmake/run_ult_target.cmake b/cmake/run_ult_target.cmake index e5d1f82688..f1d05e1bf7 100644 --- a/cmake/run_ult_target.cmake +++ b/cmake/run_ult_target.cmake @@ -10,6 +10,12 @@ list(GET unit_test_config 1 slices) list(GET unit_test_config 2 subslices) list(GET unit_test_config 3 eu_per_ss) list(GET unit_test_config 4 revision_id) +list(LENGTH unit_test_config unit_test_config_num_entries) +if(${unit_test_config_num_entries} GREATER_EQUAL 6) + list(GET unit_test_config 5 device_id) +else() + set(device_id 0) +endif() if(NOT NEO_SKIP_SHARED_UNIT_TESTS) unset(GTEST_OUTPUT) @@ -31,9 +37,9 @@ if(NOT NEO_SKIP_SHARED_UNIT_TESTS) POST_BUILD COMMAND WORKING_DIRECTORY ${TargetDir} COMMAND echo Running neo_shared_tests ${target} ${slices}x${subslices}x${eu_per_ss} in ${TargetDir} - COMMAND echo Cmd line: $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${GTEST_OUTPUT} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} + COMMAND echo Cmd line: $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${GTEST_OUTPUT} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} --dev_id ${device_id} COMMAND ${CMAKE_COMMAND} -E make_directory ${TargetDir}/shared/${product}/${revision_id} - COMMAND ${NEO_RUN_INTERCEPTOR_LIST} $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${GTEST_OUTPUT} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} + COMMAND ${NEO_RUN_INTERCEPTOR_LIST} $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${GTEST_OUTPUT} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} --dev_id ${device_id} ) add_dependencies(run_shared_tests run_${product}_${revision_id}_shared_tests) @@ -60,8 +66,8 @@ if(NOT NEO_SKIP_OCL_UNIT_TESTS) POST_BUILD COMMAND WORKING_DIRECTORY ${TargetDir} COMMAND echo Running igdrcl_tests ${target} ${slices}x${subslices}x${eu_per_ss} in ${TargetDir} - COMMAND echo Cmd line: ${GTEST_ENV} ${NEO_RUN_INTERCEPTOR_LIST} $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${GTEST_OUTPUT} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} - COMMAND ${GTEST_ENV} ${NEO_RUN_INTERCEPTOR_LIST} $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${GTEST_OUTPUT} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} + COMMAND echo Cmd line: ${GTEST_ENV} ${NEO_RUN_INTERCEPTOR_LIST} $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${GTEST_OUTPUT} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} --dev_id ${device_id} + COMMAND ${GTEST_ENV} ${NEO_RUN_INTERCEPTOR_LIST} $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${GTEST_OUTPUT} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} --dev_id ${device_id} ) if(WIN32 AND ${CMAKE_BUILD_TYPE} STREQUAL "Debug" AND "${IGDRCL_OPTION__BITS}" STREQUAL "64" AND APPVERIFIER_ALLOWED) @@ -74,7 +80,7 @@ if(NOT NEO_SKIP_OCL_UNIT_TESTS) POST_BUILD COMMAND WORKING_DIRECTORY ${TargetDir} COMMAND echo Running igdrcl_tests with App Verifier - COMMAND ${NEO_SOURCE_DIR}/scripts/verify.bat $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} ${GTEST_OUTPUT} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} + COMMAND ${NEO_SOURCE_DIR}/scripts/verify.bat $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} ${GTEST_OUTPUT} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} --dev_id ${device_id} COMMAND echo App Verifier returned: %errorLevel% ) endif() @@ -120,14 +126,14 @@ if(NOT NEO_SKIP_L0_UNIT_TESTS AND BUILD_WITH_L0) COMMAND echo create working directory ${TargetDir}/level_zero/${product}/${revision_id} COMMAND ${CMAKE_COMMAND} -E make_directory ${TargetDir}/level_zero/${product}/${revision_id} COMMAND echo Running ze_intel_gpu_core_tests ${target} ${slices}x${subslices}x${eu_per_ss} in ${TargetDir} - COMMAND echo Cmd line: ${NEO_RUN_INTERCEPTOR_LIST} $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${GTEST_OUTPUT_CORE} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} - COMMAND ${NEO_RUN_INTERCEPTOR_LIST} $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${GTEST_OUTPUT_CORE} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} + COMMAND echo Cmd line: ${NEO_RUN_INTERCEPTOR_LIST} $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${GTEST_OUTPUT_CORE} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} --dev_id ${device_id} + COMMAND ${NEO_RUN_INTERCEPTOR_LIST} $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${GTEST_OUTPUT_CORE} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} --dev_id ${device_id} COMMAND echo Running ze_intel_gpu_tools_tests ${target} ${slices}x${subslices}x${eu_per_ss} in ${TargetDir} - COMMAND echo Cmd line: ${NEO_RUN_INTERCEPTOR_LIST} $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${GTEST_OUTPUT_CORE} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} - COMMAND ${NEO_RUN_INTERCEPTOR_LIST} $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${GTEST_OUTPUT_TOOLS} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} + COMMAND echo Cmd line: ${NEO_RUN_INTERCEPTOR_LIST} $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${GTEST_OUTPUT_CORE} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} --dev_id ${device_id} + COMMAND ${NEO_RUN_INTERCEPTOR_LIST} $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${GTEST_OUTPUT_TOOLS} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} --dev_id ${device_id} COMMAND echo Running ze_intel_gpu_sysman_tests ${target} ${slices}x${subslices}x${eu_per_ss} in ${TargetDir} - COMMAND echo Cmd line: ${NEO_RUN_INTERCEPTOR_LIST} $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${GTEST_OUTPUT_CORE} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} - COMMAND ${NEO_RUN_INTERCEPTOR_LIST} $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${GTEST_OUTPUT_SYSMAN} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} + COMMAND echo Cmd line: ${NEO_RUN_INTERCEPTOR_LIST} $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${GTEST_OUTPUT_CORE} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} --dev_id ${device_id} + COMMAND ${NEO_RUN_INTERCEPTOR_LIST} $ --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${GTEST_OUTPUT_SYSMAN} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id} --dev_id ${device_id} ) add_dependencies(run_l0_tests run_${product}_${revision_id}_l0_tests) diff --git a/cmake/setup_platform_flags.cmake b/cmake/setup_platform_flags.cmake index 6fc18e0716..d3e238c928 100644 --- a/cmake/setup_platform_flags.cmake +++ b/cmake/setup_platform_flags.cmake @@ -317,7 +317,7 @@ if(SUPPORT_XE_HPG_CORE) if(SUPPORT_MTL) ADD_AOT_DEFINITION(XE_LPG) ADD_AOT_DEFINITION(MTL) - set(MTL_XE_HPG_CORE_REVISIONS 0) + set(MTL_XE_HPG_CORE_REVISIONS 0x7D40/0) set(MTL_XE_HPG_CORE_RELEASES "12.70.0" "12.70.4" "12.71.0" "12.71.4") ADD_PRODUCT("SUPPORTED" "MTL" "IGFX_METEORLAKE") ADD_PLATFORM_FOR_CORE_TYPE("SUPPORTED" "XE_HPG_CORE" "MTL") @@ -331,7 +331,7 @@ if(SUPPORT_XE_HPG_CORE) if(SUPPORT_DG2) ADD_AOT_DEFINITION(XE_HPG) ADD_AOT_DEFINITION(DG2) - set(DG2_XE_HPG_CORE_REVISIONS 0) + set(DG2_XE_HPG_CORE_REVISIONS 0x4F80/0) set(DG2_XE_HPG_CORE_RELEASES "12.55.0" "12.55.1" "12.55.4" "12.55.8" "12.56.0" "12.56.4" "12.56.5" "12.57.0") ADD_PRODUCT("SUPPORTED" "DG2" "IGFX_DG2") ADD_PLATFORM_FOR_CORE_TYPE("SUPPORTED" "XE_HPG_CORE" "DG2") @@ -345,7 +345,7 @@ if(SUPPORT_XE_HPG_CORE) if(SUPPORT_ARL) ADD_AOT_DEFINITION(XE_LPGPLUS) ADD_AOT_DEFINITION(ARL) - set(ARL_XE_HPG_CORE_REVISIONS 0) + set(ARL_XE_HPG_CORE_REVISIONS 0x7D41/0) set(ARL_XE_HPG_CORE_RELEASES "12.74.0" "12.74.4") ADD_PRODUCT("SUPPORTED" "ARL" "IGFX_ARROWLAKE") ADD_PLATFORM_FOR_CORE_TYPE("SUPPORTED" "XE_HPG_CORE" "ARL") diff --git a/level_zero/core/test/common/test_modules/CMakeLists.txt b/level_zero/core/test/common/test_modules/CMakeLists.txt index f39d8de95e..25eff0041a 100644 --- a/level_zero/core/test/common/test_modules/CMakeLists.txt +++ b/level_zero/core/test/common/test_modules/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2023 Intel Corporation +# Copyright (C) 2023-2024 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -22,12 +22,13 @@ set(TEST_KERNEL_BINDLESS ) macro(macro_for_each_platform) - foreach(REVISION_ID ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) - level_zero_generate_kernels(l0_test_kernel_outputs ${PLATFORM_IT_LOWER} ${REVISION_ID} "-g" ${TEST_MODULES}) + foreach(REVISION_CONFIG ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) + parse_revision_config(${REVISION_CONFIG} ${PLATFORM_IT_LOWER} DEVICE_ID REVISION_ID) + level_zero_generate_kernels(l0_test_kernel_outputs ${PLATFORM_IT_LOWER} ${DEVICE_ID} ${REVISION_ID} "-g" ${TEST_MODULES}) #skip Gen8 bindless kernel generation if(NOT ("${CORE_TYPE_LOWER}" STREQUAL "gen8")) - level_zero_generate_kernels_with_internal_options(l0_bindless_test_kernel_outputs ${PLATFORM_IT_LOWER} "bindless" ${REVISION_ID} "-g" ${TEST_KERNEL_BINDLESS_internal_options} ${TEST_KERNEL_BINDLESS}) + level_zero_generate_kernels_with_internal_options(l0_bindless_test_kernel_outputs ${PLATFORM_IT_LOWER} "bindless" ${DEVICE_ID} ${REVISION_ID} "-g" ${TEST_KERNEL_BINDLESS_internal_options} ${TEST_KERNEL_BINDLESS}) endif() endforeach() endmacro() diff --git a/level_zero/core/test/common/test_modules/gen_kernel.cmake b/level_zero/core/test/common/test_modules/gen_kernel.cmake index 92903758af..3b04f5f966 100644 --- a/level_zero/core/test/common/test_modules/gen_kernel.cmake +++ b/level_zero/core/test/common/test_modules/gen_kernel.cmake @@ -1,10 +1,10 @@ # -# Copyright (C) 2020-2023 Intel Corporation +# Copyright (C) 2020-2024 Intel Corporation # # SPDX-License-Identifier: MIT # -function(level_zero_generate_kernels target_list platform_name revision_id options) +function(level_zero_generate_kernels target_list platform_name device revision_id options) list(APPEND results copy_compiler_files) @@ -18,7 +18,8 @@ function(level_zero_generate_kernels target_list platform_name revision_id optio get_filename_component(workdir ${filepath} DIRECTORY) get_filename_component(absolute_filepath ${filepath} ABSOLUTE) - set(outputpath_base "${outputdir}${basename}_${platform_name}") + set(outputname_base "${basename}_${platform_name}") + set(outputpath_base "${outputdir}${outputname_base}") if(NOT NEO_DISABLE_BUILTINS_COMPILATION) set(output_files ${outputpath_base}.bin @@ -26,9 +27,9 @@ function(level_zero_generate_kernels target_list platform_name revision_id optio ) add_custom_command( - COMMAND echo generate ${ocloc_cmd_prefix} -q -file ${absolute_filepath} -device ${platform_name} -out_dir ${outputdir} -revision_id ${revision_id} -options "${options}" + COMMAND echo generate ${ocloc_cmd_prefix} -q -file ${absolute_filepath} -device ${device} -out_dir ${outputdir} -output_no_suffix -output ${outputname_base} -revision_id ${revision_id} -options "${options}" OUTPUT ${output_files} - COMMAND ${ocloc_cmd_prefix} -q -file ${absolute_filepath} -device ${platform_name} -out_dir ${outputdir} -revision_id ${revision_id} -options "${options}" + COMMAND ${ocloc_cmd_prefix} -q -file ${absolute_filepath} -device ${device} -out_dir ${outputdir} -output_no_suffix -output ${outputname_base} -revision_id ${revision_id} -options "${options}" WORKING_DIRECTORY ${workdir} DEPENDS ${filepath} ocloc ) @@ -51,7 +52,7 @@ function(level_zero_generate_kernels target_list platform_name revision_id optio set(${target_list} ${${target_list}} PARENT_SCOPE) endfunction() -function(level_zero_generate_kernels_with_internal_options target_list platform_name prefix revision_id options internal_options) +function(level_zero_generate_kernels_with_internal_options target_list platform_name prefix device revision_id options internal_options) list(APPEND results copy_compiler_files) @@ -65,7 +66,8 @@ function(level_zero_generate_kernels_with_internal_options target_list platform_ get_filename_component(workdir ${filepath} DIRECTORY) get_filename_component(absolute_filepath ${filepath} ABSOLUTE) - set(outputpath_base "${outputdir}${prefix}_${basename}_${platform_name}") + set(outputname_base "${prefix}_${basename}_${platform_name}") + set(outputpath_base "${outputdir}${outputname_base}") if(NOT NEO_DISABLE_BUILTINS_COMPILATION) set(output_files @@ -73,12 +75,10 @@ function(level_zero_generate_kernels_with_internal_options target_list platform_ ${outputpath_base}.spv ) - set(output_name "-output" "${prefix}_${basename}") - add_custom_command( - COMMAND echo generate ${ocloc_cmd_prefix} -q -file ${absolute_filepath} -device ${platform_name} -out_dir ${outputdir} ${output_name} -revision_id ${revision_id} -options ${options} -internal_options "$" , workdir is ${workdir} + COMMAND echo generate ${ocloc_cmd_prefix} -q -file ${absolute_filepath} -device ${device} -out_dir ${outputdir} -output_no_suffix -output ${outputname_base} -revision_id ${revision_id} -options ${options} -internal_options "$" , workdir is ${workdir} OUTPUT ${output_files} - COMMAND ${ocloc_cmd_prefix} -q -file ${absolute_filepath} -device ${platform_name} -out_dir ${outputdir} ${output_name} -revision_id ${revision_id} -options ${options} -internal_options "$" + COMMAND ${ocloc_cmd_prefix} -q -file ${absolute_filepath} -device ${device} -out_dir ${outputdir} -output_no_suffix -output ${outputname_base} -revision_id ${revision_id} -options ${options} -internal_options "$" WORKING_DIRECTORY ${workdir} DEPENDS ${filepath} ocloc VERBATIM diff --git a/level_zero/core/test/unit_tests/gen12lp/test_device_gen12lp.cpp b/level_zero/core/test/unit_tests/gen12lp/test_device_gen12lp.cpp index 7829f5585a..a9a41c6538 100644 --- a/level_zero/core/test/unit_tests/gen12lp/test_device_gen12lp.cpp +++ b/level_zero/core/test/unit_tests/gen12lp/test_device_gen12lp.cpp @@ -1,11 +1,12 @@ /* - * Copyright (C) 2020-2023 Intel Corporation + * Copyright (C) 2020-2024 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/os_interface/product_helper.h" +#include "shared/source/release_helper/release_helper.h" #include "shared/test/common/mocks/mock_device.h" #include "shared/test/common/test_macros/hw_test.h" @@ -37,10 +38,12 @@ HWTEST2_F(DeviceFixtureGen12LP, GivenTargetGen12LPWhenGettingDpSupportThenReturn ze_result_t res = device->getKernelProperties(&deviceModProps); EXPECT_EQ(res, ZE_RESULT_SUCCESS); + auto expDpas = this->neoDevice->getReleaseHelper()->isDotProductAccumulateSystolicSupported(); + bool dp4a = moduleDpProps.flags & ZE_INTEL_DEVICE_MODULE_EXP_FLAG_DP4A; bool dpas = moduleDpProps.flags & ZE_INTEL_DEVICE_MODULE_EXP_FLAG_DPAS; EXPECT_TRUE(dp4a); - EXPECT_FALSE(dpas); + EXPECT_EQ(expDpas, dpas); } using CommandQueueGroupTest = Test; diff --git a/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_1.cpp b/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_1.cpp index 77ce49832f..c3e025ca4d 100644 --- a/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_1.cpp +++ b/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_1.cpp @@ -641,7 +641,8 @@ HWTEST2_F(L0DebuggerTest, givenNotXeHpOrXeHpgCoreAndDebugIsActiveThenDisableL3Ca } HWTEST2_F(L0DebuggerTest, givenDebugIsActiveThenDisableL3CacheInGmmHelperIsSet, IsDG2) { - EXPECT_TRUE(static_cast(neoDevice->getGmmHelper())->allResourcesUncached); + bool disableL3CacheForDebug = neoDevice->getProductHelper().disableL3CacheForDebug(neoDevice->getHardwareInfo()); + EXPECT_EQ(disableL3CacheForDebug, static_cast(neoDevice->getGmmHelper())->allResourcesUncached); } INSTANTIATE_TEST_CASE_P(SBAModesForDebugger, L0DebuggerParameterizedTests, ::testing::Values(0, 1)); diff --git a/opencl/test/unit_test/CMakeLists.txt b/opencl/test/unit_test/CMakeLists.txt index b9c2a7ac00..683b2bd0eb 100644 --- a/opencl/test/unit_test/CMakeLists.txt +++ b/opencl/test/unit_test/CMakeLists.txt @@ -129,7 +129,7 @@ target_include_directories(igdrcl_tests BEFORE PRIVATE ${NEO_SHARED_TEST_DIRECTORY}/common/helpers/includes${BRANCH_DIR_SUFFIX} ) -function(neo_gen_kernels platform_it_lower revision_id forcePatchtokenFormat) +function(neo_gen_kernels platform_it_lower device revision_id forcePatchtokenFormat) set(outputdir "${TargetDir}/${platform_it_lower}/${revision_id}/test_files/${NEO_ARCH}/") if(forcePatchtokenFormat) @@ -143,7 +143,8 @@ function(neo_gen_kernels platform_it_lower revision_id forcePatchtokenFormat) get_filename_component(workdir ${filepath} DIRECTORY) get_filename_component(absolute_filepath ${filepath} ABSOLUTE) - set(outputpath_base "${outputdir}${basename}_${platform_it_lower}") + set(outputname_base "${basename}_${platform_it_lower}") + set(outputpath_base "${outputdir}${outputname_base}") if(NOT NEO_DISABLE_BUILTINS_COMPILATION) set(output_files ${outputpath_base}.spv @@ -152,7 +153,7 @@ function(neo_gen_kernels platform_it_lower revision_id forcePatchtokenFormat) add_custom_command( OUTPUT ${output_files} - COMMAND ${ocloc_cmd_prefix} -q -file ${absolute_filepath} -device ${platform_it_lower} -${NEO_BITS} -revision_id ${revision_id} -out_dir ${outputdir} ${formatArgument} + COMMAND ${ocloc_cmd_prefix} -q -file ${absolute_filepath} -device ${device} -${NEO_BITS} -revision_id ${revision_id} -out_dir ${outputdir} ${formatArgument} -output_no_suffix -output ${outputname_base} WORKING_DIRECTORY ${workdir} DEPENDS ${filepath} ocloc ) @@ -175,7 +176,7 @@ function(neo_gen_kernels platform_it_lower revision_id forcePatchtokenFormat) set(kernels_to_compile_${platform_it_lower}_${revision_id} ${kernels_to_compile_${platform_it_lower}_${revision_id}} PARENT_SCOPE) endfunction() -function(neo_gen_kernels_with_options platform_it_lower revision_id filepath) +function(neo_gen_kernels_with_options platform_it_lower device revision_id filepath) set(kernels_to_compile) foreach(filearg ${filepath}) get_filename_component(filename ${filearg} NAME) @@ -189,7 +190,8 @@ function(neo_gen_kernels_with_options platform_it_lower revision_id filepath) foreach(arg ${ARGN}) string(REPLACE " " "_" argwospaces ${arg}) set(base_filename ${basename}_${argwospaces}) - set(outputpath_base "${outputdir}/${base_filename}_${platform_it_lower}") + set(outputname_base "${base_filename}_${platform_it_lower}") + set(outputpath_base "${outputdir}/${outputname_base}") if(NOT NEO_DISABLE_BUILTINS_COMPILATION) set(output_files ${outputpath_base}.spv @@ -198,7 +200,7 @@ function(neo_gen_kernels_with_options platform_it_lower revision_id filepath) add_custom_command( OUTPUT ${output_files} - COMMAND ${ocloc_cmd_prefix} -file ${absolute_filepath} -device ${platform_it_lower} -${NEO_BITS} -out_dir ${outputdir} -revision_id ${revision_id} -options ${arg} -output ${base_filename} + COMMAND ${ocloc_cmd_prefix} -file ${absolute_filepath} -device ${device} -${NEO_BITS} -out_dir ${outputdir} -output_no_suffix -output ${outputname_base} -revision_id ${revision_id} -options ${arg} WORKING_DIRECTORY ${workdir} DEPENDS ${filearg} ocloc ) @@ -221,7 +223,7 @@ function(neo_gen_kernels_with_options platform_it_lower revision_id filepath) set(kernels_to_compile_${platform_it_lower}_${revision_id} ${kernels_to_compile_${platform_it_lower}_${revision_id}} PARENT_SCOPE) endfunction() -function(neo_gen_kernels_with_internal_options platform_it_lower revision_id filepath output_name_prefix) +function(neo_gen_kernels_with_internal_options platform_it_lower device revision_id filepath output_name_prefix) set(kernels_to_compile) set(filearg ${filepath}) @@ -237,20 +239,17 @@ function(neo_gen_kernels_with_internal_options platform_it_lower revision_id fil set(basename ${output_name_prefix}_${basename}) endif() - set(outputpath_base "${outputdir}/${basename}_${platform_it_lower}") + set(outputname_base "${basename}_${platform_it_lower}") + set(outputpath_base "${outputdir}/${outputname_base}") if(NOT NEO_DISABLE_BUILTINS_COMPILATION) set(output_files ${outputpath_base}.spv ${outputpath_base}.bin ) - if(NOT "${output_name_prefix}" STREQUAL "") - set(output_name -output ${basename}) - endif() - add_custom_command( OUTPUT ${output_files} - COMMAND ${ocloc_cmd_prefix} -file ${absolute_filepath} -device ${platform_it_lower} -revision_id ${revision_id} -${NEO_BITS} -out_dir ${outputdir} ${output_name} -internal_options ${ARGN} + COMMAND ${ocloc_cmd_prefix} -file ${absolute_filepath} -device ${device} -revision_id ${revision_id} -${NEO_BITS} -out_dir ${outputdir} -output_no_suffix -output ${outputname_base} -internal_options ${ARGN} WORKING_DIRECTORY ${workdir} DEPENDS ${filearg} ocloc ) @@ -351,37 +350,42 @@ macro(macro_for_each_platform) endforeach() if(MSVC OR CMAKE_SIZEOF_VOID_P EQUAL 8) - foreach(REVISION_ID ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) - neo_gen_kernels(${PLATFORM_IT_LOWER} ${REVISION_ID} FALSE ${PLATFORM_TEST_KERNELS}) - neo_gen_kernels_with_options(${PLATFORM_IT_LOWER} ${REVISION_ID} ${TEST_KERNEL} ${TEST_KERNEL_options}) + foreach(REVISION_CONFIG ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) + parse_revision_config(${REVISION_CONFIG} ${PLATFORM_IT_LOWER} DEVICE_ID REVISION_ID) + neo_gen_kernels(${PLATFORM_IT_LOWER} ${DEVICE_ID} ${REVISION_ID} FALSE ${PLATFORM_TEST_KERNELS}) + neo_gen_kernels_with_options(${PLATFORM_IT_LOWER} ${DEVICE_ID} ${REVISION_ID} ${TEST_KERNEL} ${TEST_KERNEL_options}) endforeach() #compile gen specific kernels if any were found file(GLOB_RECURSE ${CORE_TYPE_LOWER}_TEST_KERNELS test_files/*.${CORE_TYPE_LOWER}) if(NOT "${${CORE_TYPE_LOWER}_TEST_KERNELS}" STREQUAL "") - foreach(REVISION_ID ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) - neo_gen_kernels(${PLATFORM_IT_LOWER} ${REVISION_ID} FALSE ${${CORE_TYPE_LOWER}_TEST_KERNELS}) + foreach(REVISION_CONFIG ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) + parse_revision_config(${REVISION_CONFIG} ${PLATFORM_IT_LOWER} DEVICE_ID REVISION_ID) + neo_gen_kernels(${PLATFORM_IT_LOWER} ${DEVICE_ID} ${REVISION_ID} FALSE ${${CORE_TYPE_LOWER}_TEST_KERNELS}) endforeach() endif() # Compile platform specific kernels if any were found file(GLOB_RECURSE ${PLATFORM_IT_LOWER}_TEST_KERNELS test_files/*.${PLATFORM_IT_LOWER}) if(NOT "${${PLATFORM_IT_LOWER}_TEST_KERNELS}" STREQUAL "") - foreach(REVISION_ID ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) - neo_gen_kernels(${PLATFORM_IT_LOWER} ${REVISION_ID} FALSE ${${PLATFORM_IT_LOWER}_TEST_KERNELS}) + foreach(REVISION_CONFIG ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) + parse_revision_config(${REVISION_CONFIG} ${PLATFORM_IT_LOWER} DEVICE_ID REVISION_ID) + neo_gen_kernels(${PLATFORM_IT_LOWER} ${DEVICE_ID} ${REVISION_ID} FALSE ${${PLATFORM_IT_LOWER}_TEST_KERNELS}) endforeach() endif() # Gen9lp needs extra -m32 flag if(("${CORE_TYPE_LOWER}" STREQUAL "gen9") AND (("${PLATFORM_IT_LOWER}" STREQUAL "bxt") OR ("${PLATFORM_IT_LOWER}" STREQUAL "glk"))) - foreach(REVISION_ID ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) - neo_gen_kernels_with_internal_options(${PLATFORM_IT_LOWER} ${REVISION_ID} ${TEST_KERNEL_PRINTF} "" ${TEST_KERNEL_PRINTF_internal_options_gen9lp}) - neo_gen_kernels_with_internal_options(${PLATFORM_IT_LOWER} ${REVISION_ID} ${TEST_KERNEL_STATELESS} "" ${TEST_KERNEL_STATELESS_internal_options_gen9lp}) + foreach(REVISION_CONFIG ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) + parse_revision_config(${REVISION_CONFIG} ${PLATFORM_IT_LOWER} DEVICE_ID REVISION_ID) + neo_gen_kernels_with_internal_options(${PLATFORM_IT_LOWER} ${DEVICE_ID} ${REVISION_ID} ${TEST_KERNEL_PRINTF} "" ${TEST_KERNEL_PRINTF_internal_options_gen9lp}) + neo_gen_kernels_with_internal_options(${PLATFORM_IT_LOWER} ${DEVICE_ID} ${REVISION_ID} ${TEST_KERNEL_STATELESS} "" ${TEST_KERNEL_STATELESS_internal_options_gen9lp}) endforeach() else() - foreach(REVISION_ID ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) - neo_gen_kernels_with_internal_options(${PLATFORM_IT_LOWER} ${REVISION_ID} ${TEST_KERNEL_PRINTF} "" " ") - neo_gen_kernels_with_internal_options(${PLATFORM_IT_LOWER} ${REVISION_ID} ${TEST_KERNEL_STATELESS} "" ${TEST_KERNEL_STATELESS_internal_options}) + foreach(REVISION_CONFIG ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) + parse_revision_config(${REVISION_CONFIG} ${PLATFORM_IT_LOWER} DEVICE_ID REVISION_ID) + neo_gen_kernels_with_internal_options(${PLATFORM_IT_LOWER} ${DEVICE_ID} ${REVISION_ID} ${TEST_KERNEL_PRINTF} "" " ") + neo_gen_kernels_with_internal_options(${PLATFORM_IT_LOWER} ${DEVICE_ID} ${REVISION_ID} ${TEST_KERNEL_STATELESS} "" ${TEST_KERNEL_STATELESS_internal_options}) endforeach() endif() @@ -391,26 +395,30 @@ macro(macro_for_each_platform) endif() foreach(file ${TEST_KERNEL_BINDLESS} ${BINDLESS_KERNELS_IMAGES}) - foreach(REVISION_ID ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) + foreach(REVISION_CONFIG ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) + parse_revision_config(${REVISION_CONFIG} ${PLATFORM_IT_LOWER} DEVICE_ID REVISION_ID) if(NOT ("${CORE_TYPE_LOWER}" STREQUAL "gen8")) - neo_gen_kernels_with_internal_options(${PLATFORM_IT_LOWER} ${REVISION_ID} ${file} "bindless" ${TEST_KERNEL_BINDLESS_internal_options}) + neo_gen_kernels_with_internal_options(${PLATFORM_IT_LOWER} ${DEVICE_ID} ${REVISION_ID} ${file} "bindless" ${TEST_KERNEL_BINDLESS_internal_options}) endif() endforeach() endforeach() if(PLATFORM_2_0_LOWER) - foreach(REVISION_ID ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) - neo_gen_kernels_with_options(${PLATFORM_IT_LOWER} ${REVISION_ID} "${TEST_KERNEL_2_0}" ${TEST_KERNEL_2_0_options}) + foreach(REVISION_CONFIG ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) + parse_revision_config(${REVISION_CONFIG} ${PLATFORM_IT_LOWER} DEVICE_ID REVISION_ID) + neo_gen_kernels_with_options(${PLATFORM_IT_LOWER} ${DEVICE_ID} ${REVISION_ID} "${TEST_KERNEL_2_0}" ${TEST_KERNEL_2_0_options}) endforeach() endif() if(PLATFORM_VME_LOWER) - foreach(REVISION_ID ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) - neo_gen_kernels(${PLATFORM_IT_LOWER} ${REVISION_ID} TRUE ${TEST_KERNEL_VME}) + foreach(REVISION_CONFIG ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) + parse_revision_config(${REVISION_CONFIG} ${PLATFORM_IT_LOWER} DEVICE_ID REVISION_ID) + neo_gen_kernels(${PLATFORM_IT_LOWER} ${DEVICE_ID} ${REVISION_ID} TRUE ${TEST_KERNEL_VME}) endforeach() endif() endif() - foreach(REVISION_ID ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) + foreach(REVISION_CONFIG ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) + parse_revision_config(${REVISION_CONFIG} ${PLATFORM_IT_LOWER} DEVICE_ID REVISION_ID) add_custom_target(prepare_test_kernels_${PLATFORM_IT_LOWER}_${REVISION_ID} DEPENDS ${kernels_to_compile_${PLATFORM_IT_LOWER}_${REVISION_ID}} copy_compiler_files) add_dependencies(prepare_test_kernels_for_ocl prepare_test_kernels_${PLATFORM_IT_LOWER}_${REVISION_ID}) set_target_properties(prepare_test_kernels_${PLATFORM_IT_LOWER}_${REVISION_ID} PROPERTIES FOLDER "${PLATFORM_SPECIFIC_TEST_TARGETS_FOLDER}/${PLATFORM_IT_LOWER}/${REVISION_ID}") diff --git a/opencl/test/unit_test/helpers/test_preamble_xehp_and_later.cpp b/opencl/test/unit_test/helpers/test_preamble_xehp_and_later.cpp index f7097d8ee7..37288ce5ec 100644 --- a/opencl/test/unit_test/helpers/test_preamble_xehp_and_later.cpp +++ b/opencl/test/unit_test/helpers/test_preamble_xehp_and_later.cpp @@ -416,9 +416,23 @@ HWTEST2_F(PipelineSelectTest, WhenProgramPipelineSelectThenProperMaskIsSet, IsWi MockExecutionEnvironment mockExecutionEnvironment{}; auto &rootDeviceEnvironment = *mockExecutionEnvironment.rootDeviceEnvironments[0]; - PIPELINE_SELECT cmd = FamilyType::cmdInitPipelineSelect; - LinearStream pipelineSelectStream(&cmd, sizeof(cmd)); + std::vector linearStreamBackingMemory; + size_t sizeNeededForCommandSream = 0; + if (MemorySynchronizationCommands::isBarrierPriorToPipelineSelectWaRequired(rootDeviceEnvironment)) { + PipeControlArgs args; + args.csStallOnly = true; + args.renderTargetCacheFlushEnable = true; + sizeNeededForCommandSream += MemorySynchronizationCommands::getSizeForSingleBarrier(args.tlbInvalidation); + } + + sizeNeededForCommandSream += sizeof(PIPELINE_SELECT); + linearStreamBackingMemory.resize(linearStreamBackingMemory.size() + sizeNeededForCommandSream); + + PIPELINE_SELECT *cmd = reinterpret_cast(linearStreamBackingMemory.data() + linearStreamBackingMemory.size() - sizeof(PIPELINE_SELECT)); + *cmd = FamilyType::cmdInitPipelineSelect; + + LinearStream pipelineSelectStream(linearStreamBackingMemory.data(), linearStreamBackingMemory.size()); PipelineSelectArgs pipelineArgs = {}; pipelineArgs.systolicPipelineSelectSupport = PreambleHelper::isSystolicModeConfigurable(rootDeviceEnvironment); @@ -434,5 +448,5 @@ HWTEST2_F(PipelineSelectTest, WhenProgramPipelineSelectThenProperMaskIsSet, IsWi expectedMask |= pipelineSelectSystolicModeEnableMaskBits; } - EXPECT_EQ(expectedMask, cmd.getMaskBits()); + EXPECT_EQ(expectedMask, cmd->getMaskBits()); } diff --git a/opencl/test/unit_test/offline_compiler/CMakeLists.txt b/opencl/test/unit_test/offline_compiler/CMakeLists.txt index e2334fb2ef..c52a89e0a0 100644 --- a/opencl/test/unit_test/offline_compiler/CMakeLists.txt +++ b/opencl/test/unit_test/offline_compiler/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2018-2023 Intel Corporation +# Copyright (C) 2018-2024 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -157,10 +157,11 @@ endif() macro(macro_for_each_platform) if("${PLATFORM_IT_LOWER}" STREQUAL "${CLOC_LIB_DEFAULT_DEVICE}") - list(GET ${PLATFORM_IT}_${CORE_TYPE}_REVISIONS 0 REVISION_ID) + list(GET ${PLATFORM_IT}_${CORE_TYPE}_REVISIONS 0 REVISION_CONFIG) + parse_revision_config(${REVISION_CONFIG} ${PLATFORM_IT_LOWER} DEVICE_ID REVISION_ID) add_dependencies(run_ocloc_tests prepare_test_kernels_${PLATFORM_IT_LOWER}_${REVISION_ID}) add_dependencies(unit_tests prepare_test_kernels_${PLATFORM_IT_LOWER}_${REVISION_ID}) - set(run_tests_cmd ocloc_tests --device ${PLATFORM_IT_LOWER} --rev_id ${REVISION_ID}) + set(run_tests_cmd ocloc_tests --device ${DEVICE_ID} --rev_id ${REVISION_ID}) endif() endmacro() macro(macro_for_each_core_type) diff --git a/opencl/test/unit_test/xe_hpg_core/test_cl_device_caps_xe_hpg_core.cpp b/opencl/test/unit_test/xe_hpg_core/test_cl_device_caps_xe_hpg_core.cpp index b37521e76e..ecccdf6706 100644 --- a/opencl/test/unit_test/xe_hpg_core/test_cl_device_caps_xe_hpg_core.cpp +++ b/opencl/test/unit_test/xe_hpg_core/test_cl_device_caps_xe_hpg_core.cpp @@ -37,7 +37,8 @@ XE_HPG_CORETEST_F(XeHpgCoreClDeviceCaps, giveDeviceExtensionsWhenDeviceCapsIniti bool expectMatrixMultiplyAccumulateExtensions = compilerProductHelper.isMatrixMultiplyAccumulateSupported(releaseHelper); EXPECT_EQ(expectMatrixMultiplyAccumulateExtensions, hasSubstr(caps.deviceExtensions, std::string("cl_intel_subgroup_matrix_multiply_accumulate"))); - EXPECT_EQ(expectMatrixMultiplyAccumulateExtensions, hasSubstr(caps.deviceExtensions, std::string("cl_intel_subgroup_split_matrix_multiply_accumulate"))); + bool expectSpliyMatrixMultiplyAccumulateExtensions = compilerProductHelper.isSplitMatrixMultiplyAccumulateSupported(releaseHelper); + EXPECT_EQ(expectSpliyMatrixMultiplyAccumulateExtensions, hasSubstr(caps.deviceExtensions, std::string("cl_intel_subgroup_split_matrix_multiply_accumulate"))); bool expectBFloat16ConversionsExtension = compilerProductHelper.isBFloat16ConversionSupported(releaseHelper); EXPECT_EQ(expectBFloat16ConversionsExtension, hasSubstr(caps.deviceExtensions, std::string("cl_intel_bfloat16_conversions"))); diff --git a/shared/offline_compiler/source/offline_compiler.cpp b/shared/offline_compiler/source/offline_compiler.cpp index 73545047f7..1825aba91e 100644 --- a/shared/offline_compiler/source/offline_compiler.cpp +++ b/shared/offline_compiler/source/offline_compiler.cpp @@ -423,9 +423,15 @@ int OfflineCompiler::queryAcronymIds(size_t numArgs, const std::vectorprintf("Error: Invalid command line. Unknown acronym %s.\n", allArgs[2].c_str()); - retVal = OCLOC_INVALID_COMMAND_LINE; - return retVal; + auto hwInfoDepAcr = getHwInfoForDeprecatedAcronym(queryAcronym); + if (nullptr != hwInfoDepAcr) { + auto compilerProductHelper = NEO::CompilerProductHelper::create(hwInfoDepAcr->platform.eProductFamily); + matchedVersions.push_back(ProductConfigHelper::parseMajorMinorRevisionValue(compilerProductHelper->getDefaultHwIpVersion())); + } else { + helper->printf("Error: Invalid command line. Unknown acronym %s.\n", allArgs[2].c_str()); + retVal = OCLOC_INVALID_COMMAND_LINE; + return retVal; + } } std::ostringstream os; diff --git a/shared/source/xe_hpg_core/enable_compiler_product_helper_arl.cpp b/shared/source/xe_hpg_core/enable_compiler_product_helper_arl.cpp index 7bd9f12381..bb9343c642 100644 --- a/shared/source/xe_hpg_core/enable_compiler_product_helper_arl.cpp +++ b/shared/source/xe_hpg_core/enable_compiler_product_helper_arl.cpp @@ -12,6 +12,11 @@ constexpr auto gfxProduct = IGFX_ARROWLAKE; #include "shared/source/xe_hpg_core/xe_lpg/compiler_product_helper_xe_lpg.inl" namespace NEO { +template <> +uint32_t CompilerProductHelperHw::getDefaultHwIpVersion() const { + return AOT::XE_LPGPLUS_B0; +} + template <> uint32_t CompilerProductHelperHw::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const { if (hwInfo.ipVersion.value) { @@ -43,5 +48,6 @@ uint32_t CompilerProductHelperHw::getProductConfigFromHwInfo(const H } return getDefaultHwIpVersion(); } + } // namespace NEO static NEO::EnableCompilerProductHelper enableCompilerProductHelperARL; diff --git a/shared/source/xe_hpg_core/enable_compiler_product_helper_dg2.cpp b/shared/source/xe_hpg_core/enable_compiler_product_helper_dg2.cpp index 4e8dcaea68..d7b3b4661a 100644 --- a/shared/source/xe_hpg_core/enable_compiler_product_helper_dg2.cpp +++ b/shared/source/xe_hpg_core/enable_compiler_product_helper_dg2.cpp @@ -28,7 +28,7 @@ uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo & template <> uint32_t CompilerProductHelperHw::getDefaultHwIpVersion() const { - return AOT::DG2_G10_A0; + return AOT::DG2_G10_C0; } template <> diff --git a/shared/source/xe_hpg_core/enable_compiler_product_helper_mtl.cpp b/shared/source/xe_hpg_core/enable_compiler_product_helper_mtl.cpp index c4a49ab58d..b0fb6bf092 100644 --- a/shared/source/xe_hpg_core/enable_compiler_product_helper_mtl.cpp +++ b/shared/source/xe_hpg_core/enable_compiler_product_helper_mtl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2023 Intel Corporation + * Copyright (C) 2022-2024 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,6 +12,11 @@ constexpr auto gfxProduct = IGFX_METEORLAKE; #include "shared/source/xe_hpg_core/xe_lpg/compiler_product_helper_xe_lpg.inl" namespace NEO { +template <> +uint32_t CompilerProductHelperHw::getDefaultHwIpVersion() const { + return AOT::MTL_M_B0; +} + template <> uint32_t CompilerProductHelperHw::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const { if (hwInfo.ipVersion.value) { @@ -54,6 +59,7 @@ uint32_t CompilerProductHelperHw::getProductConfigFromHwInfo(const H } return getDefaultHwIpVersion(); } + } // namespace NEO static NEO::EnableCompilerProductHelper enableCompilerProductHelperMTL; diff --git a/shared/source/xe_hpg_core/xe_lpg/compiler_product_helper_xe_lpg.inl b/shared/source/xe_hpg_core/xe_lpg/compiler_product_helper_xe_lpg.inl index b21e8b518f..fc3a230b98 100644 --- a/shared/source/xe_hpg_core/xe_lpg/compiler_product_helper_xe_lpg.inl +++ b/shared/source/xe_hpg_core/xe_lpg/compiler_product_helper_xe_lpg.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -15,10 +15,3 @@ #include "shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl" #include "platforms.h" - -namespace NEO { -template <> -uint32_t CompilerProductHelperHw::getDefaultHwIpVersion() const { - return AOT::MTL_M_A0; -} -} // namespace NEO \ No newline at end of file diff --git a/shared/test/common/common_main.cpp b/shared/test/common/common_main.cpp index 4ddea1fc02..f11dfa4ebd 100644 --- a/shared/test/common/common_main.cpp +++ b/shared/test/common/common_main.cpp @@ -175,6 +175,7 @@ int main(int argc, char **argv) { uint32_t sliceCount = 0; uint32_t subSlicePerSliceCount = 0; int32_t revId = -1; + int32_t devId = -1; int dieRecovery = 0; bool productOptionSelected = false; @@ -208,6 +209,11 @@ int main(int argc, char **argv) { if (i < argc) { revId = atoi(argv[i]); } + } else if (!strcmp("--dev_id", argv[i])) { + ++i; + if (i < argc) { + devId = static_cast(strtol(argv[i], nullptr, 16)); + } } else if (!strcmp("--product", argv[i])) { ++i; if (i < argc) { @@ -311,6 +317,7 @@ int main(int argc, char **argv) { PLATFORM &platform = hwInfoForTests.platform; auto testRevId = revId; + auto testDevId = devId; if (testRevId != -1) { platform.usRevId = testRevId; @@ -318,6 +325,12 @@ int main(int argc, char **argv) { testRevId = platform.usRevId; } + if (testDevId != -1) { + platform.usDeviceID = testDevId; + } else { + testDevId = platform.usDeviceID; + } + adjustHwInfoForTests(hwInfoForTests, euPerSubSlice, sliceCount, subSlicePerSliceCount, dieRecovery); // Platforms with uninitialized factory are not supported if (!isPlatformSupported(hwInfoForTests)) { diff --git a/shared/test/common/mocks/mock_memory_manager.h b/shared/test/common/mocks/mock_memory_manager.h index 220ff54163..8ae4776823 100644 --- a/shared/test/common/mocks/mock_memory_manager.h +++ b/shared/test/common/mocks/mock_memory_manager.h @@ -51,6 +51,7 @@ class MockMemoryManager : public MemoryManagerCreate { using OsAgnosticMemoryManager::allocateGraphicsMemoryForImageFromHostPtr; using MemoryManagerCreate::MemoryManagerCreate; using MemoryManager::enable64kbpages; + using MemoryManager::executionEnvironment; using MemoryManager::getPreferredAllocationMethod; using MemoryManager::isaInLocalMemory; using MemoryManager::isAllocationTypeToCapture; diff --git a/shared/test/common/test_files/CMakeLists.txt b/shared/test/common/test_files/CMakeLists.txt index 7588a365fd..2932c83f76 100644 --- a/shared/test/common/test_files/CMakeLists.txt +++ b/shared/test/common/test_files/CMakeLists.txt @@ -5,7 +5,7 @@ # set(SHARED_TEST_PROJECTS_SUB_FOLDER "prepare test files") -function(compile_kernels_gen revision_id platform_name) +function(compile_kernels_gen device revision_id platform_name) set(outputdir "${TargetDir}/${platform_name}/${revision_id}/test_files/${NEO_ARCH}/") set(compiled_kernels) @@ -16,7 +16,8 @@ function(compile_kernels_gen revision_id platform_name) get_filename_component(workdir ${filepath} DIRECTORY) get_filename_component(absolute_filepath ${filepath} ABSOLUTE) - set(outputpath_base "${outputdir}${basename}_${platform_name}") + set(outputname_base "${basename}_${platform_name}") + set(outputpath_base "${outputdir}${outputname_base}") if(NOT NEO_DISABLE_BUILTINS_COMPILATION) set(output_files @@ -26,7 +27,7 @@ function(compile_kernels_gen revision_id platform_name) add_custom_command( OUTPUT ${output_files} - COMMAND ${ocloc_cmd_prefix} -file ${absolute_filepath} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -revision_id ${revision_id} + COMMAND ${ocloc_cmd_prefix} -file ${absolute_filepath} -device ${device} -${NEO_BITS} -out_dir ${outputdir} -output_no_suffix -output ${outputname_base} -revision_id ${revision_id} WORKING_DIRECTORY ${workdir} DEPENDS ${filepath} ocloc copy_compiler_files ) @@ -69,8 +70,9 @@ macro(macro_for_each_platform) list(REMOVE_ITEM KERNELS_TO_COMPILE ${TEST_KERNELS_IMAGES}) endif() - foreach(REVISION_ID ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) - compile_kernels_gen(${REVISION_ID} ${PLATFORM_IT_LOWER} ${KERNELS_TO_COMPILE}) + foreach(REVISION_CONFIG ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) + parse_revision_config(${REVISION_CONFIG} ${PLATFORM_IT_LOWER} DEVICE_ID REVISION_ID) + compile_kernels_gen(${DEVICE_ID} ${REVISION_ID} ${PLATFORM_IT_LOWER} ${KERNELS_TO_COMPILE}) add_custom_target(prepare_test_kernels_for_shared_${PLATFORM_IT_LOWER}_${REVISION_ID} DEPENDS ${compiled_kernels_${PLATFORM_IT_LOWER}_${REVISION_ID}}) set_target_properties(prepare_test_kernels_for_shared_${PLATFORM_IT_LOWER}_${REVISION_ID} PROPERTIES FOLDER "${SHARED_TEST_PROJECTS_FOLDER}/${SHARED_TEST_PROJECTS_SUB_FOLDER}/${PLATFORM_SPECIFIC_TEST_TARGETS_FOLDER}/${PLATFORM_IT_LOWER}/${REVISION_ID}") diff --git a/shared/test/unit_test/helpers/hw_aot_config_tests.cpp b/shared/test/unit_test/helpers/hw_aot_config_tests.cpp index 50019a8c5d..02b65c5d2f 100644 --- a/shared/test/unit_test/helpers/hw_aot_config_tests.cpp +++ b/shared/test/unit_test/helpers/hw_aot_config_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2023 Intel Corporation + * Copyright (C) 2022-2024 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -27,6 +27,7 @@ HWTEST2_P(ProductConfigHwInfoTests, givenAotConfigWhenSetHwInfoGmdIdThenCorrectV HWTEST2_P(ProductConfigHwInfoTests, givenUnknownAotConfigWhenGetProductConfigThenDefaultConfigIsReturned, IsAtLeastMtl) { hwInfo.ipVersion = {}; + hwInfo.platform.usDeviceID = 0; auto ret = compilerProductHelper->getHwIpVersion(hwInfo); EXPECT_EQ(ret, compilerProductHelper->getDefaultHwIpVersion()); } diff --git a/shared/test/unit_test/os_interface/windows/wddm_additional_apater_info_options_tests.cpp b/shared/test/unit_test/os_interface/windows/wddm_additional_apater_info_options_tests.cpp index df21ba2509..0d58b4ac8c 100644 --- a/shared/test/unit_test/os_interface/windows/wddm_additional_apater_info_options_tests.cpp +++ b/shared/test/unit_test/os_interface/windows/wddm_additional_apater_info_options_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -27,6 +27,7 @@ HWTEST2_F(WddmTest, WhenPopulateIpVersionWddmIsCalledAndIpVersionIsZeroThenDefau auto &compilerProductHelper = wddm->rootDeviceEnvironment.getHelper(); HardwareInfo hwInfo = *defaultHwInfo; hwInfo.ipVersion = 0; + hwInfo.platform.usDeviceID = 0; auto config = compilerProductHelper.getDefaultHwIpVersion(); wddm->populateIpVersion(hwInfo); diff --git a/shared/test/unit_test/xe_hpg_core/compute_mode_tests_xe_hpg_core.cpp b/shared/test/unit_test/xe_hpg_core/compute_mode_tests_xe_hpg_core.cpp index d7d6174e87..bc983a6bf0 100644 --- a/shared/test/unit_test/xe_hpg_core/compute_mode_tests_xe_hpg_core.cpp +++ b/shared/test/unit_test/xe_hpg_core/compute_mode_tests_xe_hpg_core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Intel Corporation + * Copyright (C) 2021-2024 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -113,17 +113,27 @@ XE_HPG_CORETEST_F(ComputeModeRequirementsXeHpgCore, givenComputeModeCmdSizeWhenL overrideComputeModeRequest(false, false, false, false, 128u); EXPECT_FALSE(getCsrHw()->streamProperties.stateComputeMode.isDirty()); - auto cmdSize = sizeof(STATE_COMPUTE_MODE) + sizeof(PIPE_CONTROL); + auto expSize = sizeof(STATE_COMPUTE_MODE); + auto &rootDeviceEnvironment = csr->peekRootDeviceEnvironment(); + auto &productHelper = rootDeviceEnvironment.getHelper(); + auto *releaseHelper = rootDeviceEnvironment.getReleaseHelper(); + auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo(); + const auto &[isBasicWARequired, isExtendedWARequired] = productHelper.isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, getCsrHw()->isRcs(), releaseHelper); + std::ignore = isExtendedWARequired; + + if (isBasicWARequired) { + expSize += sizeof(PIPE_CONTROL); + } overrideComputeModeRequest(false, false, false, true, 256u); auto retSize = getCsrHw()->getCmdSizeForComputeMode(); EXPECT_TRUE(getCsrHw()->streamProperties.stateComputeMode.isDirty()); - EXPECT_EQ(cmdSize, retSize); + EXPECT_EQ(expSize, retSize); overrideComputeModeRequest(true, false, false, true, 256u); retSize = getCsrHw()->getCmdSizeForComputeMode(); EXPECT_TRUE(getCsrHw()->streamProperties.stateComputeMode.isDirty()); - EXPECT_EQ(cmdSize, retSize); + EXPECT_EQ(expSize, retSize); } XE_HPG_CORETEST_F(ComputeModeRequirementsXeHpgCore, givenCoherencyWithSharedHandlesWhenCommandSizeIsCalculatedThenCorrectCommandSizeIsReturned) { @@ -137,31 +147,51 @@ XE_HPG_CORETEST_F(ComputeModeRequirementsXeHpgCore, givenCoherencyWithSharedHand overrideComputeModeRequest(false, true, true); EXPECT_FALSE(getCsrHw()->streamProperties.stateComputeMode.isDirty()); - auto cmdsSize = sizeof(STATE_COMPUTE_MODE) + (2 * sizeof(PIPE_CONTROL)); + auto expSize = sizeof(STATE_COMPUTE_MODE) + (sizeof(PIPE_CONTROL)); + auto &rootDeviceEnvironment = csr->peekRootDeviceEnvironment(); + auto &productHelper = rootDeviceEnvironment.getHelper(); + auto *releaseHelper = rootDeviceEnvironment.getReleaseHelper(); + auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo(); + const auto &[isBasicWARequired, isExtendedWARequired] = productHelper.isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, getCsrHw()->isRcs(), releaseHelper); + std::ignore = isExtendedWARequired; + + if (isBasicWARequired) { + expSize += sizeof(PIPE_CONTROL); + } overrideComputeModeRequest(true, true, true); auto retSize = getCsrHw()->getCmdSizeForComputeMode(); EXPECT_TRUE(getCsrHw()->streamProperties.stateComputeMode.isDirty()); - EXPECT_EQ(cmdsSize, retSize); + EXPECT_EQ(expSize, retSize); overrideComputeModeRequest(true, false, true); retSize = getCsrHw()->getCmdSizeForComputeMode(); EXPECT_TRUE(getCsrHw()->streamProperties.stateComputeMode.isDirty()); - EXPECT_EQ(cmdsSize, retSize); + EXPECT_EQ(expSize, retSize); } XE_HPG_CORETEST_F(ComputeModeRequirementsXeHpgCore, givenCoherencyWithoutSharedHandlesWhenCommandSizeIsCalculatedThenCorrectCommandSizeIsReturned) { using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE; using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; setUpImpl(); - - auto cmdsSize = sizeof(STATE_COMPUTE_MODE) + sizeof(PIPE_CONTROL); - overrideComputeModeRequest(false, false, false, false); EXPECT_FALSE(getCsrHw()->streamProperties.stateComputeMode.isDirty()); overrideComputeModeRequest(false, false, false, true); - auto retSize = getCsrHw()->getCmdSizeForComputeMode(); + + auto expSize = sizeof(STATE_COMPUTE_MODE); + auto &rootDeviceEnvironment = csr->peekRootDeviceEnvironment(); + auto &productHelper = rootDeviceEnvironment.getHelper(); + auto *releaseHelper = rootDeviceEnvironment.getReleaseHelper(); + auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo(); + const auto &[isBasicWARequired, isExtendedWARequired] = productHelper.isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, getCsrHw()->isRcs(), releaseHelper); + std::ignore = isExtendedWARequired; + + if (isBasicWARequired) { + expSize += sizeof(PIPE_CONTROL); + } + + auto gotSize = getCsrHw()->getCmdSizeForComputeMode(); EXPECT_TRUE(getCsrHw()->streamProperties.stateComputeMode.isDirty()); - EXPECT_EQ(cmdsSize, retSize); + EXPECT_EQ(expSize, gotSize); } diff --git a/shared/test/unit_test/xe_hpg_core/dg2/gfx_core_helper_tests_dg2.cpp b/shared/test/unit_test/xe_hpg_core/dg2/gfx_core_helper_tests_dg2.cpp index e626a46797..6c8f1eae10 100644 --- a/shared/test/unit_test/xe_hpg_core/dg2/gfx_core_helper_tests_dg2.cpp +++ b/shared/test/unit_test/xe_hpg_core/dg2/gfx_core_helper_tests_dg2.cpp @@ -122,11 +122,12 @@ DG2TEST_F(GfxCoreHelperTestDg2, givenRcsDisabledButDebugVariableSetWhenGetGpgpuE using GfxCoreHelperTests = Test; DG2TEST_F(GfxCoreHelperTests, givenAllocationTypeInternalHeapWhenSetExtraAllocationDataThenUseSystemMemory) { - HardwareInfo hwInfo = *defaultHwInfo; + HardwareInfo &hwInfo = *pDevice->getRootDeviceEnvironment().getMutableHardwareInfo(); hwInfo.platform.usDeviceID = dg2G10DeviceIds[0]; - auto &gfxCoreHelper = getHelper(); + hwInfo.platform.usRevId = 0; + auto &gfxCoreHelper = getHelper(); constexpr DeviceBitfield singleTileBitfield = 0b0100; const AllocationProperties singleTileAllocProperties(0, 1, AllocationType::internalHeap, singleTileBitfield); diff --git a/shared/test/unit_test/xe_hpg_core/dg2/memory_manager_tests_dg2.cpp b/shared/test/unit_test/xe_hpg_core/dg2/memory_manager_tests_dg2.cpp index cd68dcf8e0..e8c022fc45 100644 --- a/shared/test/unit_test/xe_hpg_core/dg2/memory_manager_tests_dg2.cpp +++ b/shared/test/unit_test/xe_hpg_core/dg2/memory_manager_tests_dg2.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Intel Corporation + * Copyright (C) 2021-2024 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -33,6 +33,8 @@ using MemoryManagerTestsDg2 = ::testing::Test; DG2TEST_F(MemoryManagerTestsDg2, givenEnabledLocalMemoryWhenLinearStreamIsAllocatedInPreferredPoolThenLocalMemoryPoolIsNotUsed) { MockExecutionEnvironment executionEnvironment(defaultHwInfo.get()); MockMemoryManager memoryManager(false, true, executionEnvironment); + HardwareInfo &hwInfo = *memoryManager.executionEnvironment.rootDeviceEnvironments[0]->getMutableHardwareInfo(); + hwInfo.platform.usRevId = 0; auto allocation = memoryManager.allocateGraphicsMemoryInPreferredPool({mockRootDeviceIndex, MemoryConstants::pageSize, AllocationType::linearStream, mockDeviceBitfield}, nullptr); EXPECT_NE(MemoryPool::localMemory, allocation->getMemoryPool()); @@ -44,6 +46,8 @@ DG2TEST_F(MemoryManagerTestsDg2, givenEnabledLocalMemoryWhenLinearStreamIsAlloca DG2TEST_F(MemoryManagerTestsDg2, givenLinearStreamTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested) { AllocationData allocData; MockMemoryManager mockMemoryManager; + HardwareInfo &hwInfo = *mockMemoryManager.executionEnvironment.rootDeviceEnvironments[0]->getMutableHardwareInfo(); + hwInfo.platform.usRevId = 0; AllocationProperties properties{mockRootDeviceIndex, 1, AllocationType::linearStream, mockDeviceBitfield}; mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties)); EXPECT_TRUE(allocData.flags.useSystemMemory); @@ -53,6 +57,8 @@ DG2TEST_F(MemoryManagerTestsDg2, givenLinearStreamTypeWhenGetAllocationDataIsCal DG2TEST_F(MemoryManagerTestsDg2, givenLinearStreamWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested) { AllocationData allocData; MockMemoryManager mockMemoryManager; + HardwareInfo &hwInfo = *mockMemoryManager.executionEnvironment.rootDeviceEnvironments[0]->getMutableHardwareInfo(); + hwInfo.platform.usRevId = 0; AllocationProperties properties{mockRootDeviceIndex, 1, AllocationType::linearStream, mockDeviceBitfield}; mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties)); EXPECT_TRUE(allocData.flags.useSystemMemory); @@ -109,6 +115,8 @@ DG2TEST_F(MemoryManagerTestsDg2, givenSemaphoreBufferAllocationWhenGetAllocation DG2TEST_F(MemoryManagerTestsDg2, givenConstantSurfaceTypeWhenGetAllocationDataIsCalledThenLocalMemoryIsRequestedWithoutCpuAccess) { AllocationData allocData; MockMemoryManager mockMemoryManager; + HardwareInfo &hwInfo = *mockMemoryManager.executionEnvironment.rootDeviceEnvironments[0]->getMutableHardwareInfo(); + hwInfo.platform.usRevId = 0; AllocationProperties properties{mockRootDeviceIndex, 1, AllocationType::constantSurface, mockDeviceBitfield}; mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties)); EXPECT_FALSE(allocData.flags.useSystemMemory); @@ -118,6 +126,8 @@ DG2TEST_F(MemoryManagerTestsDg2, givenConstantSurfaceTypeWhenGetAllocationDataIs DG2TEST_F(MemoryManagerTestsDg2, givenPrintfAllocationWhenGetAllocationDataIsCalledThenUseSystemMemoryAndRequireCpuAccess) { AllocationData allocData; MockMemoryManager mockMemoryManager; + HardwareInfo &hwInfo = *mockMemoryManager.executionEnvironment.rootDeviceEnvironments[0]->getMutableHardwareInfo(); + hwInfo.platform.usRevId = 0; AllocationProperties properties{mockRootDeviceIndex, 1, AllocationType::printfSurface, mockDeviceBitfield}; mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties)); EXPECT_TRUE(allocData.flags.useSystemMemory); @@ -127,6 +137,8 @@ DG2TEST_F(MemoryManagerTestsDg2, givenPrintfAllocationWhenGetAllocationDataIsCal DG2TEST_F(MemoryManagerTestsDg2, givenGpuTimestampTagBufferTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested) { AllocationData allocData; MockMemoryManager mockMemoryManager; + HardwareInfo &hwInfo = *mockMemoryManager.executionEnvironment.rootDeviceEnvironments[0]->getMutableHardwareInfo(); + hwInfo.platform.usRevId = 0; AllocationProperties properties{mockRootDeviceIndex, 1, AllocationType::gpuTimestampDeviceBuffer, mockDeviceBitfield}; mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties)); EXPECT_TRUE(allocData.flags.useSystemMemory); diff --git a/shared/test/unit_test/xe_hpg_core/dg2/product_config_helper_tests_dg2.cpp b/shared/test/unit_test/xe_hpg_core/dg2/product_config_helper_tests_dg2.cpp index 16873ff8c9..4e8bbbf440 100644 --- a/shared/test/unit_test/xe_hpg_core/dg2/product_config_helper_tests_dg2.cpp +++ b/shared/test/unit_test/xe_hpg_core/dg2/product_config_helper_tests_dg2.cpp @@ -183,6 +183,7 @@ DG2TEST_F(ProductHelperTestDg2, givenDg2ProductHelperWhenIsInitBuiltinAsyncSuppo DG2TEST_F(ProductHelperTestDg2, givenG10DevIdWhenAdditionalKernelExecInfoSupportCheckedThenCorrectValueIsReturned) { HardwareInfo myHwInfo = *defaultHwInfo; myHwInfo.platform.usDeviceID = dg2G10DeviceIds[0]; + myHwInfo.platform.usRevId = productHelper->getHwRevIdFromStepping(REVISION_A0, myHwInfo); EXPECT_FALSE(productHelper->isDisableOverdispatchAvailable(myHwInfo)); FrontEndPropertiesSupport fePropertiesSupport{}; @@ -764,7 +765,7 @@ DG2TEST_F(ProductConfigTests, givenInvalidRevisionIdWhenDeviceIdIsDefaultThenDef hwInfo.platform.usRevId = CommonConstants::invalidRevisionID; productConfig = compilerProductHelper->getHwIpVersion(hwInfo); - EXPECT_EQ(productConfig, AOT::DG2_G10_A0); + EXPECT_EQ(productConfig, AOT::DG2_G10_C0); } DG2TEST_F(ProductConfigTests, givenDg2G10DeviceIdWhenDifferentRevisionIsPassedThenCorrectProductConfigIsReturned) { @@ -795,7 +796,7 @@ DG2TEST_F(ProductConfigTests, givenDg2DeviceIdWhenIncorrectRevisionIsPassedThenD hwInfo.platform.usDeviceID = deviceId; hwInfo.platform.usRevId = CommonConstants::invalidRevisionID; productConfig = compilerProductHelper->getHwIpVersion(hwInfo); - EXPECT_EQ(productConfig, AOT::DG2_G10_A0); + EXPECT_EQ(productConfig, AOT::DG2_G10_C0); } } } @@ -831,7 +832,7 @@ DG2TEST_F(ProductConfigTests, givenNotSetDeviceAndRevisionIdWhenGetProductConfig hwInfo.platform.usDeviceID = 0x0; productConfig = compilerProductHelper->getHwIpVersion(hwInfo); - EXPECT_EQ(productConfig, AOT::DG2_G10_A0); + EXPECT_EQ(productConfig, AOT::DG2_G10_C0); } DG2TEST_F(ProductHelperTestDg2, givenProductHelperWhenAskedIfStorageInfoAdjustmentIsRequiredThenTrueIsReturned) { diff --git a/shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.cpp b/shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.cpp index 6075b65623..41b407708b 100644 --- a/shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.cpp +++ b/shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.cpp @@ -326,7 +326,11 @@ HWTEST2_F(XeLpgProductHelperTests, whenSetForceNonCoherentThenNothingChanged, Is HWTEST2_F(XeLpgProductHelperTests, givenCompilerProductHelperWhenGetDefaultHwIpVersionThenCorrectValueIsSet, IsXeLpg) { HardwareInfo hwInfo = *defaultHwInfo; auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); - EXPECT_EQ(compilerProductHelper->getDefaultHwIpVersion(), AOT::MTL_M_A0); + if (hwInfo.platform.eProductFamily == IGFX_ARROWLAKE) { + EXPECT_EQ(AOT::XE_LPGPLUS_B0, compilerProductHelper->getDefaultHwIpVersion()); + } else { + EXPECT_EQ(AOT::MTL_M_B0, compilerProductHelper->getDefaultHwIpVersion()); + } } HWTEST2_F(XeLpgProductHelperTests, whenCheckDirectSubmissionSupportedThenValueFromReleaseHelperIsReturned, IsXeLpg) { diff --git a/target_unit_tests/xe_hpg_core/arl/enable_arl_testing.cmake b/target_unit_tests/xe_hpg_core/arl/enable_arl_testing.cmake index 7b93cbcef5..e2dbf6070f 100644 --- a/target_unit_tests/xe_hpg_core/arl/enable_arl_testing.cmake +++ b/target_unit_tests/xe_hpg_core/arl/enable_arl_testing.cmake @@ -1,10 +1,10 @@ # -# Copyright (C) 2023 Intel Corporation +# Copyright (C) 2023-2024 Intel Corporation # # SPDX-License-Identifier: MIT # if(TESTS_ARL) - set(unit_test_config "arl/2/4/5/0") # non-zero values for unit tests + set(unit_test_config "arl/2/4/5/0/0x7D41") # non-zero values for unit tests include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake) endif() diff --git a/target_unit_tests/xe_hpg_core/dg2/enable_dg2_testing.cmake b/target_unit_tests/xe_hpg_core/dg2/enable_dg2_testing.cmake index 6e7b707072..6241a3095a 100644 --- a/target_unit_tests/xe_hpg_core/dg2/enable_dg2_testing.cmake +++ b/target_unit_tests/xe_hpg_core/dg2/enable_dg2_testing.cmake @@ -1,10 +1,10 @@ # -# Copyright (C) 2021 Intel Corporation +# Copyright (C) 2021-2024 Intel Corporation # # SPDX-License-Identifier: MIT # if(TESTS_DG2) - set(unit_test_config "dg2/2/4/5/0") # non-zero values for unit tests + set(unit_test_config "dg2/2/4/5/0/0x4F80") # non-zero values for unit tests include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake) endif() diff --git a/target_unit_tests/xe_hpg_core/mtl/enable_mtl_testing.cmake b/target_unit_tests/xe_hpg_core/mtl/enable_mtl_testing.cmake index 7be814fdb2..3812b3a95a 100644 --- a/target_unit_tests/xe_hpg_core/mtl/enable_mtl_testing.cmake +++ b/target_unit_tests/xe_hpg_core/mtl/enable_mtl_testing.cmake @@ -1,10 +1,10 @@ # -# Copyright (C) 2022 Intel Corporation +# Copyright (C) 2022-2024 Intel Corporation # # SPDX-License-Identifier: MIT # if(TESTS_MTL) - set(unit_test_config "mtl/2/4/5/0") # non-zero values for unit tests + set(unit_test_config "mtl/2/4/5/0/0x7D40") # non-zero values for unit tests include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake) endif()