!6752 change lite log_adapter

Merge pull request !6752 from yeyunpeng2020/log
This commit is contained in:
mindspore-ci-bot 2020-09-24 16:04:22 +08:00 committed by Gitee
commit 3cf6cb6ddb
360 changed files with 593 additions and 839 deletions

View File

@ -652,7 +652,7 @@ build_lite()
checkndk checkndk
cmake -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK}/build/cmake/android.toolchain.cmake" -DANDROID_NATIVE_API_LEVEL="19" \ cmake -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK}/build/cmake/android.toolchain.cmake" -DANDROID_NATIVE_API_LEVEL="19" \
-DANDROID_NDK="${ANDROID_NDK}" -DANDROID_ABI="arm64-v8a" -DANDROID_TOOLCHAIN_NAME="aarch64-linux-android-clang" \ -DANDROID_NDK="${ANDROID_NDK}" -DANDROID_ABI="arm64-v8a" -DANDROID_TOOLCHAIN_NAME="aarch64-linux-android-clang" \
-DANDROID_STL="c++_shared" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DSUPPORT_TRAIN=${SUPPORT_TRAIN} \ -DANDROID_STL="c++_static" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DSUPPORT_TRAIN=${SUPPORT_TRAIN} \
-DBUILD_DEVICE=on -DPLATFORM_ARM64=on -DBUILD_CONVERTER=off -DENABLE_NEON=on -DENABLE_FP16="off" \ -DBUILD_DEVICE=on -DPLATFORM_ARM64=on -DBUILD_CONVERTER=off -DENABLE_NEON=on -DENABLE_FP16="off" \
-DSUPPORT_GPU=${ENABLE_GPU} -DOFFLINE_COMPILE=${OPENCL_OFFLINE_COMPILE} -DBUILD_MINDDATA=${COMPILE_MINDDATA_LITE} \ -DSUPPORT_GPU=${ENABLE_GPU} -DOFFLINE_COMPILE=${OPENCL_OFFLINE_COMPILE} -DBUILD_MINDDATA=${COMPILE_MINDDATA_LITE} \
-DCMAKE_INSTALL_PREFIX=${BASEPATH}/output/tmp -DMS_VERSION_MAJOR=${VERSION_MAJOR} \ -DCMAKE_INSTALL_PREFIX=${BASEPATH}/output/tmp -DMS_VERSION_MAJOR=${VERSION_MAJOR} \
@ -662,7 +662,7 @@ build_lite()
checkndk checkndk
cmake -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK}/build/cmake/android.toolchain.cmake" -DANDROID_NATIVE_API_LEVEL="19" \ cmake -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK}/build/cmake/android.toolchain.cmake" -DANDROID_NATIVE_API_LEVEL="19" \
-DANDROID_NDK="${ANDROID_NDK}" -DANDROID_ABI="armeabi-v7a" -DANDROID_TOOLCHAIN_NAME="clang" \ -DANDROID_NDK="${ANDROID_NDK}" -DANDROID_ABI="armeabi-v7a" -DANDROID_TOOLCHAIN_NAME="clang" \
-DANDROID_STL="c++_shared" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ -DANDROID_STL="c++_static" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DBUILD_DEVICE=on -DPLATFORM_ARM32=on -DENABLE_NEON=on -DSUPPORT_TRAIN=${SUPPORT_TRAIN} -DBUILD_CONVERTER=off \ -DBUILD_DEVICE=on -DPLATFORM_ARM32=on -DENABLE_NEON=on -DSUPPORT_TRAIN=${SUPPORT_TRAIN} -DBUILD_CONVERTER=off \
-DSUPPORT_GPU=${ENABLE_GPU} -DOFFLINE_COMPILE=${OPENCL_OFFLINE_COMPILE} -DBUILD_MINDDATA=${COMPILE_MINDDATA_LITE} \ -DSUPPORT_GPU=${ENABLE_GPU} -DOFFLINE_COMPILE=${OPENCL_OFFLINE_COMPILE} -DBUILD_MINDDATA=${COMPILE_MINDDATA_LITE} \
-DCMAKE_INSTALL_PREFIX=${BASEPATH}/output/tmp -DMS_VERSION_MAJOR=${VERSION_MAJOR} \ -DCMAKE_INSTALL_PREFIX=${BASEPATH}/output/tmp -DMS_VERSION_MAJOR=${VERSION_MAJOR} \

View File

@ -22,7 +22,6 @@
// namespace to support utils module definition // namespace to support utils module definition
namespace mindspore { namespace mindspore {
#ifndef USE_ANDROID_LOG
#ifdef USE_GLOG #ifdef USE_GLOG
static std::string GetTime() { static std::string GetTime() {
#define BUFLEN 80 #define BUFLEN 80
@ -126,7 +125,6 @@ static int GetSlogLevel(MsLogLevel level) {
} }
} }
#endif #endif
#endif
static std::string ExceptionTypeToString(ExceptionType type) { static std::string ExceptionTypeToString(ExceptionType type) {
#define _TO_STRING(x) #x #define _TO_STRING(x) #x
@ -182,30 +180,13 @@ static const char *GetSubModuleName(SubModuleId module_id) {
"UTILS", // SM_UTILS "UTILS", // SM_UTILS
"VM", // SM_VM "VM", // SM_VM
"PROFILER", // SM_PROFILER "PROFILER", // SM_PROFILER
"PS" // SM_PS "PS", // SM_PS
"LITE" // SM_LITE
}; };
return sub_module_names[module_id % NUM_SUBMODUES]; return sub_module_names[module_id % NUM_SUBMODUES];
} }
const char *EnumStrForMsLogLevel(MsLogLevel level) {
if (level == DEBUG) {
return "DEBUG";
} else if (level == INFO) {
return "INFO";
} else if (level == WARNING) {
return "WARNING";
} else if (level == ERROR) {
return "ERROR";
} else if (level == EXCEPTION) {
return "EXCEPTION";
} else {
return "NO_LEVEL";
}
}
void LogWriter::OutputLog(const std::ostringstream &msg) const { void LogWriter::OutputLog(const std::ostringstream &msg) const {
#ifndef USE_ANDROID_LOG
#ifdef USE_GLOG #ifdef USE_GLOG
auto submodule_name = GetSubModuleName(submodule_); auto submodule_name = GetSubModuleName(submodule_);
google::LogMessage("", 0, GetGlogLevel(log_level_)).stream() google::LogMessage("", 0, GetGlogLevel(log_level_)).stream()
@ -218,10 +199,6 @@ void LogWriter::OutputLog(const std::ostringstream &msg) const {
Dlog(static_cast<int>(slog_module_id), GetSlogLevel(log_level_), "[%s:%d] %s] %s", location_.file_, location_.line_, Dlog(static_cast<int>(slog_module_id), GetSlogLevel(log_level_), "[%s:%d] %s] %s", location_.file_, location_.line_,
location_.func_, str_msg.c_str()); location_.func_, str_msg.c_str());
#endif #endif
#else
printf("%s [%s:%d] %s] %s\n:", EnumStrForMsLogLevel(log_level_), location_.file_, location_.line_, location_.func_,
msg.str().c_str());
#endif
} }
void LogWriter::operator<(const LogStream &stream) const noexcept { void LogWriter::operator<(const LogStream &stream) const noexcept {

View File

@ -25,13 +25,11 @@
#include <functional> #include <functional>
#include "utils/overload.h" #include "utils/overload.h"
#include "./securec.h" #include "./securec.h"
#ifndef USE_ANDROID_LOG
#ifdef USE_GLOG #ifdef USE_GLOG
#include "glog/logging.h" #include "glog/logging.h"
#else #else
#include "toolchain/slog.h" #include "toolchain/slog.h"
#endif #endif
#endif
// NOTICE: when relative path of 'log_adapter.h' changed, macro 'LOG_HDR_FILE_REL_PATH' must be changed // NOTICE: when relative path of 'log_adapter.h' changed, macro 'LOG_HDR_FILE_REL_PATH' must be changed
#define LOG_HDR_FILE_REL_PATH "mindspore/core/utils/log_adapter.h" #define LOG_HDR_FILE_REL_PATH "mindspore/core/utils/log_adapter.h"
@ -126,6 +124,7 @@ enum SubModuleId : int {
SM_VM, // VM SM_VM, // VM
SM_PROFILER, // profiler SM_PROFILER, // profiler
SM_PS, // Parameter Server SM_PS, // Parameter Server
SM_LITE, // LITE
NUM_SUBMODUES // number of submodules NUM_SUBMODUES // number of submodules
}; };

View File

@ -80,7 +80,6 @@ option(OFFLINE_COMPILE "if offline compile OpenCL kernel" off)
set(BUILD_MINDDATA "off" CACHE STRING "off, lite, lite_cv or full") set(BUILD_MINDDATA "off" CACHE STRING "off, lite, lite_cv or full")
option(BUILD_MINDDATA_EXAMPLE "" on) option(BUILD_MINDDATA_EXAMPLE "" on)
option(ENABLE_VERBOSE "" off) option(ENABLE_VERBOSE "" off)
add_compile_definitions(USE_ANDROID_LOG)
add_compile_definitions(NO_DLIB) add_compile_definitions(NO_DLIB)
add_compile_options(-fPIC) add_compile_options(-fPIC)
string(REPLACE "-g" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") string(REPLACE "-g" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")

View File

@ -24,7 +24,7 @@
#include <asm/hwcap.h> #include <asm/hwcap.h>
#include "nnacl/nnacl_utils.h" #include "nnacl/nnacl_utils.h"
#endif #endif
#include "utils/log_adapter.h" #include "src/common/log_adapter.h"
#define OPTIMIZE_SHARED_LIBRARY_PATH "libmindspore-lite-optimize.so" #define OPTIMIZE_SHARED_LIBRARY_PATH "libmindspore-lite-optimize.so"
#define FLOAT16_SHARED_LIBRARY_PATH "libmindspore-lite-fp16.so" #define FLOAT16_SHARED_LIBRARY_PATH "libmindspore-lite-fp16.so"

View File

@ -1,4 +1,4 @@
add_compile_definitions(USE_ANDROID_LOG)
set(LITE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..) set(LITE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
include_directories(${LITE_DIR}/nnacl/) include_directories(${LITE_DIR}/nnacl/)
include_directories(${LITE_DIR}/nnacl/optimize) include_directories(${LITE_DIR}/nnacl/optimize)
@ -6,15 +6,18 @@ include_directories(${LITE_DIR}/nnacl/optimize)
if (PLATFORM_ARM32 OR PLATFORM_ARM64) if (PLATFORM_ARM32 OR PLATFORM_ARM64)
#for performance #for performance
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release") if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
#- fno - rtti - fno - exceptions if (SUPPORT_GPU)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -fno-rtti")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -fno-rtti")
else ()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -fno-rtti -fno-exceptions")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -fno-rtti -fno-exceptions")
endif ()
endif () endif ()
endif () endif ()
set(LITE_SRC set(LITE_SRC
${CMAKE_CURRENT_SOURCE_DIR}/common/graph_util.cc ${CMAKE_CURRENT_SOURCE_DIR}/common/graph_util.cc
${CMAKE_CURRENT_SOURCE_DIR}/../../core/gvar/logging_level.cc
${CMAKE_CURRENT_SOURCE_DIR}/common/log_adapter.cc ${CMAKE_CURRENT_SOURCE_DIR}/common/log_adapter.cc
${CMAKE_CURRENT_SOURCE_DIR}/runtime/allocator.cc ${CMAKE_CURRENT_SOURCE_DIR}/runtime/allocator.cc
${CMAKE_CURRENT_SOURCE_DIR}/runtime/runtime_api.cc ${CMAKE_CURRENT_SOURCE_DIR}/runtime/runtime_api.cc

View File

@ -25,7 +25,7 @@
#include <memory> #include <memory>
#include <fstream> #include <fstream>
#include "src/common/utils.h" #include "src/common/utils.h"
#include "utils/log_adapter.h" #include "src/common/log_adapter.h"
namespace mindspore { namespace mindspore {
namespace lite { namespace lite {

View File

@ -22,6 +22,6 @@ namespace mindspore {
namespace lite { namespace lite {
int CompareRelativeOutput(float *output_data, std::string file_path); int CompareRelativeOutput(float *output_data, std::string file_path);
float RelativeOutputError(float *output_data, std::string file_path); float RelativeOutputError(float *output_data, std::string file_path);
} } // namespace lite
} // namespace mindspore } // namespace mindspore
#endif // MINDSPORE_LITE_COMMON_FILE_UTILS_EXT_H_ #endif // MINDSPORE_LITE_COMMON_FILE_UTILS_EXT_H_

View File

@ -19,7 +19,7 @@
#include <utility> #include <utility>
#include "src/common/graph_util.h" #include "src/common/graph_util.h"
#include "src/common/utils.h" #include "src/common/utils.h"
#include "utils/log_adapter.h" #include "src/common/log_adapter.h"
#include "include/errorcode.h" #include "include/errorcode.h"
namespace mindspore { namespace mindspore {

View File

@ -23,7 +23,7 @@
#include <vector> #include <vector>
#include <memory> #include <memory>
#include "schema/model_generated.h" #include "schema/model_generated.h"
#include "utils//log_adapter.h" #include "src/common/log_adapter.h"
#include "include/errorcode.h" #include "include/errorcode.h"
#include "include/model.h" #include "include/model.h"

View File

@ -1,149 +0,0 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "ir/graph_utils.h"
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <stack>
#include <vector>
#include <list>
#include <string>
#include <fstream>
#include "ir/visitor.h"
#include "ir/func_graph.h"
#include "utils/label.h"
#include "utils/log_adapter.h"
#include "src/common/utils.h"
namespace mindspore {
namespace {
class DeepFirstSearcher {
public:
explicit DeepFirstSearcher(const IncludeFunc &include) : include_(include) {}
~DeepFirstSearcher() = default;
std::vector<AnfNodePtr> Search(const AnfNodePtr &root) {
if (root == nullptr) {
return res_;
}
seen_ = NewSeenGeneration();
Visit(root);
return res_;
}
void Visit(const AnfNodePtr &node) {
if (node == nullptr) {
return;
}
if (node->seen_ == seen_) {
return;
}
node->seen_ = seen_;
auto incl = include_(node);
if (incl == EXCLUDE) {
return;
}
if (filter_ == nullptr || !filter_(node)) {
res_.push_back(node);
}
if (incl == FOLLOW) {
if (node->isa<CNode>()) {
auto cnode = node->cast<CNodePtr>();
auto &inputs = cnode->inputs();
for (auto iter = inputs.rbegin(); iter != inputs.rend(); ++iter) {
Visit(*iter);
}
return;
}
}
}
private:
size_t seen_{0};
IncludeFunc include_;
FilterFunc filter_;
std::vector<AnfNodePtr> res_{};
};
class DeepScopedGraphSearcher : public DeepFirstSearcher {
public:
explicit DeepScopedGraphSearcher(const IncludeFunc &include) : DeepFirstSearcher(include) {}
~DeepScopedGraphSearcher() = default;
void Visit(const CNodePtr &cnode) { return; }
void Visit(const ValueNodePtr &vnode) {
if (!IsValueNode<FuncGraph>(vnode)) {
return;
}
auto graph = GetValueNode<FuncGraphPtr>(vnode);
AnfNodePtr ret = graph->get_return();
if (ret != nullptr) {
DeepFirstSearcher::Visit(ret);
}
}
void Visit(const ParameterPtr &param) {
if (param->func_graph() == nullptr) {
return;
}
AnfNodePtr ret = param->func_graph()->get_return();
if (ret != nullptr) {
DeepFirstSearcher::Visit(ret);
}
}
};
class DeepUsedGraphSearcher : public DeepFirstSearcher {
public:
explicit DeepUsedGraphSearcher(const IncludeFunc &include) : DeepFirstSearcher(include) {}
~DeepUsedGraphSearcher() = default;
void Visit(const CNodePtr &cnode) { return; }
void Visit(const ValueNodePtr &vnode) { return; }
};
class DeepLinkedGraphSearcher : public DeepFirstSearcher {
public:
explicit DeepLinkedGraphSearcher(const IncludeFunc &include) : DeepFirstSearcher(include) {}
~DeepLinkedGraphSearcher() = default;
void Visit(const CNodePtr &cnode) { return; }
void Visit(const ValueNodePtr &) {}
};
} // namespace
std::vector<AnfNodePtr> DeepScopedGraphSearch(const AnfNodePtr &root, const IncludeFunc &include) {
return DeepScopedGraphSearcher(include).Search(root);
}
std::vector<AnfNodePtr> DeepUsedGraphSearch(const AnfNodePtr &root, const IncludeFunc &include) {
return DeepUsedGraphSearcher(include).Search(root);
}
std::vector<AnfNodePtr> DeepLinkedGraphSearch(const AnfNodePtr &root, const IncludeFunc &include) {
return DeepLinkedGraphSearcher(include).Search(root);
}
} // namespace mindspore

View File

@ -14,12 +14,10 @@
* limitations under the License. * limitations under the License.
*/ */
#include "utils/log_adapter.h" #include "src/common/log_adapter.h"
#include <unistd.h>
#include <sys/time.h>
#include <stdio.h>
#include <cstring> #include <cstring>
#include <cstdio>
#ifdef ENABLE_ARM #ifdef ENABLE_ARM
#include <android/log.h> #include <android/log.h>
#endif #endif
@ -29,19 +27,19 @@ namespace mindspore {
constexpr const char *ANDROID_LOG_TAG = "MS_LITE"; constexpr const char *ANDROID_LOG_TAG = "MS_LITE";
int EnvToInt(const char *env) { int EnvToInt(const char *env) {
if (env == nullptr) return -1; if (env == nullptr) return 2;
if (strcmp(env, "DEBUG") == 0) return 0; if (strcmp(env, "0") == 0) return 0;
if (strcmp(env, "INFO") == 0) return 1; if (strcmp(env, "1") == 0) return 1;
if (strcmp(env, "WARNING") == 0) return 2; if (strcmp(env, "2") == 0) return 2;
if (strcmp(env, "ERROR") == 0) return 3; if (strcmp(env, "3") == 0) return 3;
return -1; return 2;
} }
bool IsPrint(int level) { bool IsPrint(int level) {
static const char *env = std::getenv("MSLOG"); static const char *env = std::getenv("GLOG_v");
static int ms_level = EnvToInt(env); static int ms_level = EnvToInt(env);
if (ms_level < 0) { if (level < 0) {
ms_level = 2; level = 2;
} }
return level >= ms_level; return level >= ms_level;
} }
@ -72,50 +70,19 @@ const char *EnumStrForMsLogLevel(MsLogLevel level) {
return "WARNING"; return "WARNING";
} else if (level == ERROR) { } else if (level == ERROR) {
return "ERROR"; return "ERROR";
} else if (level == EXCEPTION) {
return "EXCEPTION";
} else { } else {
return "NO_LEVEL"; return "NO_LEVEL";
} }
} }
static std::string ExceptionTypeToString(ExceptionType type) {
#define _TO_STRING(x) #x
// clang-format off
static const char *const type_names[] = {
_TO_STRING(NoExceptionType),
_TO_STRING(UnknownError),
_TO_STRING(ArgumentError),
_TO_STRING(NotSupportError),
_TO_STRING(NotExistsError),
_TO_STRING(AlreadyExistsError),
_TO_STRING(UnavailableError),
_TO_STRING(DeviceProcessError),
_TO_STRING(AbortedError),
_TO_STRING(TimeOutError),
_TO_STRING(ResourceUnavailable),
_TO_STRING(NoPermissionError),
_TO_STRING(IndexError),
_TO_STRING(ValueError),
_TO_STRING(TypeError),
_TO_STRING(AttributeError),
};
// clang-format on
#undef _TO_STRING
if (type < UnknownError || type > AttributeError) {
type = UnknownError;
}
return std::string(type_names[type]);
}
void LogWriter::OutputLog(const std::ostringstream &msg) const { void LogWriter::OutputLog(const std::ostringstream &msg) const {
if (IsPrint(log_level_) && submodule_ != SM_UNKNOWN) { if (IsPrint(log_level_)) {
#ifdef ENABLE_ARM #ifdef ENABLE_ARM
__android_log_print(GetAndroidLogLevel(log_level_), ANDROID_LOG_TAG, "[%s:%d] %s] %s", location_.file_, __android_log_print(GetAndroidLogLevel(log_level_), ANDROID_LOG_TAG, "[%s:%d] %s] %s", location_.file_,
location_.line_, location_.func_, msg.str().c_str()); location_.line_, location_.func_, msg.str().c_str());
#else #else
printf("%s [%s:%d] %s] %s\n", EnumStrForMsLogLevel(log_level_), location_.file_, location_.line_, printf("%s [%s:%d] %s] %s\n", EnumStrForMsLogLevel(log_level_), location_.file_, location_.line_, location_.func_,
location_.func_, msg.str().c_str()); msg.str().c_str());
#endif #endif
} }
} }
@ -125,27 +92,4 @@ void LogWriter::operator<(const LogStream &stream) const noexcept {
msg << stream.sstream_->rdbuf(); msg << stream.sstream_->rdbuf();
OutputLog(msg); OutputLog(msg);
} }
void LogWriter::operator^(const LogStream &stream) const {
std::ostringstream msg;
msg << stream.sstream_->rdbuf();
OutputLog(msg);
std::ostringstream oss;
oss << location_.file_ << ":" << location_.line_ << " " << location_.func_ << "] ";
if (exception_type_ != NoExceptionType && exception_type_ != IndexError && exception_type_ != TypeError &&
exception_type_ != ValueError && exception_type_ != AttributeError) {
oss << ExceptionTypeToString(exception_type_) << " ";
}
oss << msg.str();
if (trace_provider_ != nullptr) {
trace_provider_(oss);
}
if (exception_handler_ != nullptr) {
exception_handler_(exception_type_, oss.str());
}
throw std::runtime_error(oss.str());
}
} // namespace mindspore } // namespace mindspore

View File

@ -0,0 +1,112 @@
/**
* Copyright 2019 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef MINDSPORE_LITE_COMMON_LOG_ADAPTER_H_
#define MINDSPORE_LITE_COMMON_LOG_ADAPTER_H_
#ifdef USE_GLOG
#include "utils/log_adapter.h"
#else
#include <cstdarg>
#include <cstdint>
#include <functional>
#include <memory>
#include <sstream>
#include <string>
#include "utils/overload.h"
// NOTICE: when relative path of 'log_adapter.h' changed, macro 'LOG_HEAR_FILE_REL_PATH' must be changed
#define LOG_HEAR_FILE_REL_PATH "mindspore/lite/src/common/log_adapter.h"
// Get start index of file relative path in __FILE__
static constexpr int GetRealPathPos() noexcept {
return sizeof(__FILE__) > sizeof(LOG_HEAR_FILE_REL_PATH) ? sizeof(__FILE__) - sizeof(LOG_HEAR_FILE_REL_PATH) : 0;
}
namespace mindspore {
#define FILE_NAME \
(sizeof(__FILE__) > GetRealPathPos() ? static_cast<const char *>(__FILE__) + GetRealPathPos() \
: static_cast<const char *>(__FILE__))
struct LocationInfo {
LocationInfo(const char *file, int line, const char *func) : file_(file), line_(line), func_(func) {}
~LocationInfo() = default;
const char *file_;
int line_;
const char *func_;
};
class LogStream {
public:
LogStream() { sstream_ = std::make_shared<std::stringstream>(); }
~LogStream() = default;
template <typename T>
LogStream &operator<<(const T &val) noexcept {
(*sstream_) << val;
return *this;
}
LogStream &operator<<(std::ostream &func(std::ostream &os)) noexcept {
(*sstream_) << func;
return *this;
}
friend class LogWriter;
private:
std::shared_ptr<std::stringstream> sstream_;
};
enum MsLogLevel : int { DEBUG = 0, INFO, WARNING, ERROR };
const char *EnumStrForMsLogLevel(MsLogLevel level);
class LogWriter {
public:
LogWriter(const LocationInfo &location, MsLogLevel log_level) : location_(location), log_level_(log_level) {}
~LogWriter() = default;
void operator<(const LogStream &stream) const noexcept __attribute__((visibility("default")));
private:
void OutputLog(const std::ostringstream &msg) const;
LocationInfo location_;
MsLogLevel log_level_;
};
#define MSLOG_IF(level) \
mindspore::LogWriter(mindspore::LocationInfo(FILE_NAME, __LINE__, __FUNCTION__), level) < mindspore::LogStream()
#define MS_LOG(level) MS_LOG_##level
#define MS_LOG_DEBUG MSLOG_IF(mindspore::DEBUG)
#define MS_LOG_INFO MSLOG_IF(mindspore::INFO)
#define MS_LOG_WARNING MSLOG_IF(mindspore::WARNING)
#define MS_LOG_ERROR MSLOG_IF(mindspore::ERROR)
} // namespace mindspore
#ifdef DEBUG
#include <cassert>
#define MS_ASSERT(f) assert(f)
#else
#define MS_ASSERT(f) ((void)0)
#endif
#endif
#endif // MINDSPORE_LITE_COMMON_LOG_ADAPTER_H_

View File

@ -24,7 +24,7 @@
#include <set> #include <set>
#include <string> #include <string>
#include <utility> #include <utility>
#include "utils/log_adapter.h" #include "src/common/log_adapter.h"
#include "tools/common/option.h" #include "tools/common/option.h"
#include "include/errorcode.h" #include "include/errorcode.h"

View File

@ -16,7 +16,7 @@
#include "src/inner_context.h" #include "src/inner_context.h"
#include "include/errorcode.h" #include "include/errorcode.h"
#include "utils/log_adapter.h" #include "src/common/log_adapter.h"
namespace mindspore::lite { namespace mindspore::lite {
int InnerContext::Init() { int InnerContext::Init() {

View File

@ -15,12 +15,12 @@
*/ */
#include "src/kernel_registry.h" #include "src/kernel_registry.h"
#include "include/errorcode.h" #include "include/errorcode.h"
#include "ir/dtype/type_id.h"
#include "src/populate_parameter.h" #include "src/populate_parameter.h"
#ifdef ENABLE_ARM64 #ifdef ENABLE_ARM64
#include <asm/hwcap.h> #include <asm/hwcap.h>
#include "common/utils.h" #include "common/utils.h"
#include "utils/log_adapter.h" #include "src/common/log_adapter.h"
#include "nnacl/optimized_kernel.h" #include "nnacl/optimized_kernel.h"
#endif #endif

View File

@ -19,7 +19,7 @@
#include <utility> #include <utility>
#include "src/runtime/runtime_api.h" #include "src/runtime/runtime_api.h"
#include "include/errorcode.h" #include "include/errorcode.h"
#include "utils/log_adapter.h" #include "src/common/log_adapter.h"
#include "src/scheduler.h" #include "src/scheduler.h"
#include "src/runtime/allocator.h" #include "src/runtime/allocator.h"
#include "src/executor.h" #include "src/executor.h"

View File

@ -15,7 +15,7 @@
*/ */
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
#include "include/model.h" #include "include/model.h"
#include "utils/log_adapter.h" #include "src/common/log_adapter.h"
#include "include/errorcode.h" #include "include/errorcode.h"
#include "src/common/graph_util.h" #include "src/common/graph_util.h"
#include "include/version.h" #include "include/version.h"

View File

@ -17,7 +17,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/arithmetic_self.h" #include "src/ops/arithmetic_self.h"
#ifndef LITE_MINDSPORE_LITE_C_OPS_ABS_H_ #ifndef LITE_MINDSPORE_LITE_C_OPS_ABS_H_

View File

@ -19,7 +19,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -21,7 +21,7 @@
#include <set> #include <set>
#include <cmath> #include <cmath>
#include <memory> #include <memory>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/arithmetic.h" #include "src/ops/arithmetic.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -21,7 +21,7 @@
#include <set> #include <set>
#include <cmath> #include <cmath>
#include <memory> #include <memory>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -16,7 +16,7 @@
#include "src/ops/arithmetic.h" #include "src/ops/arithmetic.h"
#include "include/errorcode.h" #include "include/errorcode.h"
#include "utils/log_adapter.h" #include "src/common/log_adapter.h"
#include "src/tensor.h" #include "src/tensor.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -16,7 +16,7 @@
#include "src/ops/arithmetic_grad.h" #include "src/ops/arithmetic_grad.h"
#include "include/errorcode.h" #include "include/errorcode.h"
#include "utils/log_adapter.h" #include "src/common/log_adapter.h"
#include "src/tensor.h" #include "src/tensor.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -16,7 +16,7 @@
#include "src/ops/arithmetic_self.h" #include "src/ops/arithmetic_self.h"
#include "include/errorcode.h" #include "include/errorcode.h"
#include "utils/log_adapter.h" #include "src/common/log_adapter.h"
namespace mindspore { namespace mindspore {
namespace lite { namespace lite {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -17,7 +17,7 @@
#include "src/ops/batch_to_space.h" #include "src/ops/batch_to_space.h"
#include "src/common/common.h" #include "src/common/common.h"
#include "include/errorcode.h" #include "include/errorcode.h"
#include "utils/log_adapter.h" #include "src/common/log_adapter.h"
#include "src/tensor.h" #include "src/tensor.h"
namespace mindspore { namespace mindspore {

View File

@ -21,7 +21,6 @@
#include <set> #include <set>
#include <cmath> #include <cmath>
#include <memory> #include <memory>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -21,7 +21,6 @@
#include <set> #include <set>
#include <cmath> #include <cmath>
#include <memory> #include <memory>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -21,7 +21,6 @@
#include <set> #include <set>
#include <cmath> #include <cmath>
#include <memory> #include <memory>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {
@ -38,8 +37,7 @@ class BNGrad : public PrimitiveC {
BNGrad() = default; BNGrad() = default;
int UnPackToFlatBuilder(const schema::Primitive *primitive, flatbuffers::FlatBufferBuilder *fbb) override; int UnPackToFlatBuilder(const schema::Primitive *primitive, flatbuffers::FlatBufferBuilder *fbb) override;
#endif #endif
int InferShape(std::vector<lite::Tensor *> inputs_, int InferShape(std::vector<lite::Tensor *> inputs_, std::vector<lite::Tensor *> outputs_) override;
std::vector<lite::Tensor *> outputs_) override;
float GetEps() const; float GetEps() const;
float GetMomentum() const; float GetMomentum() const;
}; };

View File

@ -21,7 +21,6 @@
#include <set> #include <set>
#include <cmath> #include <cmath>
#include <memory> #include <memory>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -21,7 +21,6 @@
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "src/ops/arithmetic_self.h" #include "src/ops/arithmetic_self.h"
#include "ir/dtype/type_id.h"
namespace mindspore { namespace mindspore {
namespace lite { namespace lite {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -17,7 +17,7 @@
#include "src/ops/concat.h" #include "src/ops/concat.h"
#include <memory> #include <memory>
#include "include/errorcode.h" #include "include/errorcode.h"
#include "utils/log_adapter.h" #include "src/common/log_adapter.h"
#include "src/tensor.h" #include "src/tensor.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -16,7 +16,7 @@
#include "src/ops/constant_of_shape.h" #include "src/ops/constant_of_shape.h"
#include "include/errorcode.h" #include "include/errorcode.h"
#include "utils/log_adapter.h" #include "src/common/log_adapter.h"
#include "src/tensor.h" #include "src/tensor.h"
namespace mindspore::lite { namespace mindspore::lite {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -21,7 +21,7 @@
#include <string> #include <string>
#include "include/errorcode.h" #include "include/errorcode.h"
#include "utils/log_adapter.h" #include "src/common/log_adapter.h"
#ifdef PRIMITIVE_WRITEABLE #ifdef PRIMITIVE_WRITEABLE
#include <float.h> #include <float.h>
@ -120,8 +120,8 @@ void ConvertConvWeight(const ParameterPtr &param_node) {
utils::cast<abstract::ShapePtr>(abstract_tensor->BuildShape())->shape()[1] = filter_k; utils::cast<abstract::ShapePtr>(abstract_tensor->BuildShape())->shape()[1] = filter_k;
utils::cast<abstract::ShapePtr>(abstract_tensor->BuildShape())->shape()[2] = filter_h; utils::cast<abstract::ShapePtr>(abstract_tensor->BuildShape())->shape()[2] = filter_h;
utils::cast<abstract::ShapePtr>(abstract_tensor->BuildShape())->shape()[3] = filter_w; utils::cast<abstract::ShapePtr>(abstract_tensor->BuildShape())->shape()[3] = filter_w;
weight->set_tensor_shape({static_cast<int>(filter_c), static_cast<int>(filter_k), static_cast<int>(filter_h), weight->set_tensor_shape(
static_cast<int>(filter_w)}); {static_cast<int>(filter_c), static_cast<int>(filter_k), static_cast<int>(filter_h), static_cast<int>(filter_w)});
} }
return; return;
} }

View File

@ -22,7 +22,6 @@
#include <cmath> #include <cmath>
#include <memory> #include <memory>
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
#include "ir/dtype/type_id.h"
namespace mindspore { namespace mindspore {
namespace lite { namespace lite {

View File

@ -22,7 +22,6 @@
#include <cmath> #include <cmath>
#include <memory> #include <memory>
#include <string> #include <string>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -22,7 +22,6 @@
#include <cmath> #include <cmath>
#include <memory> #include <memory>
#include <string> #include <string>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/arithmetic_self.h" #include "src/ops/arithmetic_self.h"
namespace mindspore { namespace mindspore {

View File

@ -21,7 +21,6 @@
#include <set> #include <set>
#include <cmath> #include <cmath>
#include <memory> #include <memory>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/arithmetic.h" #include "src/ops/arithmetic.h"
namespace mindspore { namespace mindspore {

View File

@ -21,7 +21,6 @@
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
#include "ir/dtype/type_id.h"
namespace mindspore { namespace mindspore {
namespace lite { namespace lite {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -21,7 +21,6 @@
#include <set> #include <set>
#include <cmath> #include <cmath>
#include <memory> #include <memory>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/arithmetic.h" #include "src/ops/arithmetic.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -21,7 +21,6 @@
#include <set> #include <set>
#include <cmath> #include <cmath>
#include <memory> #include <memory>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/arithmetic_self.h" #include "src/ops/arithmetic_self.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/arithmetic.h" #include "src/ops/arithmetic.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/arithmetic.h" #include "src/ops/arithmetic.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,6 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -16,7 +16,7 @@
#include "src/ops/gather.h" #include "src/ops/gather.h"
#include "include/errorcode.h" #include "include/errorcode.h"
#include "utils/log_adapter.h" #include "src/common/log_adapter.h"
#include "src/tensor.h" #include "src/tensor.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -19,7 +19,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/arithmetic.h" #include "src/ops/arithmetic.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/arithmetic.h" #include "src/ops/arithmetic.h"
namespace mindspore { namespace mindspore {

View File

@ -21,7 +21,7 @@
#include <set> #include <set>
#include <cmath> #include <cmath>
#include <memory> #include <memory>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/arithmetic.h" #include "src/ops/arithmetic.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/arithmetic.h" #include "src/ops/arithmetic.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/arithmetic_self.h" #include "src/ops/arithmetic_self.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/arithmetic.h" #include "src/ops/arithmetic.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/arithmetic_self.h" #include "src/ops/arithmetic_self.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/arithmetic.h" #include "src/ops/arithmetic.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -21,7 +21,6 @@
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
#include "ir/dtype/type_id.h"
namespace mindspore { namespace mindspore {
namespace lite { namespace lite {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/arithmetic.h" #include "src/ops/arithmetic.h"
namespace mindspore { namespace mindspore {

View File

@ -21,7 +21,7 @@
#include <set> #include <set>
#include <cmath> #include <cmath>
#include <memory> #include <memory>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/arithmetic.h" #include "src/ops/arithmetic.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/arithmetic.h" #include "src/ops/arithmetic.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/primitive_c.h" #include "src/ops/primitive_c.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/arithmetic_self.h" #include "src/ops/arithmetic_self.h"
namespace mindspore { namespace mindspore {

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <set> #include <set>
#include <cmath> #include <cmath>
#include "ir/dtype/type_id.h"
#include "src/ops/arithmetic_self.h" #include "src/ops/arithmetic_self.h"
namespace mindspore { namespace mindspore {

Some files were not shown because too many files have changed in this diff Show More