mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Add revision specific tests and test files generation
Related-To: NEO-4838 Change-Id: I43cdd9108046239ec2535a9010762fb767b0c1eb Signed-off-by: Andrzej Swierczynski <andrzej.swierczynski@intel.com>
This commit is contained in:
@ -9,32 +9,34 @@ list(GET unit_test_config 0 product)
|
||||
list(GET unit_test_config 1 slices)
|
||||
list(GET unit_test_config 2 subslices)
|
||||
list(GET unit_test_config 3 eu_per_ss)
|
||||
add_custom_target(run_${product}_unit_tests ALL DEPENDS unit_tests)
|
||||
set_target_properties(run_${product}_unit_tests PROPERTIES FOLDER "${PLATFORM_SPECIFIC_TEST_TARGETS_FOLDER}/${product}")
|
||||
list(GET unit_test_config 4 revision_id)
|
||||
|
||||
add_custom_target(run_${product}_${revision_id}_unit_tests ALL DEPENDS unit_tests)
|
||||
set_target_properties(run_${product}_${revision_id}_unit_tests PROPERTIES FOLDER "${PLATFORM_SPECIFIC_TEST_TARGETS_FOLDER}/${product}/${revision_id}")
|
||||
if(NOT SKIP_NEO_UNIT_TESTS)
|
||||
add_custom_command(
|
||||
TARGET run_${product}_unit_tests
|
||||
TARGET run_${product}_${revision_id}_unit_tests
|
||||
POST_BUILD
|
||||
COMMAND WORKING_DIRECTORY ${TargetDir}
|
||||
COMMAND echo Running neo_shared_tests ${target} ${slices}x${subslices}x${eu_per_ss} in ${TargetDir}/${product}
|
||||
COMMAND $<TARGET_FILE:neo_shared_tests> --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${IGDRCL_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION}
|
||||
COMMAND $<TARGET_FILE:neo_shared_tests> --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${IGDRCL_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id}
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
TARGET run_${product}_unit_tests
|
||||
TARGET run_${product}_${revision_id}_unit_tests
|
||||
POST_BUILD
|
||||
COMMAND WORKING_DIRECTORY ${TargetDir}
|
||||
COMMAND echo Running igdrcl_tests ${target} ${slices}x${subslices}x${eu_per_ss} in ${TargetDir}/${product}
|
||||
COMMAND ${GTEST_ENV} $<TARGET_FILE:igdrcl_tests> --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${IGDRCL_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION}
|
||||
COMMAND ${GTEST_ENV} $<TARGET_FILE:igdrcl_tests> --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${IGDRCL_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id}
|
||||
)
|
||||
|
||||
if(WIN32 AND ${CMAKE_BUILD_TYPE} STREQUAL "Debug" AND "${IGDRCL_OPTION__BITS}" STREQUAL "64" AND APPVERIFIER_ALLOWED)
|
||||
add_custom_command(
|
||||
TARGET run_${product}_unit_tests
|
||||
TARGET run_${product}_${revision_id}_unit_tests
|
||||
POST_BUILD
|
||||
COMMAND WORKING_DIRECTORY ${TargetDir}
|
||||
COMMAND echo Running igdrcl_tests with App Verifier
|
||||
COMMAND ${NEO_SOURCE_DIR}/scripts/verify.bat $<TARGET_FILE:igdrcl_tests> --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} ${IGDRCL_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION}
|
||||
COMMAND ${NEO_SOURCE_DIR}/scripts/verify.bat $<TARGET_FILE:igdrcl_tests> --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} ${IGDRCL_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id}
|
||||
COMMAND echo App Verifier returned: %errorLevel%
|
||||
)
|
||||
endif()
|
||||
@ -42,16 +44,16 @@ endif()
|
||||
|
||||
if(NOT SKIP_L0_UNIT_TESTS AND BUILD_WITH_L0)
|
||||
add_custom_command(
|
||||
TARGET run_${product}_unit_tests
|
||||
TARGET run_${product}_${revision_id}_unit_tests
|
||||
POST_BUILD
|
||||
COMMAND WORKING_DIRECTORY ${TargetDir}
|
||||
COMMAND echo Running ze_intel_gpu_core_tests ${target} ${slices}x${subslices}x${eu_per_ss} in ${TargetDir}/${product}
|
||||
COMMAND $<TARGET_FILE:ze_intel_gpu_core_tests> --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${IGDRCL_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION}
|
||||
COMMAND $<TARGET_FILE:ze_intel_gpu_core_tests> --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${IGDRCL_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id}
|
||||
COMMAND echo Running ze_intel_gpu_tools_tests ${target} ${slices}x${subslices}x${eu_per_ss} in ${TargetDir}/${product}
|
||||
COMMAND $<TARGET_FILE:ze_intel_gpu_tools_tests> --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${IGDRCL_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION}
|
||||
COMMAND $<TARGET_FILE:ze_intel_gpu_tools_tests> --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${IGDRCL_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id}
|
||||
COMMAND echo Running ze_intel_gpu_exp_tests ${target} ${slices}x${subslices}x${eu_per_ss} in ${TargetDir}/${product}
|
||||
COMMAND $<TARGET_FILE:ze_intel_gpu_exp_tests> --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${IGDRCL_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION}
|
||||
COMMAND $<TARGET_FILE:ze_intel_gpu_exp_tests> --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} ${GTEST_EXCEPTION_OPTIONS} --gtest_repeat=${GTEST_REPEAT} ${GTEST_SHUFFLE} ${IGDRCL_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id}
|
||||
)
|
||||
endif()
|
||||
|
||||
add_dependencies(run_unit_tests run_${product}_unit_tests)
|
||||
add_dependencies(run_unit_tests run_${product}_${revision_id}_unit_tests)
|
||||
|
@ -11,6 +11,7 @@ SET_FLAGS_FOR("GEN12LP" "TGLLP" "RKL")
|
||||
|
||||
# Add supported and tested platforms
|
||||
if(SUPPORT_GEN8)
|
||||
set(GEN8_REVISIONS 0)
|
||||
if(TESTS_GEN8)
|
||||
ADD_ITEM_FOR_GEN("FAMILY_NAME" "TESTED" "GEN8" "BDWFamily")
|
||||
endif()
|
||||
@ -27,6 +28,7 @@ if(SUPPORT_GEN8)
|
||||
endif()
|
||||
|
||||
if(SUPPORT_GEN9)
|
||||
set(GEN9_REVISIONS 0)
|
||||
if(TESTS_GEN9)
|
||||
ADD_ITEM_FOR_GEN("FAMILY_NAME" "TESTED" "GEN9" "SKLFamily")
|
||||
endif()
|
||||
@ -92,6 +94,7 @@ if(SUPPORT_GEN9)
|
||||
endif()
|
||||
|
||||
if(SUPPORT_GEN11)
|
||||
set(GEN11_REVISIONS 0)
|
||||
if(TESTS_GEN11)
|
||||
ADD_ITEM_FOR_GEN("FAMILY_NAME" "TESTED" "GEN11" "ICLFamily")
|
||||
endif()
|
||||
@ -130,6 +133,7 @@ if(SUPPORT_GEN11)
|
||||
endif()
|
||||
|
||||
if(SUPPORT_GEN12LP)
|
||||
set(GEN12LP_REVISIONS 0)
|
||||
if(TESTS_GEN12LP)
|
||||
ADD_ITEM_FOR_GEN("FAMILY_NAME" "TESTED" "GEN12LP" "TGLLPFamily")
|
||||
endif()
|
||||
|
@ -14,7 +14,7 @@ components:
|
||||
infra:
|
||||
branch: infra
|
||||
dest_dir: infra
|
||||
revision: 4354868bb2fc7a244c5d9dc9eb87d71ba21523da
|
||||
revision: 2b16dfb6bf1d49e3961efbafe29b5634196dfb28
|
||||
type: git
|
||||
internal:
|
||||
branch: master
|
||||
|
@ -171,6 +171,26 @@ function(neo_copy_test_files target product)
|
||||
set_target_properties(${target} PROPERTIES FOLDER "${PLATFORM_SPECIFIC_TEST_TARGETS_FOLDER}/${product}")
|
||||
endfunction()
|
||||
|
||||
function(neo_copy_test_files_with_revision target product revision_id)
|
||||
set(outputdir "${TargetDir}/${product}/${revision_id}")
|
||||
add_custom_target(${target})
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND echo deleting and re-creating ${product} cache directory...
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${outputdir}/cl_cache
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${outputdir}/cl_cache
|
||||
COMMAND echo copying built-in kernel files from ${BUILT_IN_KERNEL_DIR}/kernels to ${outputdir}/test_files
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILT_IN_KERNEL_DIR}/kernels ${outputdir}/test_files
|
||||
COMMAND echo copying test files from ${NEO_SOURCE_DIR}/opencl/test/unit_test/test_files to ${outputdir}/test_files
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${NEO_SOURCE_DIR}/opencl/test/unit_test/test_files ${outputdir}/test_files
|
||||
COMMAND WORKING_DIRECTORY ${TargetDir}
|
||||
DEPENDS ${NEO_SOURCE_DIR}/opencl/test/unit_test/test_files
|
||||
)
|
||||
add_dependencies(${target} copy_compiler_files)
|
||||
set_target_properties(${target} PROPERTIES FOLDER "${PLATFORM_SPECIFIC_TEST_TARGETS_FOLDER}/${product}/${revision_id}}")
|
||||
endfunction()
|
||||
|
||||
add_dependencies(unit_tests
|
||||
igdrcl_tests
|
||||
test_dynamic_lib
|
||||
@ -202,8 +222,8 @@ if(NOT DEFINED cloc_cmd_prefix)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
function(neo_gen_kernels platform_name_with_type platform_name suffix)
|
||||
set(outputdir "${TargetDir}/${suffix}/test_files/${NEO_ARCH}/")
|
||||
function(neo_gen_kernels platform_name_with_type platform_name revision_id suffix)
|
||||
set(outputdir "${TargetDir}/${suffix}/${revision_id}/test_files/${NEO_ARCH}/")
|
||||
|
||||
set(kernels_to_compile)
|
||||
foreach(filepath ${ARGN})
|
||||
@ -220,25 +240,25 @@ function(neo_gen_kernels platform_name_with_type platform_name suffix)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${output_files}
|
||||
COMMAND ${cloc_cmd_prefix} -q -file ${filename} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir}
|
||||
COMMAND ${cloc_cmd_prefix} -q -file ${filename} -device ${platform_name} -${NEO_BITS} -revision_id ${revision_id} -out_dir ${outputdir}
|
||||
WORKING_DIRECTORY ${workdir}
|
||||
DEPENDS ${filepath} ocloc
|
||||
)
|
||||
|
||||
list(APPEND kernels_to_compile ${output_files})
|
||||
endforeach()
|
||||
list(APPEND kernels_to_compile_${platform_name_with_type} ${kernels_to_compile})
|
||||
set(kernels_to_compile_${platform_name_with_type} ${kernels_to_compile_${platform_name_with_type}} PARENT_SCOPE)
|
||||
list(APPEND kernels_to_compile_${platform_name_with_type}_${revision_id} ${kernels_to_compile})
|
||||
set(kernels_to_compile_${platform_name_with_type}_${revision_id} ${kernels_to_compile_${platform_name_with_type}_${revision_id}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(neo_gen_kernels_with_options platform_name_with_type platform_name suffix filepath)
|
||||
function(neo_gen_kernels_with_options platform_name_with_type platform_name revision_id suffix filepath)
|
||||
set(kernels_to_compile)
|
||||
foreach(filearg ${filepath})
|
||||
get_filename_component(filename ${filearg} NAME)
|
||||
get_filename_component(basename ${filearg} NAME_WE)
|
||||
get_filename_component(base_workdir ${filearg} DIRECTORY)
|
||||
|
||||
set(outputdir "${TargetDir}/${suffix}/test_files/${NEO_ARCH}/")
|
||||
set(outputdir "${TargetDir}/${suffix}/${revision_id}/test_files/${NEO_ARCH}/")
|
||||
set(workdir "${CMAKE_CURRENT_SOURCE_DIR}/${base_workdir}/")
|
||||
|
||||
foreach(arg ${ARGN})
|
||||
@ -253,19 +273,18 @@ function(neo_gen_kernels_with_options platform_name_with_type platform_name suff
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${output_files}
|
||||
COMMAND ${cloc_cmd_prefix} -q -file ${filename} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -options ${arg} -options_name
|
||||
COMMAND ${cloc_cmd_prefix} -file ${filename} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -revision_id ${revision_id} -options ${arg} -options_name
|
||||
WORKING_DIRECTORY ${workdir}
|
||||
DEPENDS ${filearg} ocloc
|
||||
)
|
||||
|
||||
list(APPEND kernels_to_compile ${output_files})
|
||||
endforeach()
|
||||
endforeach()
|
||||
list(APPEND kernels_to_compile_${platform_name_with_type} ${kernels_to_compile})
|
||||
set(kernels_to_compile_${platform_name_with_type} ${kernels_to_compile_${platform_name_with_type}} PARENT_SCOPE)
|
||||
list(APPEND kernels_to_compile_${platform_name_with_type}_${revision_id} ${kernels_to_compile})
|
||||
set(kernels_to_compile_${platform_name_with_type}_${revision_id} ${kernels_to_compile_${platform_name_with_type}_${revision_id}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(neo_gen_kernels_with_internal_options platform_name_with_type platform_name suffix filepath output_name_prefix)
|
||||
function(neo_gen_kernels_with_internal_options platform_name_with_type platform_name revision_id suffix filepath output_name_prefix)
|
||||
set(kernels_to_compile)
|
||||
|
||||
set(filearg ${filepath})
|
||||
@ -273,7 +292,7 @@ function(neo_gen_kernels_with_internal_options platform_name_with_type platform_
|
||||
get_filename_component(basename ${filearg} NAME_WE)
|
||||
get_filename_component(base_workdir ${filearg} DIRECTORY)
|
||||
|
||||
set(outputdir "${TargetDir}/${suffix}/test_files/${NEO_ARCH}/")
|
||||
set(outputdir "${TargetDir}/${suffix}/${revision_id}/test_files/${NEO_ARCH}/")
|
||||
set(workdir "${CMAKE_CURRENT_SOURCE_DIR}/${base_workdir}/")
|
||||
|
||||
if(NOT "${output_name_prefix}" STREQUAL "")
|
||||
@ -293,26 +312,26 @@ function(neo_gen_kernels_with_internal_options platform_name_with_type platform_
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${output_files}
|
||||
COMMAND ${cloc_cmd_prefix} -file ${filename} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} ${output_name} -internal_options ${ARGN}
|
||||
COMMAND ${cloc_cmd_prefix} -file ${filename} -device ${platform_name} -revision_id ${revision_id} -${NEO_BITS} -out_dir ${outputdir} ${output_name} -internal_options ${ARGN}
|
||||
WORKING_DIRECTORY ${workdir}
|
||||
DEPENDS ${filearg} ocloc
|
||||
)
|
||||
|
||||
list(APPEND kernels_to_compile ${output_files})
|
||||
list(APPEND kernels_to_compile_${platform_name_with_type} ${kernels_to_compile})
|
||||
set(kernels_to_compile_${platform_name_with_type} ${kernels_to_compile_${platform_name_with_type}} PARENT_SCOPE)
|
||||
list(APPEND kernels_to_compile_${platform_name_with_type}_${revision_id} ${kernels_to_compile})
|
||||
set(kernels_to_compile_${platform_name_with_type}_${revision_id} ${kernels_to_compile_${platform_name_with_type}_${revision_id}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
set(TEST_KERNEL_kernel_debug_enable
|
||||
"-cl-kernel-debug-enable"
|
||||
)
|
||||
|
||||
function(neo_gen_kernel_with_kernel_debug_options platform_name_with_type platform_name suffix filepath)
|
||||
function(neo_gen_kernel_with_kernel_debug_options platform_name_with_type platform_name revision_id suffix filepath)
|
||||
get_filename_component(filename ${filepath} NAME)
|
||||
get_filename_component(basename ${filepath} NAME_WE)
|
||||
get_filename_component(base_workdir ${filepath} DIRECTORY)
|
||||
|
||||
set(outputdir "${TargetDir}/${suffix}/test_files/${NEO_ARCH}/")
|
||||
set(outputdir "${TargetDir}/${suffix}/${revision_id}/test_files/${NEO_ARCH}/")
|
||||
set(workdir "${CMAKE_CURRENT_SOURCE_DIR}/${base_workdir}/")
|
||||
|
||||
string(REPLACE " " "_" argwospaces ${TEST_KERNEL_kernel_debug_enable})
|
||||
@ -327,13 +346,13 @@ function(neo_gen_kernel_with_kernel_debug_options platform_name_with_type platfo
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${output_files}
|
||||
COMMAND ${cloc_cmd_prefix} -q -file ${filename} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -output ${argwospaces} -internal_options ${TEST_KERNEL_kernel_debug_enable} -options "-g"
|
||||
COMMAND ${cloc_cmd_prefix} -q -file ${filename} -device ${platform_name} -revision_id ${revision_id} -${NEO_BITS} -out_dir ${outputdir} -output ${argwospaces} -internal_options ${TEST_KERNEL_kernel_debug_enable} -options "-g"
|
||||
WORKING_DIRECTORY ${workdir}
|
||||
DEPENDS ${filepath} ocloc
|
||||
)
|
||||
|
||||
list(APPEND kernels_to_compile_${platform_name_with_type} ${output_files})
|
||||
set(kernels_to_compile_${platform_name_with_type} ${kernels_to_compile_${platform_name_with_type}} PARENT_SCOPE)
|
||||
list(APPEND kernels_to_compile_${platform_name_with_type}_${revision_id} ${output_files})
|
||||
set(kernels_to_compile_${platform_name_with_type}_${revision_id} ${kernels_to_compile_${platform_name_with_type}_${revision_id}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(neo_gen_kernel_from_ll platform_name_with_type platform_name suffix filepath output_name compile_options)
|
||||
@ -447,28 +466,45 @@ macro(macro_for_each_gen)
|
||||
endforeach()
|
||||
|
||||
if(MSVC OR CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
neo_gen_kernels(${family_name_with_type} ${PLATFORM_LOWER} ${family_name_with_type} ${PLATFORM_TEST_KERNELS})
|
||||
neo_gen_kernels_with_options(${family_name_with_type} ${PLATFORM_LOWER} ${family_name_with_type} ${TEST_KERNEL} ${TEST_KERNEL_options})
|
||||
foreach(REVISION_ID ${${GEN_TYPE}_REVISIONS})
|
||||
neo_gen_kernels(${family_name_with_type} ${PLATFORM_LOWER} ${REVISION_ID} ${family_name_with_type} ${PLATFORM_TEST_KERNELS})
|
||||
neo_gen_kernels_with_options(${family_name_with_type} ${PLATFORM_LOWER} ${REVISION_ID} ${family_name_with_type} ${TEST_KERNEL} ${TEST_KERNEL_options})
|
||||
endforeach()
|
||||
|
||||
# Compile platform specific kernels if any were found
|
||||
file(GLOB_RECURSE ${PLATFORM_LOWER}_TEST_KERNELS test_files/*.${PLATFORM_LOWER})
|
||||
if(NOT "${${PLATFORM_LOWER}_TEST_KERNELS}" STREQUAL "")
|
||||
neo_gen_kernels(${family_name_with_type} ${PLATFORM_LOWER} ${family_name_with_type} ${${PLATFORM_LOWER}_TEST_KERNELS})
|
||||
foreach(REVISION_ID ${${GEN_TYPE}_REVISIONS})
|
||||
neo_gen_kernels(${family_name_with_type} ${PLATFORM_LOWER} ${REVISION_ID} ${family_name_with_type} ${${PLATFORM_LOWER}_TEST_KERNELS})
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Disable debug kernel generation on gen8 - debugger not supported on gen8
|
||||
if(NOT ("${GEN_TYPE_LOWER}" STREQUAL "gen8"))
|
||||
neo_gen_kernel_with_kernel_debug_options(${family_name_with_type} ${PLATFORM_LOWER} ${family_name_with_type} ${TEST_KERNEL})
|
||||
foreach(REVISION_ID ${${GEN_TYPE}_REVISIONS})
|
||||
neo_gen_kernel_with_kernel_debug_options(${family_name_with_type} ${PLATFORM_LOWER} ${REVISION_ID} ${family_name_with_type} ${TEST_KERNEL})
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Gen9lp needs extra -m32 flag
|
||||
if(("${GEN_TYPE_LOWER}" STREQUAL "gen9") AND ("${PLATFORM_TYPE_LOWER}" STREQUAL "lp"))
|
||||
neo_gen_kernels_with_internal_options(${family_name_with_type} ${PLATFORM_LOWER} ${family_name_with_type} ${TEST_KERNEL_PRINTF} "" ${TEST_KERNEL_PRINTF_internal_options_gen9lp})
|
||||
neo_gen_kernels_with_internal_options(${family_name_with_type} ${PLATFORM_LOWER} ${family_name_with_type} ${TEST_KERNEL_STATELESS} "" ${TEST_KERNEL_STATELESS_internal_options_gen9lp})
|
||||
foreach(REVISION_ID ${${GEN_TYPE}_REVISIONS})
|
||||
neo_gen_kernels_with_internal_options(${family_name_with_type} ${PLATFORM_LOWER} ${REVISION_ID} ${family_name_with_type} ${TEST_KERNEL_PRINTF} "" ${TEST_KERNEL_PRINTF_internal_options_gen9lp})
|
||||
neo_gen_kernels_with_internal_options(${family_name_with_type} ${PLATFORM_LOWER} ${REVISION_ID} ${family_name_with_type} ${TEST_KERNEL_STATELESS} "" ${TEST_KERNEL_STATELESS_internal_options_gen9lp})
|
||||
endforeach()
|
||||
else()
|
||||
neo_gen_kernels_with_internal_options(${family_name_with_type} ${PLATFORM_LOWER} ${family_name_with_type} ${TEST_KERNEL_PRINTF} "" " ")
|
||||
neo_gen_kernels_with_internal_options(${family_name_with_type} ${PLATFORM_LOWER} ${family_name_with_type} ${TEST_KERNEL_STATELESS} "" ${TEST_KERNEL_STATELESS_internal_options})
|
||||
foreach(REVISION_ID ${${GEN_TYPE}_REVISIONS})
|
||||
neo_gen_kernels_with_internal_options(${family_name_with_type} ${PLATFORM_LOWER} ${REVISION_ID} ${family_name_with_type} ${TEST_KERNEL_PRINTF} "" " ")
|
||||
neo_gen_kernels_with_internal_options(${family_name_with_type} ${PLATFORM_LOWER} ${REVISION_ID} ${family_name_with_type} ${TEST_KERNEL_STATELESS} "" ${TEST_KERNEL_STATELESS_internal_options})
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
foreach(file ${TEST_KERNEL_BINDLESS})
|
||||
neo_gen_kernels_with_internal_options(${family_name_with_type} ${PLATFORM_LOWER} ${family_name_with_type} ${file} "bindless" ${TEST_KERNEL_BINDLESS_internal_options})
|
||||
|
||||
foreach(REVISION_ID ${${GEN_TYPE}_REVISIONS})
|
||||
neo_gen_kernels_with_internal_options(${family_name_with_type} ${PLATFORM_LOWER} ${REVISION_ID} ${family_name_with_type} ${file} "bindless" ${TEST_KERNEL_BINDLESS_internal_options})
|
||||
endforeach()
|
||||
|
||||
endforeach()
|
||||
|
||||
set(sip_kernel_file_name)
|
||||
@ -487,15 +523,22 @@ macro(macro_for_each_gen)
|
||||
# neo_gen_kernel_from_ll(${family_name_with_type} ${PLATFORM_LOWER} ${family_name_with_type} ${sip_kernel_file_name} ${sip_debug_kernel_output_file} ${TEST_KERNEL_SIP_DEBUG_options})
|
||||
|
||||
if(PLATFORM_2_0_LOWER)
|
||||
neo_gen_kernels_with_options(${family_name_with_type} ${PLATFORM_2_0_LOWER} ${family_name_with_type} "${TEST_KERNEL_2_0}" ${TEST_KERNEL_2_0_options})
|
||||
foreach(REVISION_ID ${${GEN_TYPE}_REVISIONS})
|
||||
neo_gen_kernels_with_options(${family_name_with_type} ${PLATFORM_2_0_LOWER} ${REVISION_ID} ${family_name_with_type} "${TEST_KERNEL_2_0}" ${TEST_KERNEL_2_0_options})
|
||||
endforeach()
|
||||
endif()
|
||||
if(PLATFORM_VME_LOWER)
|
||||
neo_gen_kernels(${family_name_with_type} ${PLATFORM_VME_LOWER} ${family_name_with_type} ${TEST_KERNEL_VME})
|
||||
foreach(REVISION_ID ${${GEN_TYPE}_REVISIONS})
|
||||
neo_gen_kernels(${family_name_with_type} ${PLATFORM_VME_LOWER} ${REVISION_ID} ${family_name_with_type} ${TEST_KERNEL_VME})
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
add_custom_target(prepare_test_kernels_${family_name_with_type} DEPENDS ${kernels_to_compile_${family_name_with_type}} copy_compiler_files)
|
||||
set_target_properties(prepare_test_kernels_${family_name_with_type} PROPERTIES FOLDER "${PLATFORM_SPECIFIC_TEST_TARGETS_FOLDER}/${family_name_with_type}")
|
||||
add_dependencies(prepare_test_kernels prepare_test_kernels_${family_name_with_type})
|
||||
|
||||
foreach(REVISION_ID ${${GEN_TYPE}_REVISIONS})
|
||||
add_custom_target(prepare_test_kernels_${family_name_with_type}_${REVISION_ID} DEPENDS ${kernels_to_compile_${family_name_with_type}_${REVISION_ID}} copy_compiler_files)
|
||||
set_target_properties(prepare_test_kernels_${family_name_with_type}_${REVISION_ID} PROPERTIES FOLDER "${PLATFORM_SPECIFIC_TEST_TARGETS_FOLDER}/${family_name_with_type}/${REVISION_ID}")
|
||||
add_dependencies(prepare_test_kernels prepare_test_kernels_${family_name_with_type}_${REVISION_ID})
|
||||
endforeach()
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
@ -9,13 +9,14 @@ list(GET aub_test_config 0 product)
|
||||
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)
|
||||
|
||||
add_custom_target(run_${product}_aub_tests ALL DEPENDS copy_test_files_${product} prepare_test_kernels prepare_test_kernel_for_shared)
|
||||
add_dependencies(run_aub_tests run_${product}_aub_tests)
|
||||
set_target_properties(run_${product}_aub_tests PROPERTIES FOLDER "${PLATFORM_SPECIFIC_TEST_TARGETS_FOLDER}/${product}")
|
||||
add_custom_target(run_${product}_${revision_id}_aub_tests ALL DEPENDS copy_test_files_${product}_${revision_id} prepare_test_kernels prepare_test_kernel_for_shared)
|
||||
add_dependencies(run_aub_tests run_${product}_${revision_id}_aub_tests)
|
||||
set_target_properties(run_${product}_${revision_id}_aub_tests PROPERTIES FOLDER "${PLATFORM_SPECIFIC_TEST_TARGETS_FOLDER}/${product}/${revision_id}")
|
||||
|
||||
if(WIN32)
|
||||
add_dependencies(run_${product}_aub_tests mock_gdi)
|
||||
add_dependencies(run_${product}_${revision_id}_aub_tests mock_gdi)
|
||||
endif()
|
||||
|
||||
set(aub_tests_options "")
|
||||
@ -29,14 +30,14 @@ if(NOT ${AUB_DUMP_IMAGE_FORMAT} STREQUAL "")
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
TARGET run_${product}_aub_tests
|
||||
TARGET run_${product}_${revision_id}_aub_tests
|
||||
POST_BUILD
|
||||
COMMAND WORKING_DIRECTORY ${TargetDir}
|
||||
COMMAND echo re-creating working directory for ${product} AUBs generation...
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${TargetDir}/${product}_aub
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${TargetDir}/${product}_aub
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${TargetDir}/${product}_aub/aub_out
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${TargetDir}/${product}_aub/cl_cache
|
||||
COMMAND echo re-creating working directory for ${product}/${revision_id} AUBs generation...
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${TargetDir}/${product}_aub/${revision_id}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${TargetDir}/${product}_aub/${revision_id}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${TargetDir}/${product}_aub/${revision_id}/aub_out
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${TargetDir}/${product}_aub/${revision_id}/cl_cache
|
||||
)
|
||||
|
||||
if(WIN32 OR NOT DEFINED NEO__GMM_LIBRARY_PATH)
|
||||
@ -46,15 +47,15 @@ else()
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
TARGET run_${product}_aub_tests
|
||||
TARGET run_${product}_${revision_id}_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} ${IGDRCL_TESTS_LISTENER_OPTION}
|
||||
COMMAND ${aub_test_cmd_prefix} --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} --gtest_repeat=1 ${aub_tests_options} ${IGDRCL_TESTS_LISTENER_OPTION} --rev_id ${revision_id}
|
||||
)
|
||||
|
||||
if(DO_NOT_RUN_AUB_TESTS)
|
||||
set_target_properties(run_${product}_aub_tests PROPERTIES
|
||||
set_target_properties(run_${product}_${revision_id}_aub_tests PROPERTIES
|
||||
EXCLUDE_FROM_DEFAULT_BUILD TRUE
|
||||
EXCLUDE_FROM_ALL TRUE
|
||||
)
|
||||
|
@ -5,6 +5,6 @@
|
||||
#
|
||||
|
||||
if(TESTS_ICLLP)
|
||||
set(aub_test_config "icllp/1/8/8")
|
||||
set(aub_test_config "icllp/1/8/8/0")
|
||||
include(${OPENCL_AUB_TEST_DIR}/cmake/run_aub_test_target.cmake)
|
||||
endif()
|
||||
|
@ -5,6 +5,6 @@
|
||||
#
|
||||
|
||||
if(TESTS_TGLLP)
|
||||
set(aub_test_config "tgllp/1/6/16")
|
||||
set(aub_test_config "tgllp/1/6/16/0")
|
||||
include(${OPENCL_AUB_TEST_DIR}/cmake/run_aub_test_target.cmake)
|
||||
endif()
|
||||
|
@ -5,6 +5,6 @@
|
||||
#
|
||||
|
||||
if(TESTS_BDW)
|
||||
set(aub_test_config "bdw/1/3/8")
|
||||
set(aub_test_config "bdw/1/3/8/0")
|
||||
include(${OPENCL_AUB_TEST_DIR}/cmake/run_aub_test_target.cmake)
|
||||
endif()
|
||||
|
@ -5,6 +5,6 @@
|
||||
#
|
||||
|
||||
if(TESTS_BXT)
|
||||
set(aub_test_config "bxt/1/3/6")
|
||||
set(aub_test_config "bxt/1/3/6/0")
|
||||
include(${OPENCL_AUB_TEST_DIR}/cmake/run_aub_test_target.cmake)
|
||||
endif()
|
||||
|
@ -6,6 +6,6 @@
|
||||
|
||||
if(TESTS_SKL)
|
||||
add_subdirectories()
|
||||
set(aub_test_config "skl/1/3/8")
|
||||
set(aub_test_config "skl/1/3/8/0")
|
||||
include(${OPENCL_AUB_TEST_DIR}/cmake/run_aub_test_target.cmake)
|
||||
endif()
|
||||
|
@ -12,6 +12,6 @@ if(TESTS_EHL)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen11_ehl})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files(copy_test_files_ehl ehl)
|
||||
add_dependencies(unit_tests copy_test_files_ehl)
|
||||
neo_copy_test_files_with_revision(copy_test_files_ehl_0 ehl 0)
|
||||
add_dependencies(unit_tests copy_test_files_ehl_0)
|
||||
endif()
|
||||
|
@ -14,6 +14,6 @@ if(TESTS_ICLLP)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen11_icllp})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files(copy_test_files_icllp icllp)
|
||||
add_dependencies(unit_tests copy_test_files_icllp)
|
||||
neo_copy_test_files_with_revision(copy_test_files_icllp_0 icllp 0)
|
||||
add_dependencies(unit_tests copy_test_files_icllp_0)
|
||||
endif()
|
||||
|
@ -12,6 +12,6 @@ if(TESTS_LKF)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen11_lkf})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files(copy_test_files_lkf lkf)
|
||||
add_dependencies(unit_tests copy_test_files_lkf)
|
||||
neo_copy_test_files_with_revision(copy_test_files_lkf_0 lkf 0)
|
||||
add_dependencies(unit_tests copy_test_files_lkf_0)
|
||||
endif()
|
||||
|
@ -15,6 +15,6 @@ if(TESTS_DG1)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_dg1})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files(copy_test_files_dg1 dg1)
|
||||
add_dependencies(unit_tests copy_test_files_dg1)
|
||||
neo_copy_test_files_with_revision(copy_test_files_dg1_0 dg1 0)
|
||||
add_dependencies(unit_tests copy_test_files_dg1_0)
|
||||
endif()
|
||||
|
@ -13,6 +13,6 @@ if(TESTS_RKL)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen12lp_rkl})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files(copy_test_files_rkl rkl)
|
||||
add_dependencies(unit_tests copy_test_files_rkl)
|
||||
neo_copy_test_files_with_revision(copy_test_files_rkl_0 rkl 0)
|
||||
add_dependencies(unit_tests copy_test_files_rkl_0)
|
||||
endif()
|
||||
|
@ -14,6 +14,6 @@ if(TESTS_TGLLP)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen12lp_tgllp})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files(copy_test_files_tgllp tgllp)
|
||||
add_dependencies(unit_tests copy_test_files_tgllp)
|
||||
neo_copy_test_files_with_revision(copy_test_files_tgllp_0 tgllp 0)
|
||||
add_dependencies(unit_tests copy_test_files_tgllp_0)
|
||||
endif()
|
||||
|
@ -13,6 +13,6 @@ if(TESTS_BDW)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen8_bdw})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files(copy_test_files_bdw bdw)
|
||||
add_dependencies(unit_tests copy_test_files_bdw)
|
||||
neo_copy_test_files_with_revision(copy_test_files_bdw_0 bdw 0)
|
||||
add_dependencies(unit_tests copy_test_files_bdw_0)
|
||||
endif()
|
||||
|
@ -13,6 +13,6 @@ if(TESTS_BXT)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_bxt})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files(copy_test_files_bxt bxt)
|
||||
add_dependencies(unit_tests copy_test_files_bxt)
|
||||
neo_copy_test_files_with_revision(copy_test_files_bxt_0 bxt 0)
|
||||
add_dependencies(unit_tests copy_test_files_bxt_0)
|
||||
endif()
|
||||
|
@ -12,6 +12,6 @@ if(TESTS_CFL)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_cfl})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files(copy_test_files_cfl cfl)
|
||||
add_dependencies(unit_tests copy_test_files_cfl)
|
||||
neo_copy_test_files_with_revision(copy_test_files_cfl_0 cfl 0)
|
||||
add_dependencies(unit_tests copy_test_files_cfl_0)
|
||||
endif()
|
||||
|
@ -12,6 +12,6 @@ if(TESTS_GLK)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_glk})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files(copy_test_files_glk glk)
|
||||
add_dependencies(unit_tests copy_test_files_glk)
|
||||
neo_copy_test_files_with_revision(copy_test_files_glk_0 glk 0)
|
||||
add_dependencies(unit_tests copy_test_files_glk_0)
|
||||
endif()
|
||||
|
@ -12,6 +12,6 @@ if(TESTS_KBL)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_kbl})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files(copy_test_files_kbl kbl)
|
||||
add_dependencies(unit_tests copy_test_files_kbl)
|
||||
neo_copy_test_files_with_revision(copy_test_files_kbl_0 kbl 0)
|
||||
add_dependencies(unit_tests copy_test_files_kbl_0)
|
||||
endif()
|
||||
|
@ -18,6 +18,6 @@ if(TESTS_SKL)
|
||||
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_skl})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files(copy_test_files_skl skl)
|
||||
add_dependencies(unit_tests copy_test_files_skl)
|
||||
neo_copy_test_files_with_revision(copy_test_files_skl_0 skl 0)
|
||||
add_dependencies(unit_tests copy_test_files_skl_0)
|
||||
endif()
|
||||
|
@ -210,7 +210,7 @@ int main(int argc, char **argv) {
|
||||
uint32_t euPerSubSlice = 0;
|
||||
uint32_t sliceCount = 0;
|
||||
uint32_t subSlicePerSliceCount = 0;
|
||||
int32_t revId = -1;
|
||||
int32_t revId = 0;
|
||||
int dieRecovery = 0;
|
||||
|
||||
for (int i = 1; i < argc; ++i) {
|
||||
@ -305,10 +305,7 @@ int main(int argc, char **argv) {
|
||||
renderCoreFamily = hwInfoForTests.platform.eRenderCoreFamily;
|
||||
uint32_t threadsPerEu = hwInfoConfigFactory[productFamily]->threadsPerEu;
|
||||
PLATFORM &platform = hwInfoForTests.platform;
|
||||
|
||||
if (revId != -1) {
|
||||
platform.usRevId = revId;
|
||||
}
|
||||
platform.usRevId = revId;
|
||||
|
||||
uint64_t hwInfoConfig = defaultHardwareInfoConfigTable[productFamily];
|
||||
setHwInfoValuesFromConfig(hwInfoConfig, hwInfoForTests);
|
||||
@ -339,6 +336,8 @@ int main(int argc, char **argv) {
|
||||
nBinaryKernelFiles.append("/");
|
||||
nBinaryKernelFiles.append(binaryNameSuffix);
|
||||
nBinaryKernelFiles.append("/");
|
||||
nBinaryKernelFiles.append(std::to_string(revId));
|
||||
nBinaryKernelFiles.append("/");
|
||||
nBinaryKernelFiles.append(testFiles);
|
||||
testFiles = nBinaryKernelFiles;
|
||||
|
||||
@ -346,11 +345,15 @@ int main(int argc, char **argv) {
|
||||
nClFiles.append("/");
|
||||
nClFiles.append(hardwarePrefix[productFamily]);
|
||||
nClFiles.append("/");
|
||||
nClFiles.append(std::to_string(revId));
|
||||
nClFiles.append("/");
|
||||
nClFiles.append(clFiles);
|
||||
clFiles = nClFiles;
|
||||
|
||||
std::string executionDirectory(hardwarePrefix[productFamily]);
|
||||
executionDirectory += NEO::executionDirectorySuffix; // _aub for aub_tests, empty otherwise
|
||||
executionDirectory += "/";
|
||||
executionDirectory += std::to_string(revId);
|
||||
|
||||
#ifdef WIN32
|
||||
#include <direct.h>
|
||||
|
@ -9,21 +9,22 @@ list(GET mt_test_config 0 product)
|
||||
list(GET mt_test_config 1 slices)
|
||||
list(GET mt_test_config 2 subslices)
|
||||
list(GET mt_test_config 3 eu_per_ss)
|
||||
list(GET mt_test_config 4 revision_id)
|
||||
|
||||
add_custom_target(run_${product}_mt_unit_tests DEPENDS igdrcl_mt_tests)
|
||||
add_custom_target(run_${product}_${revision_id}_mt_unit_tests DEPENDS igdrcl_mt_tests)
|
||||
if(NOT WIN32)
|
||||
add_dependencies(run_${product}_mt_unit_tests copy_test_files_${product})
|
||||
add_dependencies(run_${product}_${revision_id}_mt_unit_tests copy_test_files_${product}_${revision_id})
|
||||
endif()
|
||||
|
||||
add_dependencies(run_mt_unit_tests run_${product}_mt_unit_tests)
|
||||
set_target_properties(run_${product}_mt_unit_tests PROPERTIES FOLDER "${PLATFORM_SPECIFIC_TEST_TARGETS_FOLDER}/${product}")
|
||||
add_dependencies(run_mt_unit_tests run_${product}_${revision_id}_mt_unit_tests)
|
||||
set_target_properties(run_${product}_${revision_id}_mt_unit_tests PROPERTIES FOLDER "${PLATFORM_SPECIFIC_TEST_TARGETS_FOLDER}/${product}/${revision_id}")
|
||||
|
||||
add_custom_command(
|
||||
TARGET run_${product}_mt_unit_tests
|
||||
TARGET run_${product}_${revision_id}_mt_unit_tests
|
||||
POST_BUILD
|
||||
COMMAND WORKING_DIRECTORY ${TargetDir}
|
||||
COMMAND echo "Running igdrcl_mt_tests ${product} ${slices}x${subslices}x${eu_per_ss}"
|
||||
COMMAND igdrcl_mt_tests --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} --gtest_repeat=${GTEST_REPEAT} ${igdrcl_mt_tests_LISTENER_OPTION}
|
||||
COMMAND igdrcl_mt_tests --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} --gtest_repeat=${GTEST_REPEAT} ${igdrcl_mt_tests_LISTENER_OPTION} --rev_id ${revision_id}
|
||||
)
|
||||
|
||||
add_dependencies(run_${product}_mt_unit_tests prepare_test_kernels)
|
||||
add_dependencies(run_${product}_${revision_id}_mt_unit_tests prepare_test_kernels)
|
||||
|
@ -5,6 +5,6 @@
|
||||
#
|
||||
|
||||
if(TESTS_ICLLP)
|
||||
set(mt_test_config "icllp/1/8/8")
|
||||
set(mt_test_config "icllp/1/8/8/0")
|
||||
include(${OPENCL_MT_TEST_DIR}/cmake/run_mt_test_target.cmake)
|
||||
endif()
|
||||
|
@ -5,6 +5,6 @@
|
||||
#
|
||||
|
||||
if(TESTS_TGLLP)
|
||||
set(mt_test_config "tgllp/1/6/16")
|
||||
set(mt_test_config "tgllp/1/6/16/0")
|
||||
include(${OPENCL_MT_TEST_DIR}/cmake/run_mt_test_target.cmake)
|
||||
endif()
|
||||
|
@ -5,6 +5,6 @@
|
||||
#
|
||||
|
||||
if(TESTS_BDW)
|
||||
set(mt_test_config "bdw/1/3/8")
|
||||
set(mt_test_config "bdw/1/3/8/0")
|
||||
include(${OPENCL_MT_TEST_DIR}/cmake/run_mt_test_target.cmake)
|
||||
endif()
|
||||
|
@ -5,6 +5,6 @@
|
||||
#
|
||||
|
||||
if(TESTS_SKL)
|
||||
set(mt_test_config "skl/1/3/8")
|
||||
set(mt_test_config "skl/1/3/8/0")
|
||||
include(${OPENCL_MT_TEST_DIR}/cmake/run_mt_test_target.cmake)
|
||||
endif()
|
||||
|
@ -112,11 +112,13 @@ macro(macro_for_each_platform)
|
||||
if("${PLATFORM_IT_LOWER}" STREQUAL "${CLOC_LIB_DEFAULT_DEVICE}")
|
||||
foreach(PLATFORM_TYPE ${PLATFORM_TYPES})
|
||||
if(${PLATFORM_IT}_IS_${PLATFORM_TYPE})
|
||||
get_family_name_with_type(${GEN_TYPE} ${PLATFORM_TYPE})
|
||||
add_dependencies(run_ocloc_tests prepare_test_kernels_${family_name_with_type})
|
||||
neo_copy_test_files(copy_test_files_${family_name_with_type} ${family_name_with_type})
|
||||
add_dependencies(run_ocloc_tests copy_test_files_${family_name_with_type})
|
||||
set(run_tests_cmd ocloc_tests --device ${CLOC_LIB_DEFAULT_DEVICE} --family_type ${family_name_with_type})
|
||||
foreach(REVISION_ID ${${GEN_TYPE}_REVISIONS})
|
||||
get_family_name_with_type(${GEN_TYPE} ${PLATFORM_TYPE})
|
||||
add_dependencies(run_ocloc_tests prepare_test_kernels_${family_name_with_type}_${REVISION_ID})
|
||||
neo_copy_test_files(copy_test_files_${family_name_with_type} ${family_name_with_type})
|
||||
add_dependencies(run_ocloc_tests copy_test_files_${family_name_with_type})
|
||||
set(run_tests_cmd ocloc_tests --device ${CLOC_LIB_DEFAULT_DEVICE} --family_type ${family_name_with_type} --rev_id ${REVISION_ID})
|
||||
endforeach()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
@ -39,6 +39,7 @@ int main(int argc, char **argv) {
|
||||
bool useDefaultListener = false;
|
||||
std::string devicePrefix("skl");
|
||||
std::string familyNameWithType("Gen9core");
|
||||
std::string revId("0");
|
||||
|
||||
#if defined(__linux__)
|
||||
if (getenv("CLOC_SELFTEST") == nullptr) {
|
||||
@ -72,6 +73,9 @@ int main(int argc, char **argv) {
|
||||
} else if (strcmp("--family_type", argv[i]) == 0) {
|
||||
++i;
|
||||
familyNameWithType = argv[i];
|
||||
} else if (strcmp("--rev_id", argv[i]) == 0) {
|
||||
++i;
|
||||
revId = argv[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -83,6 +87,8 @@ int main(int argc, char **argv) {
|
||||
nTestFiles.append("/");
|
||||
nTestFiles.append(familyNameWithType);
|
||||
nTestFiles.append("/");
|
||||
nTestFiles.append(revId);
|
||||
nTestFiles.append("/");
|
||||
nTestFiles.append(testFiles);
|
||||
testFiles = nTestFiles;
|
||||
binaryNameSuffix.append(familyNameWithType);
|
||||
|
@ -207,7 +207,7 @@ int main(int argc, char **argv) {
|
||||
uint32_t euPerSubSlice = 0;
|
||||
uint32_t sliceCount = 0;
|
||||
uint32_t subSlicePerSliceCount = 0;
|
||||
int32_t revId = -1;
|
||||
int32_t revId = 0;
|
||||
int dieRecovery = 0;
|
||||
|
||||
for (int i = 1; i < argc; ++i) {
|
||||
@ -302,10 +302,7 @@ int main(int argc, char **argv) {
|
||||
renderCoreFamily = hwInfoForTests.platform.eRenderCoreFamily;
|
||||
uint32_t threadsPerEu = hwInfoConfigFactory[productFamily]->threadsPerEu;
|
||||
PLATFORM &platform = hwInfoForTests.platform;
|
||||
|
||||
if (revId != -1) {
|
||||
platform.usRevId = revId;
|
||||
}
|
||||
platform.usRevId = revId;
|
||||
|
||||
uint64_t hwInfoConfig = defaultHardwareInfoConfigTable[productFamily];
|
||||
setHwInfoValuesFromConfig(hwInfoConfig, hwInfoForTests);
|
||||
@ -336,11 +333,15 @@ int main(int argc, char **argv) {
|
||||
testBinaryFiles.append("/");
|
||||
testBinaryFiles.append(binaryNameSuffix);
|
||||
testBinaryFiles.append("/");
|
||||
testBinaryFiles.append(std::to_string(revId));
|
||||
testBinaryFiles.append("/");
|
||||
testBinaryFiles.append(testFiles);
|
||||
testFiles = testBinaryFiles;
|
||||
|
||||
std::string executionDirectory(hardwarePrefix[productFamily]);
|
||||
executionDirectory += NEO::executionDirectorySuffix; // _aub for aub_tests, empty otherwise
|
||||
executionDirectory += "/";
|
||||
executionDirectory += std::to_string(revId);
|
||||
|
||||
#ifdef WIN32
|
||||
#include <direct.h>
|
||||
|
@ -16,9 +16,9 @@ if(NOT DEFINED cloc_cmd_prefix)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
function(compile_kernels_gen platform_name_with_type platform_name suffix)
|
||||
function(compile_kernels_gen platform_name_with_type revision_id platform_name suffix)
|
||||
|
||||
set(outputdir "${TargetDir}/${suffix}/test_files/${NEO_ARCH}/")
|
||||
set(outputdir "${TargetDir}/${suffix}/${revision_id}/test_files/${NEO_ARCH}/")
|
||||
set(compiled_kernels)
|
||||
|
||||
foreach(filepath ${ARGN})
|
||||
@ -36,7 +36,7 @@ function(compile_kernels_gen platform_name_with_type platform_name suffix)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${output_files}
|
||||
COMMAND ${cloc_cmd_prefix} -file ${filename} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir}
|
||||
COMMAND ${cloc_cmd_prefix} -file ${filename} -device ${platform_name} -${NEO_BITS} -out_dir ${outputdir} -revision_id ${revision_id}
|
||||
WORKING_DIRECTORY ${workdir}
|
||||
DEPENDS ${filepath} ocloc copy_compiler_files
|
||||
)
|
||||
@ -44,13 +44,13 @@ function(compile_kernels_gen platform_name_with_type platform_name suffix)
|
||||
list(APPEND compiled_kernels ${output_files})
|
||||
|
||||
endforeach()
|
||||
list(APPEND compiled_kernels_${platform_name_with_type} ${compiled_kernels})
|
||||
set(compiled_kernels_${platform_name_with_type} ${compiled_kernels_${platform_name_with_type}} PARENT_SCOPE)
|
||||
list(APPEND compiled_kernels_${platform_name_with_type}_${revision_id} ${compiled_kernels})
|
||||
set(compiled_kernels_${platform_name_with_type}_${revision_id} ${compiled_kernels_${platform_name_with_type}_${revision_id}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(neo_shared_copy_test_files target product)
|
||||
function(neo_shared_copy_test_files target product revision_id)
|
||||
string(TOLOWER ${product} product)
|
||||
set(dest_dir "${TargetDir}/${product}/test_files")
|
||||
set(dest_dir "${TargetDir}/${product}/${revision_id}/test_files")
|
||||
set(source_dir "${NEO_SOURCE_DIR}/shared/test/unit_test/test_files")
|
||||
add_custom_target(${target})
|
||||
add_custom_command(
|
||||
@ -62,15 +62,17 @@ function(neo_shared_copy_test_files target product)
|
||||
DEPENDS ${source_dir}
|
||||
)
|
||||
add_dependencies(${target} copy_compiler_files)
|
||||
set_target_properties(${target} PROPERTIES FOLDER "${PLATFORM_SPECIFIC_TEST_TARGETS_FOLDER}/${product}")
|
||||
set_target_properties(${target} PROPERTIES FOLDER "${PLATFORM_SPECIFIC_TEST_TARGETS_FOLDER}/${product}/${revision_id}")
|
||||
endfunction()
|
||||
|
||||
file(GLOB_RECURSE TEST_KERNELS *.cl)
|
||||
add_custom_target(prepare_test_kernel_for_shared)
|
||||
|
||||
macro(macro_for_each_platform)
|
||||
neo_shared_copy_test_files(copy_test_kernel_${PLATFORM_IT} ${PLATFORM_IT})
|
||||
add_dependencies(prepare_test_kernel_for_shared copy_test_kernel_${PLATFORM_IT})
|
||||
foreach(REVISION_ID ${${GEN_TYPE}_REVISIONS})
|
||||
neo_shared_copy_test_files(copy_test_kernel_${PLATFORM_IT}_${REVISION_ID} ${PLATFORM_IT} ${REVISION_ID})
|
||||
add_dependencies(prepare_test_kernel_for_shared copy_test_kernel_${PLATFORM_IT}_${REVISION_ID})
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
macro(macro_for_each_gen)
|
||||
@ -81,13 +83,13 @@ macro(macro_for_each_gen)
|
||||
|
||||
get_family_name_with_type(${GEN_TYPE} ${PLATFORM_TYPE})
|
||||
set(PLATFORM_LOWER ${DEFAULT_SUPPORTED_${GEN_TYPE}_${PLATFORM_TYPE}_PLATFORM})
|
||||
foreach(REVISION_ID ${${GEN_TYPE}_REVISIONS})
|
||||
compile_kernels_gen(${family_name_with_type} ${REVISION_ID} ${PLATFORM_LOWER} ${family_name_with_type} ${TEST_KERNELS})
|
||||
|
||||
compile_kernels_gen(${family_name_with_type} ${PLATFORM_LOWER} ${family_name_with_type} ${TEST_KERNELS})
|
||||
|
||||
add_custom_target(prepare_test_kernel_for_shared_${family_name_with_type} DEPENDS ${compiled_kernels_${family_name_with_type}})
|
||||
set_target_properties(prepare_test_kernel_for_shared_${family_name_with_type} PROPERTIES FOLDER "${PLATFORM_SPECIFIC_TEST_TARGETS_FOLDER}/${family_name_with_type}")
|
||||
add_dependencies(prepare_test_kernel_for_shared prepare_test_kernel_for_shared_${family_name_with_type})
|
||||
|
||||
add_custom_target(prepare_test_kernel_for_shared_${family_name_with_type}_${REVISION_ID} DEPENDS ${compiled_kernels_${family_name_with_type}_${REVISION_ID}})
|
||||
set_target_properties(prepare_test_kernel_for_shared_${family_name_with_type}_${REVISION_ID} PROPERTIES FOLDER "${PLATFORM_SPECIFIC_TEST_TARGETS_FOLDER}/${family_name_with_type}/${REVISION_ID}")
|
||||
add_dependencies(prepare_test_kernel_for_shared prepare_test_kernel_for_shared_${family_name_with_type}_${REVISION_ID})
|
||||
endforeach()
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
@ -5,6 +5,6 @@
|
||||
#
|
||||
|
||||
if(TESTS_EHL)
|
||||
set(unit_test_config "ehl/1/4/8")
|
||||
set(unit_test_config "ehl/1/4/8/0")
|
||||
include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake)
|
||||
endif()
|
||||
|
@ -5,6 +5,6 @@
|
||||
#
|
||||
|
||||
if(TESTS_ICLLP)
|
||||
set(unit_test_config "icllp/1/8/8")
|
||||
set(unit_test_config "icllp/1/8/8/0")
|
||||
include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake)
|
||||
endif()
|
||||
|
@ -5,6 +5,6 @@
|
||||
#
|
||||
|
||||
if(TESTS_LKF)
|
||||
set(unit_test_config "lkf/1/8/8")
|
||||
set(unit_test_config "lkf/1/8/8/0")
|
||||
include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake)
|
||||
endif()
|
||||
|
@ -5,6 +5,6 @@
|
||||
#
|
||||
|
||||
if(TESTS_RKL)
|
||||
set(unit_test_config "rkl/1/2/16")
|
||||
set(unit_test_config "rkl/1/2/16/0")
|
||||
include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake)
|
||||
endif()
|
||||
|
@ -5,6 +5,6 @@
|
||||
#
|
||||
|
||||
if(TESTS_TGLLP)
|
||||
set(unit_test_config "tgllp/1/6/16")
|
||||
set(unit_test_config "tgllp/1/6/16/0")
|
||||
include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake)
|
||||
endif()
|
||||
|
@ -5,6 +5,6 @@
|
||||
#
|
||||
|
||||
if(TESTS_BDW)
|
||||
set(unit_test_config "bdw/1/3/8")
|
||||
set(unit_test_config "bdw/1/3/8/0")
|
||||
include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake)
|
||||
endif()
|
||||
|
@ -5,6 +5,6 @@
|
||||
#
|
||||
|
||||
if(TESTS_BXT)
|
||||
set(unit_test_config "bxt/1/3/6")
|
||||
set(unit_test_config "bxt/1/3/6/0")
|
||||
include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake)
|
||||
endif()
|
||||
|
@ -5,6 +5,6 @@
|
||||
#
|
||||
|
||||
if(TESTS_CFL)
|
||||
set(unit_test_config "cfl/1/3/6")
|
||||
set(unit_test_config "cfl/1/3/6/0")
|
||||
include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake)
|
||||
endif()
|
||||
|
@ -5,6 +5,6 @@
|
||||
#
|
||||
|
||||
if(TESTS_GLK)
|
||||
set(unit_test_config "glk/1/3/6")
|
||||
set(unit_test_config "glk/1/3/6/0")
|
||||
include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake)
|
||||
endif()
|
||||
|
@ -5,6 +5,6 @@
|
||||
#
|
||||
|
||||
if(TESTS_KBL)
|
||||
set(unit_test_config "kbl/1/3/6")
|
||||
set(unit_test_config "kbl/1/3/6/0")
|
||||
include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake)
|
||||
endif()
|
||||
|
@ -5,6 +5,6 @@
|
||||
#
|
||||
|
||||
if(TESTS_SKL)
|
||||
set(unit_test_config "skl/1/3/8")
|
||||
set(unit_test_config "skl/1/3/8/0")
|
||||
include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake)
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user