From: Hyeongseok Oh Date: Fri, 30 Jun 2023 02:08:57 +0000 (+0900) Subject: Resolve build fail on gcc 13 X-Git-Tag: accepted/tizen/unified/riscv/20230718.003655^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_dev;p=platform%2Fcore%2Fml%2Fnnfw.git Resolve build fail on gcc 13 This commit resolves build fail on gcc 13. ONE-DCO-1.0-Signed-off-by: Hyeongseok Oh --- diff --git a/compute/cker/include/cker/Shape.h b/compute/cker/include/cker/Shape.h index 86caf7d18..30c70c991 100644 --- a/compute/cker/include/cker/Shape.h +++ b/compute/cker/include/cker/Shape.h @@ -208,6 +208,7 @@ private: { SetDim(i, pad_value); } + // Error on gcc 13: refer infra/nnfw/cmake/buildtool/config/config_linux.cmake std::memcpy(DimsData() + size_increase, shape.DimsData(), sizeof(int32_t) * shape.DimensionsCount()); } diff --git a/infra/nnfw/cmake/buildtool/config/config_linux.cmake b/infra/nnfw/cmake/buildtool/config/config_linux.cmake index 01b47ef4a..b5f90afda 100644 --- a/infra/nnfw/cmake/buildtool/config/config_linux.cmake +++ b/infra/nnfw/cmake/buildtool/config/config_linux.cmake @@ -10,3 +10,8 @@ set(FLAGS_CXXONLY ${FLAGS_CXXONLY} "-Wno-ignored-attributes") if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0) list(APPEND FLAGS_CXXONLY "-Wno-psabi") endif() + +# Build fail on compute/cker/include/cker/Shape.h:211:16 (memcpy) +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 12.0) + list(APPEND FLAGS_CXXONLY "-Wno-error=stringop-overflow -Wno-error=array-bounds") +endif() diff --git a/packaging/ABSEIL.tar.gz b/packaging/ABSEIL.tar.gz index dc7aab548..60c81a4f2 100644 Binary files a/packaging/ABSEIL.tar.gz and b/packaging/ABSEIL.tar.gz differ diff --git a/runtime/libs/benchmark/include/benchmark/CsvWriter.h b/runtime/libs/benchmark/include/benchmark/CsvWriter.h index 5c259d7ed..d926bad8f 100644 --- a/runtime/libs/benchmark/include/benchmark/CsvWriter.h +++ b/runtime/libs/benchmark/include/benchmark/CsvWriter.h @@ -17,6 +17,7 @@ #ifndef __NNFW_BENCHMARK_CSV_WRITER_H__ #define __NNFW_BENCHMARK_CSV_WRITER_H__ +#include #include #include #include diff --git a/runtime/libs/benchmark/include/benchmark/Phase.h b/runtime/libs/benchmark/include/benchmark/Phase.h index 5eceb04c5..9b91a4391 100644 --- a/runtime/libs/benchmark/include/benchmark/Phase.h +++ b/runtime/libs/benchmark/include/benchmark/Phase.h @@ -19,6 +19,7 @@ #include "Types.h" +#include #include #include diff --git a/runtime/onert/backend/trix/DevContext.cc b/runtime/onert/backend/trix/DevContext.cc index 059514878..a044c1387 100644 --- a/runtime/onert/backend/trix/DevContext.cc +++ b/runtime/onert/backend/trix/DevContext.cc @@ -83,12 +83,12 @@ ModelID DevContext::registerModel(const std::string &model_file_path) file_info.filepath = model_file_path.c_str(); file_info.size = meta->size; - ModelID model_id; + ModelID model_id = 0; for (uint32_t dev_num = 0; dev_num < _dev_handles.size(); ++dev_num) { // Register model for each device - uint32_t model_id_at_device; + uint32_t model_id_at_device = 0; if (registerNPUmodel(_dev_handles.at(dev_num), &file_info, &model_id_at_device) < 0) { throw std::runtime_error("Failed to register npu model"); diff --git a/runtime/onert/core/src/ir/LayoutSet.h b/runtime/onert/core/src/ir/LayoutSet.h index 6ce4e38c6..be077f2f0 100644 --- a/runtime/onert/core/src/ir/LayoutSet.h +++ b/runtime/onert/core/src/ir/LayoutSet.h @@ -17,6 +17,7 @@ #ifndef __ONERT_IR_LAYOUT_SET_H__ #define __ONERT_IR_LAYOUT_SET_H__ +#include #include #include diff --git a/runtime/service/npud/core/Backend.h b/runtime/service/npud/core/Backend.h index 5bc13b66c..6b810d18e 100644 --- a/runtime/service/npud/core/Backend.h +++ b/runtime/service/npud/core/Backend.h @@ -20,6 +20,7 @@ #include "ir/Layout.h" #include "ir/DataType.h" +#include #include #include