mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-18 22:08:53 +08:00
build: add cmake flag to select platforms for aub generation
Related-To: NEO-11097 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
cd563c2761
commit
8676b97412
@@ -256,6 +256,13 @@ if(NEO_SKIP_UNIT_TESTS)
|
||||
set(NEO_SKIP_L0_BLACK_BOX_TESTS TRUE)
|
||||
endif()
|
||||
|
||||
if(DEFINED NEO_GENERATE_AUBS_FOR)
|
||||
if(DEFINED NEO_SKIP_AUB_TESTS_RUN AND NEO_SKIP_AUB_TESTS_RUN)
|
||||
message(FATAL_ERROR "Invalid cmake flags combination, NEO_GENERATE_AUBS_FOR assumes aub tests execution is not skipped")
|
||||
endif()
|
||||
set(NEO_SKIP_AUB_TESTS_RUN FALSE)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED NEO_SKIP_AUB_TESTS_RUN)
|
||||
set(NEO_SKIP_AUB_TESTS_RUN TRUE)
|
||||
endif()
|
||||
|
||||
@@ -34,6 +34,24 @@ if(NOT NEO_SKIP_OCL_UNIT_TESTS OR NOT NEO_SKIP_L0_UNIT_TESTS)
|
||||
list(APPEND aub_tests_options ${AUB_DUMP_IMAGE_FORMAT})
|
||||
endif()
|
||||
|
||||
set(aubstream_mode_flag "")
|
||||
if(DEFINED NEO_GENERATE_AUBS_FOR)
|
||||
set(aubstream_mode_flag "--null_aubstream")
|
||||
foreach(product_with_aubs ${NEO_GENERATE_AUBS_FOR})
|
||||
string(TOLOWER ${product_with_aubs} product_with_aubs_lower)
|
||||
if(${product_with_aubs_lower} STREQUAL ${product})
|
||||
set(aubstream_mode_flag "")
|
||||
string(TOUPPER ${product} product_upper)
|
||||
set_property(GLOBAL APPEND PROPERTY NEO_PLATFORMS_FOR_AUB_GENERATION "${product_upper} ")
|
||||
break()
|
||||
endif()
|
||||
|
||||
endforeach()
|
||||
endif()
|
||||
if(NOT ${aubstream_mode_flag} STREQUAL "")
|
||||
list(APPEND aub_tests_options ${aubstream_mode_flag})
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
TARGET run_${product}_${revision_id}_aub_tests
|
||||
POST_BUILD
|
||||
|
||||
@@ -24,7 +24,6 @@ XE_HPC_CORETEST_F(XeHpcCoreAubMemDumpTests, whenAubCsrIsCreatedThenCreateHardwar
|
||||
DebugManagerStateRestore restore;
|
||||
VariableBackup<UltHwConfig> backup(&ultHwConfig);
|
||||
ultHwConfig.useHwCsr = true;
|
||||
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(CommandStreamReceiverType::aub));
|
||||
|
||||
std::unique_ptr<MockDevice> device(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ XE_HPG_CORETEST_F(XeHpgCoreAubMemDumpTests, whenAubCsrIsCreatedThenCreateHardwar
|
||||
DebugManagerStateRestore restore;
|
||||
VariableBackup<UltHwConfig> backup(&ultHwConfig);
|
||||
ultHwConfig.useHwCsr = true;
|
||||
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(CommandStreamReceiverType::aub));
|
||||
|
||||
std::unique_ptr<MockDevice> device(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ void adjustHwInfoForTests(HardwareInfo &hwInfoForTests, uint32_t euPerSubSlice,
|
||||
uint32_t threadsPerEu = releaseHelper ? releaseHelper->getNumThreadsPerEu() : 7u;
|
||||
|
||||
// set Gt and FeatureTable to initial state
|
||||
bool setupFeatureTableAndWorkaroundTable = testMode == TestMode::aubTests ? true : false;
|
||||
bool setupFeatureTableAndWorkaroundTable = isAubTestMode(testMode);
|
||||
hardwareInfoSetup[hwInfoForTests.platform.eProductFamily](&hwInfoForTests, setupFeatureTableAndWorkaroundTable, hwInfoConfig, releaseHelper.get());
|
||||
GT_SYSTEM_INFO >SystemInfo = hwInfoForTests.gtSystemInfo;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2020-2022 Intel Corporation
|
||||
# Copyright (C) 2020-2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
@@ -8,6 +8,13 @@ if(DEFINED AUB_STREAM_PROJECT_NAME)
|
||||
add_custom_target(run_aub_tests)
|
||||
set(AUB_TESTS_TARGETS_FOLDER "aub_product_targets")
|
||||
set_target_properties(run_aub_tests PROPERTIES FOLDER ${AUB_TESTS_TARGETS_FOLDER})
|
||||
set_property(GLOBAL PROPERTY NEO_PLATFORMS_FOR_AUB_GENERATION)
|
||||
|
||||
add_subdirectories()
|
||||
|
||||
if(DEFINED NEO_GENERATE_AUBS_FOR)
|
||||
get_property(NEO_PLATFORMS_FOR_AUB_GENERATION GLOBAL PROPERTY NEO_PLATFORMS_FOR_AUB_GENERATION)
|
||||
message(STATUS "Aub generation scope restricted by NEO_GENERATE_AUBS_FOR flag")
|
||||
message(STATUS "All tested platforms with aub generation: " ${NEO_PLATFORMS_FOR_AUB_GENERATION})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user