mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
cmake cleanup
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
c2147e3233
commit
28edaa9a2d
@ -16,7 +16,6 @@ add_custom_target(run_${product}_${revision_id}_aub_tests ALL)
|
||||
if(NOT NEO_SKIP_OCL_UNIT_TESTS OR NOT NEO_SKIP_L0_UNIT_TESTS)
|
||||
|
||||
if(NOT NEO_SKIP_OCL_UNIT_TESTS)
|
||||
add_dependencies(run_${product}_${revision_id}_aub_tests copy_test_files_per_product)
|
||||
add_dependencies(run_${product}_${revision_id}_aub_tests prepare_test_kernels_for_ocl)
|
||||
add_dependencies(run_${product}_${revision_id}_aub_tests prepare_test_kernels_for_shared)
|
||||
endif()
|
||||
|
@ -54,11 +54,14 @@ if(NOT NEO_SKIP_OCL_UNIT_TESTS)
|
||||
add_custom_target(run_${product}_${revision_id}_ocl_tests DEPENDS unit_tests)
|
||||
set_target_properties(run_${product}_${revision_id}_ocl_tests PROPERTIES FOLDER "${PLATFORM_SPECIFIC_TEST_TARGETS_FOLDER}/${product}/${revision_id}")
|
||||
|
||||
set(outputdir "${TargetDir}/opencl/${product}/${revision_id}")
|
||||
add_custom_command(
|
||||
TARGET run_${product}_${revision_id}_ocl_tests
|
||||
POST_BUILD
|
||||
COMMAND WORKING_DIRECTORY ${TargetDir}
|
||||
COMMAND echo Running igdrcl_tests ${target} ${slices}x${subslices}x${eu_per_ss} in ${TargetDir}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${outputdir}/cl_cache
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${outputdir}/cl_cache
|
||||
COMMAND echo Cmd line: ${GTEST_ENV} ${NEO_RUN_INTERCEPTOR_LIST} $<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} ${GTEST_OUTPUT} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id}
|
||||
COMMAND ${GTEST_ENV} ${NEO_RUN_INTERCEPTOR_LIST} $<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} ${GTEST_OUTPUT} ${NEO_TESTS_LISTENER_OPTION} ${GTEST_FILTER_OPTION} --rev_id ${revision_id}
|
||||
)
|
||||
|
@ -23,9 +23,7 @@ link_libraries(${ASAN_LIBS} ${TSAN_LIBS})
|
||||
|
||||
add_custom_target(prepare_test_kernels_for_ocl)
|
||||
add_dependencies(prepare_test_kernels_for_ocl ${BUILTINS_BINARIES_BINDFUL_LIB_NAME})
|
||||
add_custom_target(copy_test_files_per_product)
|
||||
add_custom_target(run_unit_tests ALL)
|
||||
add_dependencies(unit_tests copy_test_files_per_product)
|
||||
|
||||
add_custom_target(run_ocl_tests)
|
||||
set_target_properties(run_ocl_tests PROPERTIES FOLDER ${PLATFORM_SPECIFIC_TEST_TARGETS_FOLDER})
|
||||
@ -107,36 +105,6 @@ target_link_libraries(igdrcl_tests gmock-gtest ${NEO_EXTRA_LIBS})
|
||||
|
||||
set(BUILT_IN_KERNEL_DIR "${NEO_SOURCE_DIR}/shared/source/built_ins")
|
||||
|
||||
function(neo_copy_test_files target product)
|
||||
set(outputdir "${TargetDir}/opencl/${product}")
|
||||
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 WORKING_DIRECTORY ${TargetDir}
|
||||
)
|
||||
add_dependencies(${target} copy_compiler_files)
|
||||
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}/opencl/${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 WORKING_DIRECTORY ${TargetDir}
|
||||
)
|
||||
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
|
||||
prepare_test_kernels_for_ocl
|
||||
@ -150,7 +118,6 @@ if(UNIX)
|
||||
endif()
|
||||
|
||||
set_target_properties(unit_tests PROPERTIES FOLDER ${OPENCL_TEST_PROJECTS_FOLDER})
|
||||
set_target_properties(copy_test_files_per_product PROPERTIES FOLDER ${OPENCL_TEST_PROJECTS_FOLDER})
|
||||
set_target_properties(prepare_test_kernels_for_ocl PROPERTIES FOLDER ${OPENCL_TEST_PROJECTS_FOLDER})
|
||||
set_target_properties(run_unit_tests PROPERTIES FOLDER ${OPENCL_TEST_PROJECTS_FOLDER})
|
||||
|
||||
|
@ -16,6 +16,4 @@ if(TESTS_EHL)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen11_ehl})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files_with_revision(copy_test_files_ehl_0 ehl 0)
|
||||
add_dependencies(copy_test_files_per_product copy_test_files_ehl_0)
|
||||
endif()
|
||||
|
@ -12,6 +12,4 @@ if(TESTS_ICLLP)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen11_icllp})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files_with_revision(copy_test_files_icllp_0 icllp 0)
|
||||
add_dependencies(copy_test_files_per_product copy_test_files_icllp_0)
|
||||
endif()
|
||||
|
@ -11,6 +11,4 @@ if(TESTS_LKF)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen11_lkf})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files_with_revision(copy_test_files_lkf_0 lkf 0)
|
||||
add_dependencies(copy_test_files_per_product copy_test_files_lkf_0)
|
||||
endif()
|
||||
|
@ -7,6 +7,4 @@
|
||||
if(TESTS_ADLN)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}excludes_ocl_adln.cmake)
|
||||
add_subdirectories()
|
||||
neo_copy_test_files_with_revision(copy_test_files_adln_0 adln 0)
|
||||
add_dependencies(copy_test_files_per_product copy_test_files_adln_0)
|
||||
endif()
|
||||
|
@ -21,6 +21,4 @@ if(TESTS_ADLP)
|
||||
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen12lp_adlp})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files_with_revision(copy_test_files_adlp_0 adlp 0)
|
||||
add_dependencies(copy_test_files_per_product copy_test_files_adlp_0)
|
||||
endif()
|
||||
|
@ -17,6 +17,4 @@ if(TESTS_ADLS)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen12lp_adls})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files_with_revision(copy_test_files_adls_0 adls 0)
|
||||
add_dependencies(copy_test_files_per_product copy_test_files_adls_0)
|
||||
endif()
|
||||
|
@ -20,6 +20,4 @@ if(TESTS_DG1)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_dg1})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files_with_revision(copy_test_files_dg1_0 dg1 0)
|
||||
add_dependencies(copy_test_files_per_product copy_test_files_dg1_0)
|
||||
endif()
|
||||
|
@ -18,6 +18,4 @@ if(TESTS_RKL)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen12lp_rkl})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files_with_revision(copy_test_files_rkl_0 rkl 0)
|
||||
add_dependencies(copy_test_files_per_product copy_test_files_rkl_0)
|
||||
endif()
|
||||
|
@ -19,6 +19,4 @@ if(TESTS_TGLLP)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen12lp_tgllp})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files_with_revision(copy_test_files_tgllp_0 tgllp 0)
|
||||
add_dependencies(copy_test_files_per_product copy_test_files_tgllp_0)
|
||||
endif()
|
||||
|
@ -1,11 +1,9 @@
|
||||
#
|
||||
# Copyright (C) 2018-2021 Intel Corporation
|
||||
# Copyright (C) 2018-2022 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(TESTS_BDW)
|
||||
add_subdirectories()
|
||||
neo_copy_test_files_with_revision(copy_test_files_bdw_0 bdw 0)
|
||||
add_dependencies(copy_test_files_per_product copy_test_files_bdw_0)
|
||||
endif()
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2018-2020 Intel Corporation
|
||||
# Copyright (C) 2018-2022 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
@ -13,6 +13,4 @@ if(TESTS_BXT)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_bxt})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files_with_revision(copy_test_files_bxt_0 bxt 0)
|
||||
add_dependencies(copy_test_files_per_product copy_test_files_bxt_0)
|
||||
endif()
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2018-2020 Intel Corporation
|
||||
# Copyright (C) 2018-2022 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
@ -12,6 +12,4 @@ if(TESTS_CFL)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_cfl})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files_with_revision(copy_test_files_cfl_9 cfl 9)
|
||||
add_dependencies(copy_test_files_per_product copy_test_files_cfl_9)
|
||||
endif()
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2018-2020 Intel Corporation
|
||||
# Copyright (C) 2018-2022 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
@ -12,6 +12,4 @@ if(TESTS_GLK)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_glk})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files_with_revision(copy_test_files_glk_0 glk 0)
|
||||
add_dependencies(copy_test_files_per_product copy_test_files_glk_0)
|
||||
endif()
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2018-2020 Intel Corporation
|
||||
# Copyright (C) 2018-2022 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
@ -12,6 +12,4 @@ if(TESTS_KBL)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_kbl})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files_with_revision(copy_test_files_kbl_9 kbl 9)
|
||||
add_dependencies(copy_test_files_per_product copy_test_files_kbl_9)
|
||||
endif()
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2018-2020 Intel Corporation
|
||||
# Copyright (C) 2018-2022 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
@ -18,6 +18,4 @@ if(TESTS_SKL)
|
||||
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_skl})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files_with_revision(copy_test_files_skl_9 skl 9)
|
||||
add_dependencies(copy_test_files_per_product copy_test_files_skl_9)
|
||||
endif()
|
||||
|
@ -45,7 +45,6 @@ endif()
|
||||
add_dependencies(igdrcl_mt_tests
|
||||
prepare_test_kernels_for_shared
|
||||
prepare_test_kernels_for_ocl
|
||||
copy_test_files_per_product
|
||||
)
|
||||
create_project_source_tree(igdrcl_mt_tests)
|
||||
|
||||
|
@ -156,9 +156,6 @@ macro(macro_for_each_platform)
|
||||
get_family_name_with_type(${CORE_TYPE} ${PLATFORM_TYPE})
|
||||
add_dependencies(run_ocloc_tests prepare_test_kernels_${family_name_with_type}_${REVISION_ID})
|
||||
add_dependencies(unit_tests prepare_test_kernels_${family_name_with_type}_${REVISION_ID})
|
||||
neo_copy_test_files(copy_test_files_${family_name_with_type}_${REVISION_ID} ${family_name_with_type})
|
||||
add_dependencies(run_ocloc_tests copy_test_files_${family_name_with_type}_${REVISION_ID})
|
||||
add_dependencies(unit_tests copy_test_files_${family_name_with_type}_${REVISION_ID})
|
||||
set(run_tests_cmd ocloc_tests --device ${CLOC_LIB_DEFAULT_DEVICE} --family_type ${family_name_with_type} --rev_id ${REVISION_ID})
|
||||
endif()
|
||||
endforeach()
|
||||
|
@ -28,6 +28,4 @@ if(TESTS_XE_HP_SDV)
|
||||
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_xe_hp_core_xehp})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files_with_revision(copy_test_files_xe_hp_sdv_4 xe_hp_sdv 4)
|
||||
add_dependencies(copy_test_files_per_product copy_test_files_xe_hp_sdv_4)
|
||||
endif()
|
||||
|
@ -17,8 +17,4 @@ if(TESTS_PVC)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_xe_hpc_core_pvc})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files_with_revision(copy_test_files_pvc_0 pvc 0)
|
||||
neo_copy_test_files_with_revision(copy_test_files_pvc_3 pvc 3)
|
||||
add_dependencies(copy_test_files_per_product copy_test_files_pvc_0)
|
||||
add_dependencies(copy_test_files_per_product copy_test_files_pvc_3)
|
||||
endif()
|
||||
|
@ -21,6 +21,4 @@ if(TESTS_DG2)
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_xe_hpg_core_dg2})
|
||||
add_subdirectories()
|
||||
neo_copy_test_files_with_revision(copy_test_files_dg2_0 dg2 0)
|
||||
add_dependencies(copy_test_files_per_product copy_test_files_dg2_0)
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user