Browse Source

fix bug for securec

tags/v0.7.0-beta
hangq 5 years ago
parent
commit
66493a89ab
5 changed files with 16 additions and 10 deletions
  1. +1
    -0
      mindspore/core/utils/log_adapter.h
  2. +7
    -3
      mindspore/lite/CMakeLists.txt
  3. +1
    -0
      mindspore/lite/src/CMakeLists.txt
  4. +2
    -2
      mindspore/lite/tools/benchmark/CMakeLists.txt
  5. +5
    -5
      mindspore/lite/tools/converter/optimizer/fusion/fusion_pattern.cc

+ 1
- 0
mindspore/core/utils/log_adapter.h View File

@@ -24,6 +24,7 @@
#include <memory>
#include <functional>
#include "utils/overload.h"
#include "./securec.h"
#ifndef USE_ANDROID_LOG
#ifdef USE_GLOG
#include "glog/logging.h"


+ 7
- 3
mindspore/lite/CMakeLists.txt View File

@@ -16,6 +16,10 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${TOP_DIR}/third_party)
include_directories(${TOP_DIR}/third_party/flatbuffers/include)

include(${TOP_DIR}/cmake/utils.cmake)
include(${TOP_DIR}/cmake/dependency_utils.cmake)
include(${TOP_DIR}/cmake/dependency_securec.cmake)

option(CMAKE_BUILD_TYPE "build type" Release)
option(BUILD_DEVICE "if build device" on)
option(SUPPORT_TRAIN "if build for on-device train" off)
@@ -91,10 +95,10 @@ if (BUILD_CONVERTER)
set(PYTHON_LIBRARIES "${py_lib}")
endif()
include_directories(${PYTHON_INCLUDE_DIRS})
include(${TOP_DIR}/cmake/utils.cmake)
include(${TOP_DIR}/cmake/dependency_utils.cmake)
# include(${TOP_DIR}/cmake/utils.cmake)
# include(${TOP_DIR}/cmake/dependency_utils.cmake)
include(${TOP_DIR}/cmake/external_libs/json.cmake)
include(${TOP_DIR}/cmake/dependency_securec.cmake)
# include(${TOP_DIR}/cmake/dependency_securec.cmake)
include(${TOP_DIR}/cmake/external_libs/pybind11.cmake)
include(${TOP_DIR}/cmake/external_libs/eigen.cmake)
include_directories(${TOP_DIR}/third_party/protobuf/build/include)


+ 1
- 0
mindspore/lite/src/CMakeLists.txt View File

@@ -75,6 +75,7 @@ add_library(mindspore-lite SHARED ${LITE_SRC} ${ANF_SRC})
target_link_libraries(mindspore-lite
cpu_kernel_mid_
ops_mid_
${SECUREC_LIBRARY}
)

add_subdirectory(runtime/kernel/arm)


+ 2
- 2
mindspore/lite/tools/benchmark/CMakeLists.txt View File

@@ -11,7 +11,7 @@ add_executable(benchmark
${COMMON_SRC})

if (PLATFORM_ARM32 OR PLATFORM_ARM64)
target_link_libraries(benchmark mindspore-lite)
target_link_libraries(benchmark mindspore-lite ${SECUREC_LIBRARY})
else()
target_link_libraries(benchmark mindspore-lite pthread)
target_link_libraries(benchmark mindspore-lite ${SECUREC_LIBRARY} pthread)
endif()

+ 5
- 5
mindspore/lite/tools/converter/optimizer/fusion/fusion_pattern.cc View File

@@ -54,13 +54,13 @@ FusionPattern &FusionPattern::AddPatternOp(const std::string &id, const std::vec
if (op == nullptr) {
// MS_LOG(ERROR) << "new an object failed");
hasError = true;
} else {
op->id = id;
op->types = types;
ops.push_back(op);
opMap[id] = op;
}

op->id = id;
op->types = types;
ops.push_back(op);
opMap[id] = op;

return *this;
}



Loading…
Cancel
Save