mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
feature: add heapless ult builtins compilation
Related-to: NEO-14489 Signed-off-by: Damian Tomczak <damian.tomczak@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9dd783e113
commit
3ab74c7fba
@@ -415,8 +415,12 @@ int main(int argc, char **argv) {
|
||||
} else {
|
||||
builtInsFileName = KernelBinaryHelper::BUILT_INS;
|
||||
}
|
||||
retrieveBinaryKernelFilename(fclDebugVars.fileName, builtInsFileName + "_", ".spv");
|
||||
retrieveBinaryKernelFilename(igcDebugVars.fileName, builtInsFileName + "_", ".bin");
|
||||
std::string options = "";
|
||||
if (defaultHwInfo->featureTable.flags.ftrHeaplessMode) {
|
||||
options = "-heapless";
|
||||
}
|
||||
retrieveBinaryKernelFilename(fclDebugVars.fileName, builtInsFileName + "_", ".spv", options);
|
||||
retrieveBinaryKernelFilename(igcDebugVars.fileName, builtInsFileName + "_", ".bin", options);
|
||||
|
||||
gEnvironment->setMockFileNames(fclDebugVars.fileName, igcDebugVars.fileName);
|
||||
gEnvironment->setDefaultDebugVars(fclDebugVars, igcDebugVars, hwInfoForTests);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -26,11 +26,11 @@ void retrieveBinaryKernelFilename(std::string &outputFilename, const std::string
|
||||
outputFilename.reserve(2 * testFiles.length());
|
||||
outputFilename.append(testFiles);
|
||||
outputFilename.append(kernelName);
|
||||
outputFilename.append(binaryNameSuffix);
|
||||
if (false == options.empty()) {
|
||||
outputFilename.append(options);
|
||||
outputFilename.append("_");
|
||||
}
|
||||
outputFilename.append(binaryNameSuffix);
|
||||
outputFilename.append(extension);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ function(compile_kernels_gen device revision_id platform_name use_stateless_suff
|
||||
|
||||
set(outputname_base "${basename}_${platform_name}")
|
||||
if(${use_heapless})
|
||||
set(outputname_base "${outputname_base}-heapless")
|
||||
set(outputname_base "${outputname_base}-heapless_")
|
||||
elseif(${use_stateless_suffix})
|
||||
set(outputname_base "${outputname_base}-cl-intel-greater-than-4GB-buffer-required_")
|
||||
endif()
|
||||
@@ -32,13 +32,15 @@ function(compile_kernels_gen device revision_id platform_name use_stateless_suff
|
||||
)
|
||||
|
||||
set(heapless_mode "disable")
|
||||
set(internal_options "")
|
||||
if(${use_heapless})
|
||||
set(heapless_mode "enable")
|
||||
set(internal_options "${HEAPLESS_INTERNAL_OPTIONS}")
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${output_files}
|
||||
COMMAND ${ocloc_cmd_prefix} -file ${absolute_filepath} -device ${device} -heapless_mode ${heapless_mode} -${NEO_BITS} -out_dir ${outputdir} -output_no_suffix -output ${outputname_base} -revision_id ${revision_id}
|
||||
COMMAND ${ocloc_cmd_prefix} -file ${absolute_filepath} -device ${device} -heapless_mode ${heapless_mode} -internal_options ${internal_options} -${NEO_BITS} -out_dir ${outputdir} -output_no_suffix -output ${outputname_base} -revision_id ${revision_id}
|
||||
WORKING_DIRECTORY ${workdir}
|
||||
DEPENDS ${filepath} ocloc copy_compiler_files
|
||||
)
|
||||
@@ -60,6 +62,8 @@ function(compile_kernels_gen device revision_id platform_name use_stateless_suff
|
||||
set(compiled_kernels_${platform_name}_${revision_id} ${compiled_kernels_${platform_name}_${revision_id}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
add_subdirectories()
|
||||
|
||||
file(GLOB_RECURSE TEST_KERNELS *.cl)
|
||||
file(GLOB_RECURSE TEST_KERNELS_IMAGES *_images.cl)
|
||||
add_custom_target(prepare_test_kernels_for_shared)
|
||||
@@ -84,6 +88,9 @@ macro(macro_for_each_platform)
|
||||
set(STATELESS_SUPPORT FALSE)
|
||||
CORE_CONTAINS_PLATFORM("SUPPORTED_STATELESS" ${CORE_TYPE} ${PLATFORM_IT} STATELESS_SUPPORT)
|
||||
|
||||
set(HEAPLESS_SUPPORT FALSE)
|
||||
CORE_CONTAINS_PLATFORM("SUPPORTED_HEAPLESS" ${CORE_TYPE} ${PLATFORM_IT} HEAPLESS_SUPPORT)
|
||||
|
||||
foreach(REVISION_CONFIG ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS})
|
||||
parse_revision_config(${REVISION_CONFIG} ${PLATFORM_IT_LOWER} DEVICE_ID REVISION_ID)
|
||||
|
||||
@@ -113,3 +120,4 @@ endmacro()
|
||||
|
||||
set(PREVIOUS_TARGET "")
|
||||
apply_macro_for_each_core_type("TESTED")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user