if("${source}" MATCHES "${type}" OR "${source}" MATCHES "${type1}" OR "${source}" MATCHES "device_reduce_instance")
if("${source}" MATCHES "${type}" OR "${source}" MATCHES "${type1}" OR "${source}" MATCHES "device_reduce_instance" OR ${source} MATCHES "device_image_to_column")
#if filename matches any selected type, exit type loop and do no exclude the file from the list
#if filename matches any selected type, exit type loop and do no exclude the file from the list
set(test 0)
set(test 0)
break()
break()
elseif((source MATCHES "fp8" OR source MATCHES "fp32" OR source MATCHES "fp64" OR source MATCHES "bf16" OR source MATCHES "int8" OR source MATCHES "fp16" OR
elseif((source MATCHES "fp8" OR source MATCHES "fp32" OR source MATCHES "fp64" OR source MATCHES "bf16" OR source MATCHES "int8" OR source MATCHES "fp16" OR
source MATCHES "_f8" OR source MATCHES "_f32" OR source MATCHES "_f64" OR source MATCHES "_i8" OR source MATCHES "_f16" OR source MATCHES "_b16") AND
source MATCHES "_f8" OR source MATCHES "_f32" OR source MATCHES "_f64" OR source MATCHES "_i8" OR source MATCHES "_f16" OR source MATCHES "_b16") AND
NOT(source MATCHES type OR source MATCHES type1))
NOT(source MATCHES type OR source MATCHES type1))
#if filename contains a type which doesn't match any selected type, mark it for removal
#if filename contains a type which doesn't match any selected type, mark it for removal
set(test 1)
set(test 1)
endif()
endif()
endforeach()
endforeach()
if(test EQUAL 1)
if(test EQUAL 1)
message("removing instance ${source} ")
message("removing instance ${source} ")
list(REMOVE_ITEM ARGN "${source}")
list(REMOVE_ITEM ARGN "${source}")
endif()
endif()
endforeach()
endforeach()
endif()
endif()
foreach(source IN LISTS ARGN)
foreach(source IN LISTS ARGN)
if(NOT DEFINED DL_KERNELS AND source MATCHES "_dl")
if(NOT DEFINED DL_KERNELS AND source MATCHES "_dl")
message("removing dl instance ${source} ")
message("removing dl instance ${source} ")
list(REMOVE_ITEM ARGN "${source}")
list(REMOVE_ITEM ARGN "${source}")
endif()
endif()
endforeach()
endforeach()
#only continue if there are some source files left on the list
#only continue if there are some source files left on the list