mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
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 <jaroslaw.chodor@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
8217b76cef
commit
e053f3a839
@@ -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}")
|
||||
|
||||
@@ -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<uint8_t> linearStreamBackingMemory;
|
||||
size_t sizeNeededForCommandSream = 0;
|
||||
if (MemorySynchronizationCommands<FamilyType>::isBarrierPriorToPipelineSelectWaRequired(rootDeviceEnvironment)) {
|
||||
PipeControlArgs args;
|
||||
args.csStallOnly = true;
|
||||
args.renderTargetCacheFlushEnable = true;
|
||||
sizeNeededForCommandSream += MemorySynchronizationCommands<FamilyType>::getSizeForSingleBarrier(args.tlbInvalidation);
|
||||
}
|
||||
|
||||
sizeNeededForCommandSream += sizeof(PIPELINE_SELECT);
|
||||
linearStreamBackingMemory.resize(linearStreamBackingMemory.size() + sizeNeededForCommandSream);
|
||||
|
||||
PIPELINE_SELECT *cmd = reinterpret_cast<PIPELINE_SELECT *>(linearStreamBackingMemory.data() + linearStreamBackingMemory.size() - sizeof(PIPELINE_SELECT));
|
||||
*cmd = FamilyType::cmdInitPipelineSelect;
|
||||
|
||||
LinearStream pipelineSelectStream(linearStreamBackingMemory.data(), linearStreamBackingMemory.size());
|
||||
|
||||
PipelineSelectArgs pipelineArgs = {};
|
||||
pipelineArgs.systolicPipelineSelectSupport = PreambleHelper<FamilyType>::isSystolicModeConfigurable(rootDeviceEnvironment);
|
||||
@@ -434,5 +448,5 @@ HWTEST2_F(PipelineSelectTest, WhenProgramPipelineSelectThenProperMaskIsSet, IsWi
|
||||
expectedMask |= pipelineSelectSystolicModeEnableMaskBits;
|
||||
}
|
||||
|
||||
EXPECT_EQ(expectedMask, cmd.getMaskBits());
|
||||
EXPECT_EQ(expectedMask, cmd->getMaskBits());
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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")));
|
||||
|
||||
Reference in New Issue
Block a user