endif(NOT ARMCompute_FOUND)
set(LIB_NEURUN_BACKEND_ACL_CL neurun_backend_acl_cl)
-set(LIB_NEURUN_KERNEL_ACL_CL neurun_kernel_acl_cl)
-
-add_subdirectory(kernel)
file(GLOB_RECURSE SOURCES "*.cc")
-file(GLOB_RECURSE REMOVE_KERNEL_SOURCES "kernel/*.cc")
-list(REMOVE_ITEM SOURCES ${REMOVE_KERNEL_SOURCES})
add_library(${LIB_NEURUN_BACKEND_ACL_CL} SHARED ${SOURCES})
target_link_libraries(${LIB_NEURUN_BACKEND_ACL_CL} arm_compute)
target_link_libraries(${LIB_NEURUN_BACKEND_ACL_CL} arm_compute_ex)
-target_link_libraries(${LIB_NEURUN_BACKEND_ACL_CL} ${LIB_NEURUN_KERNEL_ACL_CL})
target_link_libraries(${LIB_NEURUN_BACKEND_ACL_CL} neurun-core)
target_link_libraries(${LIB_NEURUN_BACKEND_ACL_CL} ${LIB_NEURUN_BACKEND_ACL_COMMON})
+++ /dev/null
-# Unsupported architecture
-nnfw_find_package(ARMCompute QUIET)
-if(NOT ARMCompute_FOUND)
- return()
-endif(NOT ARMCompute_FOUND)
-
-file(GLOB SOURCES "*.cc")
-
-add_library(${LIB_NEURUN_KERNEL_ACL_CL} STATIC ${SOURCES})
-
-target_include_directories(${LIB_NEURUN_KERNEL_ACL_CL} PUBLIC ${NEURUN_INCLUDE_DIR})
-target_include_directories(${LIB_NEURUN_KERNEL_ACL_CL} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/..)
-target_include_directories(${LIB_NEURUN_KERNEL_ACL_CL} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../..)
-
-target_link_libraries(${LIB_NEURUN_KERNEL_ACL_CL} arm_compute)
-target_link_libraries(${LIB_NEURUN_KERNEL_ACL_CL} ${LIB_NEURUN_BACKEND_ACL_COMMON})
-
-set_target_properties(${LIB_NEURUN_KERNEL_ACL_CL} PROPERTIES POSITION_INDEPENDENT_CODE ON)
-set_target_properties(${LIB_NEURUN_KERNEL_ACL_CL} PROPERTIES OUTPUT_NAME kernel_acl_cl)
namespace
{
-bool matchSizeExceptAxis(const ::neurun::backend::acl_cl::operand::ICLTensor *t1,
- const ::neurun::backend::acl_cl::operand::ICLTensor *t2, uint32_t axis)
+inline bool matchSizeExceptAxis(const ::neurun::backend::acl_cl::operand::ICLTensor *t1,
+ const ::neurun::backend::acl_cl::operand::ICLTensor *t2,
+ uint32_t axis)
{
assert(t1->num_dimensions() <= 4);
assert(t2->num_dimensions() <= 4);
{
uint32_t axis_offset = 0;
- auto &queue = ::arm_compute::CLScheduler::get().queue();
-
auto outout_fn = [&](::neurun::backend::operand::ITensor &out_tensor) {
for (auto input : _input_allocs)
{
auto input_fn = [&](::neurun::backend::operand::ITensor &in_tensor) {
auto &in_cl_tensor =
static_cast<::neurun::backend::acl_cl::operand::ICLTensor &>(in_tensor);
- for (int32_t i = 0; i < in_cl_tensor.info()->dimension(0); i++)
+ for (uint32_t i = 0; i < in_cl_tensor.info()->dimension(0); i++)
{
- for (int32_t j = 0; j < in_cl_tensor.info()->dimension(1); j++)
+ for (uint32_t j = 0; j < in_cl_tensor.info()->dimension(1); j++)
{
- for (int32_t k = 0; k < in_cl_tensor.info()->dimension(2); k++)
+ for (uint32_t k = 0; k < in_cl_tensor.info()->dimension(2); k++)
{
- for (int32_t l = 0; l < in_cl_tensor.info()->dimension(3); l++)
+ for (uint32_t l = 0; l < in_cl_tensor.info()->dimension(3); l++)
{
int32_t io = (_axis == 0) ? axis_offset : 0;
int32_t jo = (_axis == 1) ? axis_offset : 0;
endif(NOT ARMCompute_FOUND)
set(LIB_NEURUN_BACKEND_ACL_NEON neurun_backend_acl_neon)
-set(LIB_NEURUN_KERNEL_ACL_NEON neurun_kernel_acl_neon)
-add_subdirectory(kernel)
file(GLOB_RECURSE SOURCES "*.cc")
-file(GLOB_RECURSE REMOVE_KERNEL_SOURCES "kernel/*.cc")
-list(REMOVE_ITEM SOURCES ${REMOVE_KERNEL_SOURCES})
-
add_library(${LIB_NEURUN_BACKEND_ACL_NEON} SHARED ${SOURCES})
target_include_directories(${LIB_NEURUN_BACKEND_ACL_NEON} PUBLIC ${NEURUN_INCLUDE_DIR})
target_include_directories(${LIB_NEURUN_BACKEND_ACL_NEON} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
#following line it to reuse codes of other backends
-target_include_directories(${LIB_NEURUN_KERNEL_ACL_NEON} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/..)
+target_include_directories(${LIB_NEURUN_BACKEND_ACL_NEON} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/..)
target_link_libraries(${LIB_NEURUN_BACKEND_ACL_NEON} arm_compute)
target_link_libraries(${LIB_NEURUN_BACKEND_ACL_NEON} arm_compute_ex)
-target_link_libraries(${LIB_NEURUN_BACKEND_ACL_NEON} ${LIB_NEURUN_KERNEL_ACL_NEON})
target_link_libraries(${LIB_NEURUN_BACKEND_ACL_NEON} neurun-core)
target_link_libraries(${LIB_NEURUN_BACKEND_ACL_NEON} ${LIB_NEURUN_BACKEND_ACL_COMMON})
+++ /dev/null
-# Unsupported architecture
-nnfw_find_package(ARMCompute QUIET)
-if(NOT ARMCompute_FOUND)
- return()
-endif(NOT ARMCompute_FOUND)
-
-file(GLOB SOURCES "*.cc")
-
-add_library(${LIB_NEURUN_KERNEL_ACL_NEON} STATIC ${SOURCES})
-
-target_include_directories(${LIB_NEURUN_KERNEL_ACL_NEON} PUBLIC ${NEURUN_INCLUDE_DIR})
-target_include_directories(${LIB_NEURUN_KERNEL_ACL_NEON} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/..)
-#following line it to reuse codes of other backends
-target_include_directories(${LIB_NEURUN_KERNEL_ACL_NEON} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../..)
-
-target_link_libraries(${LIB_NEURUN_KERNEL_ACL_NEON} arm_compute)
-target_link_libraries(${LIB_NEURUN_KERNEL_ACL_NEON} ${LIB_NEURUN_BACKEND_ACL_COMMON})
-
-set_target_properties(${LIB_NEURUN_KERNEL_ACL_NEON} PROPERTIES POSITION_INDEPENDENT_CODE ON)
-set_target_properties(${LIB_NEURUN_KERNEL_ACL_NEON} PROPERTIES OUTPUT_NAME kernel_acl_neon)
namespace
{
-bool matchSizeExceptAxis(const ::neurun::backend::acl_neon::operand::INETensor *t1,
- const ::neurun::backend::acl_neon::operand::INETensor *t2, uint32_t axis)
+inline bool matchSizeExceptAxis(const ::neurun::backend::acl_neon::operand::INETensor *t1,
+ const ::neurun::backend::acl_neon::operand::INETensor *t2,
+ uint32_t axis)
{
assert(t1->num_dimensions() <= 4);
assert(t2->num_dimensions() <= 4);
for (auto input : _input_allocs)
{
- for (int32_t i = 0; i < input->info()->dimension(0); i++)
+ for (uint32_t i = 0; i < input->info()->dimension(0); i++)
{
- for (int32_t j = 0; j < input->info()->dimension(1); j++)
+ for (uint32_t j = 0; j < input->info()->dimension(1); j++)
{
- for (int32_t k = 0; k < input->info()->dimension(2); k++)
+ for (uint32_t k = 0; k < input->info()->dimension(2); k++)
{
- for (int32_t l = 0; l < input->info()->dimension(3); l++)
+ for (uint32_t l = 0; l < input->info()->dimension(3); l++)
{
uint32_t io = (_axis == 0) ? axis_offset : 0;
uint32_t jo = (_axis == 1) ? axis_offset : 0;
set(LIB_NEURUN_BACKEND_CPU neurun_backend_cpu)
-set(LIB_NEURUN_KERNEL_CPU neurun_kernel_cpu)
-
-add_subdirectory(kernel)
file(GLOB_RECURSE SOURCES "*.cc")
-file(GLOB_RECURSE REMOVE_KERNEL_SOURCES "kernel/*.cc")
file(GLOB_RECURSE TESTS "*.test.cc")
-list(REMOVE_ITEM SOURCES ${REMOVE_KERNEL_SOURCES})
list(REMOVE_ITEM SOURCES ${TESTS})
add_library(${LIB_NEURUN_BACKEND_CPU} SHARED ${SOURCES})
-target_link_libraries(${LIB_NEURUN_BACKEND_CPU} nnfw_lib_misc)
-target_link_libraries(${LIB_NEURUN_BACKEND_CPU} nnfw_lib_cpp14)
-target_link_libraries(${LIB_NEURUN_BACKEND_CPU} ${LIB_NEURUN_KERNEL_CPU})
+target_link_libraries(${LIB_NEURUN_BACKEND_CPU} nnfw_lib_misc nnfw_lib_cpp14 nnfw_lib_cker)
target_link_libraries(${LIB_NEURUN_BACKEND_CPU} neurun-core)
target_compile_options(${LIB_NEURUN_BACKEND_CPU} PRIVATE -Wall -Wextra -Werror)
int32_t output_activation_min, output_activation_max;
CalculateActivationRangeUint8(_activation, _outputShape, &output_activation_min,
&output_activation_max);
- nnfw::cker::AddParam op_params;
- op_params.quantized_activation_max = output_activation_max;
- op_params.quantized_activation_min = output_activation_min;
+ // nnfw::cker::AddParam op_params;
+ // op_params.quantized_activation_max = output_activation_max;
+ // op_params.quantized_activation_min = output_activation_min;
// cker quant8 add is not implemented yet
throw std::runtime_error{"NYI"};
+++ /dev/null
-file(GLOB SOURCES "*.cc")
-
-add_library(${LIB_NEURUN_KERNEL_CPU} STATIC ${SOURCES})
-
-target_include_directories(${LIB_NEURUN_KERNEL_CPU} PUBLIC ${NEURUN_INCLUDE_DIR})
-
-target_link_libraries(${LIB_NEURUN_KERNEL_CPU} nnfw_lib_misc nnfw_lib_cpp14 nnfw_lib_cker)
-
-set_target_properties(${LIB_NEURUN_KERNEL_CPU} PROPERTIES POSITION_INDEPENDENT_CODE ON)
-set_target_properties(${LIB_NEURUN_KERNEL_CPU} PROPERTIES OUTPUT_NAME kernel_cpu)
}
void ConcatLayer::concatenationQuant8()
{
- int num_inputs = _inputShapes.size();
+ uint32_t num_inputs = _inputShapes.size();
std::vector<int32_t> input_zeropoints(num_inputs);
std::vector<float> input_scales(num_inputs);
const float bias_scale = biasShape.scale;
const float output_scale = outputShape.scale;
// The following conditions must be guaranteed by the training pipeline.
+ UNUSED_RELEASE(bias_scale);
assert(std::abs(input_product_scale - bias_scale) <=
1e-6 * std::min(input_product_scale, bias_scale));
assert(input_product_scale >= 0);
auto rank = _output_shape.rank();
auto fn = [&](::neurun::backend::operand::ITensor &in_tensor) {
_output->access([&](::neurun::backend::operand::ITensor &out_tensor) {
- auto layout = out_tensor.layout();
auto input_buffer = in_tensor.buffer();
auto input_size = in_tensor.total_size();
auto output_buffer = out_tensor.buffer();
return()
endif(NOT BUILD_NEURUN_HI_PERF_CPU_BACKEND)
-add_subdirectory(kernel)
-
file(GLOB_RECURSE SOURCES "*.cc")
-file(GLOB_RECURSE REMOVE_KERNEL_SOURCES "kernel/*.cc")
file(GLOB_RECURSE TESTS "*.test.cc")
-#list(REMOVE_ITEM SOURCES ${REMOVE_KERNEL_SOURCES})
list(REMOVE_ITEM SOURCES ${TESTS})
add_library(${LIB_NEURUN_BACKEND_HI_PERF_CPU} SHARED ${SOURCES})
target_link_libraries(${LIB_NEURUN_BACKEND_HI_PERF_CPU} nnfw_lib_misc)
target_link_libraries(${LIB_NEURUN_BACKEND_HI_PERF_CPU} nnfw_lib_cpp14)
-target_link_libraries(${LIB_NEURUN_BACKEND_HI_PERF_CPU} ${LIB_NEURUN_KERNEL_NNPACK})
target_link_libraries(${LIB_NEURUN_BACKEND_HI_PERF_CPU} neurun-core)
target_compile_options(${LIB_NEURUN_BACKEND_HI_PERF_CPU} PRIVATE -Wall -Wextra -Werror)