mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Add options to specify buffer and image dump formats to AUB unit tests
Related-To: NEO-3080 Change-Id: I23a310167b7fb06a7a85c0b5fed233f8050b28f2 Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
501bc88368
commit
561c6394be
@ -69,7 +69,16 @@ target_link_libraries(igdrcl_aub_tests gmock-gtest ${IGDRCL_EXTRA_LIBS})
|
||||
target_include_directories(igdrcl_aub_tests BEFORE PRIVATE ${IGDRCL_SOURCE_DIR}/unit_tests/gen_common${BRANCH_DIR_SUFFIX})
|
||||
|
||||
macro(macro_for_each_test_config)
|
||||
neo_run_aub_target(${PLATFORM_IT_LOWER} "${PLATFORM_IT} ${SLICES}x${SUBSLICES}x${EU_PER_SS}" ${PLATFORM_IT_LOWER} ${SLICES} ${SUBSLICES} ${EU_PER_SS})
|
||||
set(AUB_TESTS_OPTIONS "")
|
||||
if (NOT ${AUB_DUMP_BUFFER_FORMAT} STREQUAL "")
|
||||
list(APPEND AUB_TESTS_OPTIONS --dump_buffer_format)
|
||||
list(APPEND AUB_TESTS_OPTIONS ${AUB_DUMP_BUFFER_FORMAT})
|
||||
endif()
|
||||
if (NOT ${AUB_DUMP_IMAGE_FORMAT} STREQUAL "")
|
||||
list(APPEND AUB_TESTS_OPTIONS --dump_image_format)
|
||||
list(APPEND AUB_TESTS_OPTIONS ${AUB_DUMP_IMAGE_FORMAT})
|
||||
endif()
|
||||
neo_run_aub_target(${PLATFORM_IT_LOWER} "${PLATFORM_IT} ${SLICES}x${SUBSLICES}x${EU_PER_SS}" ${PLATFORM_IT_LOWER} ${SLICES} ${SUBSLICES} ${EU_PER_SS} "${AUB_TESTS_OPTIONS}")
|
||||
endmacro()
|
||||
|
||||
macro(macro_for_each_platform)
|
||||
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Copyright (C) 2017-2018 Intel Corporation
|
||||
# Copyright (C) 2017-2019 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
function(neo_run_aub_target gen gen_name product slices subslices eu_per_ss)
|
||||
function(neo_run_aub_target gen gen_name product slices subslices eu_per_ss options)
|
||||
add_custom_command(
|
||||
TARGET run_${gen}_aub_tests
|
||||
POST_BUILD
|
||||
@ -27,7 +27,7 @@ function(neo_run_aub_target gen gen_name product slices subslices eu_per_ss)
|
||||
POST_BUILD
|
||||
COMMAND WORKING_DIRECTORY ${TargetDir}
|
||||
COMMAND echo Running AUB generation for ${gen_name} in ${TargetDir}/${gen}_aub
|
||||
COMMAND ${aub_cmd_prefix} --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} --gtest_repeat=1 ${IGDRCL_TESTS_LISTENER_OPTION}
|
||||
COMMAND ${aub_cmd_prefix} --product ${product} --slices ${slices} --subslices ${subslices} --eu_per_ss ${eu_per_ss} --gtest_repeat=1 ${options} ${IGDRCL_TESTS_LISTENER_OPTION}
|
||||
)
|
||||
|
||||
if(DO_NOT_RUN_AUB_TESTS)
|
||||
|
@ -174,7 +174,6 @@ int main(int argc, char **argv) {
|
||||
bool useDefaultListener = false;
|
||||
bool enable_alarm = true;
|
||||
bool setupFeatureTableAndWorkaroundTable = testMode == TestMode::AubTests ? true : false;
|
||||
bool enableMemoryDumps = false;
|
||||
|
||||
applyWorkarounds();
|
||||
|
||||
@ -287,8 +286,16 @@ int main(int argc, char **argv) {
|
||||
DebugManager.setReaderImpl(SettingsReader::create());
|
||||
DebugManager.injectSettingsFromReader();
|
||||
}
|
||||
} else if (!strcmp("--enable_memory_dumps", argv[i]) && testMode == TestMode::AubTests) {
|
||||
enableMemoryDumps = true;
|
||||
} else if (!strcmp("--dump_buffer_format", argv[i]) && testMode == TestMode::AubTests) {
|
||||
++i;
|
||||
std::string dumpBufferFormat(argv[i]);
|
||||
std::transform(dumpBufferFormat.begin(), dumpBufferFormat.end(), dumpBufferFormat.begin(), ::toupper);
|
||||
DebugManager.flags.AUBDumpBufferFormat.set(dumpBufferFormat);
|
||||
} else if (!strcmp("--dump_image_format", argv[i]) && testMode == TestMode::AubTests) {
|
||||
++i;
|
||||
std::string dumpImageFormat(argv[i]);
|
||||
std::transform(dumpImageFormat.begin(), dumpImageFormat.end(), dumpImageFormat.begin(), ::toupper);
|
||||
DebugManager.flags.AUBDumpImageFormat.set(dumpImageFormat);
|
||||
}
|
||||
}
|
||||
|
||||
@ -296,11 +303,6 @@ int main(int argc, char **argv) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (enableMemoryDumps) {
|
||||
DebugManager.flags.AUBDumpBufferFormat.set("BIN");
|
||||
DebugManager.flags.AUBDumpImageFormat.set("TRE");
|
||||
}
|
||||
|
||||
uint32_t threadsPerEu = hwInfoConfigFactory[productFamily]->threadsPerEu;
|
||||
PLATFORM platform;
|
||||
auto hardwareInfo = hardwareInfoTable[productFamily];
|
||||
|
Reference in New Issue
Block a user