mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 07:14:10 +08:00
refactor: remove platform type string
this property is no longer needed as we compile kernels per product family Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d80c1c004c
commit
4647180c76
@@ -22,24 +22,20 @@ set(TEST_KERNEL_BINDLESS
|
||||
)
|
||||
|
||||
set(l0_test_kernels_outputs)
|
||||
macro(macro_for_each_core_type)
|
||||
foreach(PLATFORM_TYPE ${PLATFORM_TYPES})
|
||||
foreach(REVISION_ID ${${PLATFORM_TYPE}_${CORE_TYPE}_REVISIONS})
|
||||
if(${CORE_TYPE}_HAS_${PLATFORM_TYPE})
|
||||
get_family_name_with_type(${CORE_TYPE} ${PLATFORM_TYPE})
|
||||
string(TOLOWER ${PLATFORM_TYPE} PLATFORM_TYPE_LOWER)
|
||||
set(PLATFORM_LOWER ${DEFAULT_SUPPORTED_${CORE_TYPE}_${PLATFORM_TYPE}_PLATFORM})
|
||||
string(TOLOWER ${CORE_TYPE} CORE_TYPE_LOWER)
|
||||
level_zero_generate_kernels(l0_test_kernel_outputs ${PLATFORM_LOWER} ${family_name_with_type} ${REVISION_ID} "-g" ${TEST_MODULES})
|
||||
macro(macro_for_each_platform)
|
||||
foreach(REVISION_ID ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS})
|
||||
level_zero_generate_kernels(l0_test_kernel_outputs ${PLATFORM_IT_LOWER} ${REVISION_ID} "-g" ${TEST_MODULES})
|
||||
|
||||
#skip Gen8 bindless kernel generation
|
||||
if(NOT ("${CORE_TYPE_LOWER}" STREQUAL "gen8"))
|
||||
level_zero_generate_kernels_with_internal_options(l0_bindless_test_kernel_outputs ${PLATFORM_LOWER} ${family_name_with_type} "bindless" ${REVISION_ID} "-g" ${TEST_KERNEL_BINDLESS_internal_options} ${TEST_KERNEL_BINDLESS})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
#skip Gen8 bindless kernel generation
|
||||
if(NOT ("${CORE_TYPE_LOWER}" STREQUAL "gen8"))
|
||||
level_zero_generate_kernels_with_internal_options(l0_bindless_test_kernel_outputs ${PLATFORM_IT_LOWER} "bindless" ${REVISION_ID} "-g" ${TEST_KERNEL_BINDLESS_internal_options} ${TEST_KERNEL_BINDLESS})
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
macro(macro_for_each_core_type)
|
||||
apply_macro_for_each_platform("TESTED")
|
||||
endmacro()
|
||||
apply_macro_for_each_core_type("TESTED")
|
||||
add_custom_target(l0_common_test_kernels DEPENDS ${l0_test_kernel_outputs} ${l0_bindless_test_kernel_outputs} copy_compiler_files)
|
||||
set_target_properties(l0_common_test_kernels PROPERTIES FOLDER ${TARGET_NAME_L0})
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
function(level_zero_generate_kernels target_list platform_name suffix revision_id options)
|
||||
function(level_zero_generate_kernels target_list platform_name revision_id options)
|
||||
|
||||
list(APPEND results copy_compiler_files)
|
||||
|
||||
set(relativeDir "level_zero/${suffix}/${revision_id}/test_files/${NEO_ARCH}")
|
||||
set(relativeDir "level_zero/${platform_name}/${revision_id}/test_files/${NEO_ARCH}")
|
||||
|
||||
set(outputdir "${TargetDir}/${relativeDir}/")
|
||||
|
||||
@@ -18,7 +18,7 @@ function(level_zero_generate_kernels target_list platform_name suffix revision_i
|
||||
get_filename_component(workdir ${filepath} DIRECTORY)
|
||||
get_filename_component(absolute_filepath ${filepath} ABSOLUTE)
|
||||
|
||||
set(outputpath_base "${outputdir}${basename}_${suffix}")
|
||||
set(outputpath_base "${outputdir}${basename}_${platform_name}")
|
||||
if(NOT NEO_DISABLE_BUILTINS_COMPILATION)
|
||||
set(output_files
|
||||
${outputpath_base}.bin
|
||||
@@ -36,7 +36,7 @@ function(level_zero_generate_kernels target_list platform_name suffix revision_i
|
||||
list(APPEND ${target_list} ${output_files})
|
||||
else()
|
||||
foreach(extension "bin" "spv")
|
||||
set(_file_prebuilt "${NEO_KERNELS_BIN_DIR}/${relativeDir}/${basename}_${suffix}.${extension}")
|
||||
set(_file_prebuilt "${NEO_KERNELS_BIN_DIR}/${relativeDir}/${basename}_${platform_name}.${extension}")
|
||||
add_custom_command(
|
||||
OUTPUT ${outputpath_base}.${extension}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${outputdir}
|
||||
@@ -51,11 +51,11 @@ function(level_zero_generate_kernels target_list platform_name suffix revision_i
|
||||
set(${target_list} ${${target_list}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(level_zero_generate_kernels_with_internal_options target_list platform_name suffix prefix revision_id options internal_options)
|
||||
function(level_zero_generate_kernels_with_internal_options target_list platform_name prefix revision_id options internal_options)
|
||||
|
||||
list(APPEND results copy_compiler_files)
|
||||
|
||||
set(relativeDir "level_zero/${suffix}/${revision_id}/test_files/${NEO_ARCH}")
|
||||
set(relativeDir "level_zero/${platform_name}/${revision_id}/test_files/${NEO_ARCH}")
|
||||
|
||||
set(outputdir "${TargetDir}/${relativeDir}/")
|
||||
|
||||
@@ -65,7 +65,7 @@ function(level_zero_generate_kernels_with_internal_options target_list platform_
|
||||
get_filename_component(workdir ${filepath} DIRECTORY)
|
||||
get_filename_component(absolute_filepath ${filepath} ABSOLUTE)
|
||||
|
||||
set(outputpath_base "${outputdir}${prefix}_${basename}_${suffix}")
|
||||
set(outputpath_base "${outputdir}${prefix}_${basename}_${platform_name}")
|
||||
|
||||
if(NOT NEO_DISABLE_BUILTINS_COMPILATION)
|
||||
set(output_files
|
||||
@@ -86,7 +86,7 @@ function(level_zero_generate_kernels_with_internal_options target_list platform_
|
||||
list(APPEND ${target_list} ${output_files})
|
||||
else()
|
||||
foreach(extension "bin" "spv")
|
||||
set(_file_prebuilt "${NEO_KERNELS_BIN_DIR}/${relativeDir}/${prefix}_${basename}_${suffix}.${extension}")
|
||||
set(_file_prebuilt "${NEO_KERNELS_BIN_DIR}/${relativeDir}/${prefix}_${basename}_${platform_name}.${extension}")
|
||||
add_custom_command(
|
||||
OUTPUT ${outputpath_base}.${extension}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${outputdir}
|
||||
|
||||
Reference in New Issue
Block a user