Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
195f04e5
M
mindspore
项目概览
magicwindyyd
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindspore
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
195f04e5
编写于
8月 05, 2020
作者:
L
liubuyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
compile the core directory into a separate static library
上级
beb8527d
变更
30
隐藏空白更改
内联
并排
Showing
30 changed file
with
57 addition
and
67 deletion
+57
-67
CMakeLists.txt
CMakeLists.txt
+1
-0
cmake/package.cmake
cmake/package.cmake
+0
-6
mindspore/ccsrc/CMakeLists.txt
mindspore/ccsrc/CMakeLists.txt
+4
-15
mindspore/ccsrc/backend/kernel_compiler/akg/akg_kernel_build.h
...pore/ccsrc/backend/kernel_compiler/akg/akg_kernel_build.h
+1
-0
mindspore/ccsrc/backend/kernel_compiler/cpu/sub_cpu_kernel.cc
...spore/ccsrc/backend/kernel_compiler/cpu/sub_cpu_kernel.cc
+2
-1
mindspore/ccsrc/gvar/CMakeLists.txt
mindspore/ccsrc/gvar/CMakeLists.txt
+0
-6
mindspore/ccsrc/minddata/dataset/CMakeLists.txt
mindspore/ccsrc/minddata/dataset/CMakeLists.txt
+1
-1
mindspore/ccsrc/minddata/mindrecord/CMakeLists.txt
mindspore/ccsrc/minddata/mindrecord/CMakeLists.txt
+2
-2
mindspore/ccsrc/utils/load_onnx/anf_converter.cc
mindspore/ccsrc/utils/load_onnx/anf_converter.cc
+1
-0
mindspore/ccsrc/utils/primitive_py.cc
mindspore/ccsrc/utils/primitive_py.cc
+1
-0
mindspore/ccsrc/utils/primitive_utils.cc
mindspore/ccsrc/utils/primitive_utils.cc
+1
-0
mindspore/core/CMakeLists.txt
mindspore/core/CMakeLists.txt
+23
-0
mindspore/core/abstract/CMakeLists.txt
mindspore/core/abstract/CMakeLists.txt
+0
-3
mindspore/core/base/CMakeLists.txt
mindspore/core/base/CMakeLists.txt
+0
-3
mindspore/core/c_ops/CMakeLists.txt
mindspore/core/c_ops/CMakeLists.txt
+0
-2
mindspore/core/gvar/logging_level.cc
mindspore/core/gvar/logging_level.cc
+0
-0
mindspore/core/gvar/typeid_manager.cc
mindspore/core/gvar/typeid_manager.cc
+0
-0
mindspore/core/ir/CMakeLists.txt
mindspore/core/ir/CMakeLists.txt
+0
-3
mindspore/core/ir/primitive.h
mindspore/core/ir/primitive.h
+1
-1
mindspore/core/utils/CMakeLists.txt
mindspore/core/utils/CMakeLists.txt
+0
-3
mindspore/core/utils/label.h
mindspore/core/utils/label.h
+3
-3
mindspore/core/utils/log_adapter.cc
mindspore/core/utils/log_adapter.cc
+1
-2
mindspore/core/utils/log_adapter.h
mindspore/core/utils/log_adapter.h
+1
-2
mindspore/core/utils/ms_utils.h
mindspore/core/utils/ms_utils.h
+3
-3
mindspore/core/utils/profile.h
mindspore/core/utils/profile.h
+3
-3
mindspore/lite/CMakeLists.txt
mindspore/lite/CMakeLists.txt
+2
-2
mindspore/lite/minddata/CMakeLists.txt
mindspore/lite/minddata/CMakeLists.txt
+1
-1
mindspore/lite/test/CMakeLists.txt
mindspore/lite/test/CMakeLists.txt
+2
-2
serving/CMakeLists.txt
serving/CMakeLists.txt
+1
-1
tests/ut/cpp/CMakeLists.txt
tests/ut/cpp/CMakeLists.txt
+2
-2
未找到文件。
CMakeLists.txt
浏览文件 @
195f04e5
...
@@ -98,6 +98,7 @@ endif()
...
@@ -98,6 +98,7 @@ endif()
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-fvisibility=hidden"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-fvisibility=hidden"
)
add_subdirectory
(
mindspore/ccsrc
)
add_subdirectory
(
mindspore/ccsrc
)
add_subdirectory
(
mindspore/core
)
if
(
ENABLE_TESTCASES
)
if
(
ENABLE_TESTCASES
)
add_subdirectory
(
tests
)
add_subdirectory
(
tests
)
endif
()
endif
()
...
...
cmake/package.cmake
浏览文件 @
195f04e5
...
@@ -52,12 +52,6 @@ install(
...
@@ -52,12 +52,6 @@ install(
COMPONENT mindspore
COMPONENT mindspore
)
)
install
(
TARGETS mindspore_gvar
DESTINATION
${
INSTALL_LIB_DIR
}
COMPONENT mindspore
)
if
(
USE_GLOG
)
if
(
USE_GLOG
)
file
(
GLOB_RECURSE GLOG_LIB_LIST
${
glog_LIBPATH
}
/libglog*
)
file
(
GLOB_RECURSE GLOG_LIB_LIST
${
glog_LIBPATH
}
/libglog*
)
install
(
install
(
...
...
mindspore/ccsrc/CMakeLists.txt
浏览文件 @
195f04e5
...
@@ -130,7 +130,7 @@ set(SUB_COMP
...
@@ -130,7 +130,7 @@ set(SUB_COMP
frontend/operator
frontend/operator
pipeline/jit
pipeline/jit
pipeline/pynative
pipeline/pynative
common debug
gvar
pybind_api utils vm
common debug pybind_api utils vm
)
)
foreach
(
_comp
${
SUB_COMP
}
)
foreach
(
_comp
${
SUB_COMP
}
)
...
@@ -141,23 +141,14 @@ foreach (_comp ${SUB_COMP})
...
@@ -141,23 +141,14 @@ foreach (_comp ${SUB_COMP})
add_dependencies
(
_mindspore_
${
sub
}
_obj proto_input
)
add_dependencies
(
_mindspore_
${
sub
}
_obj proto_input
)
endif
()
endif
()
endforeach
()
endforeach
()
add_subdirectory
(
${
CMAKE_SOURCE_DIR
}
/mindspore/core/base base
)
list
(
APPEND SUB_OBJECTS_SRC $<TARGET_OBJECTS:_mindspore_base_obj>
)
add_subdirectory
(
${
CMAKE_SOURCE_DIR
}
/mindspore/core/abstract abstract
)
list
(
APPEND SUB_OBJECTS_SRC $<TARGET_OBJECTS:_mindspore_abstract_obj>
)
add_subdirectory
(
${
CMAKE_SOURCE_DIR
}
/mindspore/core/utils util
)
list
(
APPEND SUB_OBJECTS_SRC $<TARGET_OBJECTS:_mindspore_core_utils_obj>
)
add_subdirectory
(
${
CMAKE_SOURCE_DIR
}
/mindspore/core/ir ir
)
list
(
APPEND SUB_OBJECTS_SRC $<TARGET_OBJECTS:_mindspore_ir_obj>
)
add_subdirectory
(
${
CMAKE_SOURCE_DIR
}
/mindspore/core/c_ops c_ops
)
list
(
APPEND SUB_OBJECTS_SRC $<TARGET_OBJECTS:_mindspore_c_ops_obj>
)
add_dependencies
(
_mindspore_core_utils_obj _mindspore_base_obj _mindspore_ir_obj _mindspore_abstract_obj _mindspore_c_ops_obj proto_input
)
set_property
(
SOURCE
${
SUB_OBJECTS_SRC
}
PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_ME
)
set_property
(
SOURCE
${
SUB_OBJECTS_SRC
}
PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_ME
)
add_library
(
mindspore STATIC
${
SUB_OBJECTS_SRC
}
)
add_library
(
mindspore STATIC
${
SUB_OBJECTS_SRC
}
)
target_link_libraries
(
proto_input mindspore::protobuf
)
target_link_libraries
(
proto_input mindspore::protobuf
)
target_link_libraries
(
mindspore mindspore_core
)
if
(
ENABLE_DEBUGGER
)
if
(
ENABLE_DEBUGGER
)
# debugger: link grpc
# debugger: link grpc
target_link_libraries
(
proto_input mindspore::grpc++
)
target_link_libraries
(
proto_input mindspore::grpc++
)
...
@@ -244,7 +235,6 @@ set_target_properties(_c_expression PROPERTIES INSTALL_RPATH ${ORIGIN_PATH})
...
@@ -244,7 +235,6 @@ set_target_properties(_c_expression PROPERTIES INSTALL_RPATH ${ORIGIN_PATH})
if
(
CMAKE_SYSTEM_NAME MATCHES
"Windows"
)
if
(
CMAKE_SYSTEM_NAME MATCHES
"Windows"
)
target_link_libraries
(
mindspore mindspore::pybind11_module
)
target_link_libraries
(
mindspore mindspore::pybind11_module
)
target_link_libraries
(
mindspore mindspore_gvar
)
target_link_libraries
(
_c_expression PRIVATE -Wl,--whole-archive mindspore -Wl,--no-whole-archive
)
target_link_libraries
(
_c_expression PRIVATE -Wl,--whole-archive mindspore -Wl,--no-whole-archive
)
else
()
else
()
if
(
ENABLE_CPU
AND
(
ENABLE_D OR ENABLE_GPU
))
if
(
ENABLE_CPU
AND
(
ENABLE_D OR ENABLE_GPU
))
...
@@ -255,7 +245,6 @@ else ()
...
@@ -255,7 +245,6 @@ else ()
endif
()
endif
()
target_link_libraries
(
_c_expression PRIVATE -Wl,--whole-archive mindspore -Wl,--no-whole-archive
)
target_link_libraries
(
_c_expression PRIVATE -Wl,--whole-archive mindspore -Wl,--no-whole-archive
)
target_link_libraries
(
_c_expression PRIVATE mindspore::pybind11_module
)
target_link_libraries
(
_c_expression PRIVATE mindspore::pybind11_module
)
target_link_libraries
(
_c_expression PRIVATE mindspore_gvar
)
endif
()
endif
()
if
(
USE_GLOG
)
if
(
USE_GLOG
)
...
@@ -299,7 +288,7 @@ add_library(inference SHARED
...
@@ -299,7 +288,7 @@ add_library(inference SHARED
${
LOAD_ONNX_SRC
}
${
LOAD_ONNX_SRC
}
)
)
target_link_libraries
(
inference PRIVATE
${
PYTHON_LIBRARIES
}
${
SECUREC_LIBRARY
}
target_link_libraries
(
inference PRIVATE
${
PYTHON_LIBRARIES
}
${
SECUREC_LIBRARY
}
-Wl,--whole-archive mindspore -Wl,--no-whole-archive mindspore
_gvar mindspore
::protobuf
)
-Wl,--whole-archive mindspore -Wl,--no-whole-archive mindspore::protobuf
)
if
(
ENABLE_CPU
)
if
(
ENABLE_CPU
)
target_link_libraries
(
inference PRIVATE mindspore::dnnl mindspore::mkldnn
)
target_link_libraries
(
inference PRIVATE mindspore::dnnl mindspore::mkldnn
)
...
...
mindspore/ccsrc/backend/kernel_compiler/akg/akg_kernel_build.h
浏览文件 @
195f04e5
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include "backend/kernel_compiler/kernel.h"
#include "backend/kernel_compiler/kernel.h"
#include "ir/dtype.h"
#include "ir/dtype.h"
#include "ir/primitive.h"
#include "ir/primitive.h"
#include "pybind11/pybind11.h"
#include <nlohmann/json.hpp>
#include <nlohmann/json.hpp>
#include "backend/kernel_compiler/common_utils.h"
#include "backend/kernel_compiler/common_utils.h"
#include "backend/kernel_compiler/oplib/oplib.h"
#include "backend/kernel_compiler/oplib/oplib.h"
...
...
mindspore/ccsrc/backend/kernel_compiler/cpu/sub_cpu_kernel.cc
浏览文件 @
195f04e5
...
@@ -13,8 +13,9 @@
...
@@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
#include <thread>
#include "backend/kernel_compiler/cpu/sub_cpu_kernel.h"
#include "backend/kernel_compiler/cpu/sub_cpu_kernel.h"
#include <sys/time.h>
#include <thread>
#include "runtime/device/cpu/cpu_device_address.h"
#include "runtime/device/cpu/cpu_device_address.h"
namespace
mindspore
{
namespace
mindspore
{
...
...
mindspore/ccsrc/gvar/CMakeLists.txt
已删除
100644 → 0
浏览文件 @
beb8527d
file
(
GLOB_RECURSE MS_GVAR_SRC_LIST RELATIVE
${
CMAKE_CURRENT_SOURCE_DIR
}
*.cc
)
set_property
(
SOURCE
${
MS_GVAR_SRC_LIST
}
PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_COMMON
)
add_library
(
mindspore_gvar SHARED
${
MS_GVAR_SRC_LIST
}
)
if
(
APPLE
)
set_target_properties
(
mindspore_gvar PROPERTIES MACOSX_RPATH ON
)
endif
()
mindspore/ccsrc/minddata/dataset/CMakeLists.txt
浏览文件 @
195f04e5
...
@@ -126,7 +126,7 @@ endif()
...
@@ -126,7 +126,7 @@ endif()
######################################################################
######################################################################
################# Link with external libraries ########################
################# Link with external libraries ########################
target_link_libraries
(
_c_dataengine PRIVATE mindspore
mindspore_gvar
)
target_link_libraries
(
_c_dataengine PRIVATE mindspore
)
if
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"Windows"
)
if
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"Windows"
)
if
(
ENABLE_PYTHON
)
if
(
ENABLE_PYTHON
)
target_link_libraries
(
_c_dataengine PRIVATE mindspore::pybind11_module
${
PYTHON_LIBRARIES
}
mindspore::protobuf
${
SECUREC_LIBRARY
}
)
target_link_libraries
(
_c_dataengine PRIVATE mindspore::pybind11_module
${
PYTHON_LIBRARIES
}
mindspore::protobuf
${
SECUREC_LIBRARY
}
)
...
...
mindspore/ccsrc/minddata/mindrecord/CMakeLists.txt
浏览文件 @
195f04e5
...
@@ -28,9 +28,9 @@ set_target_properties(_c_mindrecord PROPERTIES
...
@@ -28,9 +28,9 @@ set_target_properties(_c_mindrecord PROPERTIES
# add link library
# add link library
if
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"Windows"
)
if
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"Windows"
)
target_link_libraries
(
_c_mindrecord PRIVATE mindspore::sqlite mindspore mindspore
_gvar mindspore
::protobuf
)
target_link_libraries
(
_c_mindrecord PRIVATE mindspore::sqlite mindspore mindspore::protobuf
)
else
()
else
()
target_link_libraries
(
_c_mindrecord PRIVATE mindspore::sqlite
${
PYTHON_LIB
}
${
SECUREC_LIBRARY
}
mindspore mindspore
_gvar mindspore
::protobuf
)
target_link_libraries
(
_c_mindrecord PRIVATE mindspore::sqlite
${
PYTHON_LIB
}
${
SECUREC_LIBRARY
}
mindspore mindspore::protobuf
)
endif
()
endif
()
if
(
USE_GLOG
)
if
(
USE_GLOG
)
...
...
mindspore/ccsrc/utils/load_onnx/anf_converter.cc
浏览文件 @
195f04e5
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
#include <vector>
#include <vector>
#include <limits>
#include <limits>
#include <string>
#include <string>
#include "utils/base_ref_extends.h"
#include "utils/load_onnx/anf_model_parser.h"
#include "utils/load_onnx/anf_model_parser.h"
#include "utils/load_onnx/anf_converter.h"
#include "utils/load_onnx/anf_converter.h"
#include "google/protobuf/io/zero_copy_stream_impl.h"
#include "google/protobuf/io/zero_copy_stream_impl.h"
...
...
mindspore/ccsrc/utils/primitive_py.cc
浏览文件 @
195f04e5
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include "utils/convert_utils_base.h"
#include "utils/convert_utils_base.h"
#include "utils/primitive_utils.h"
#include "utils/primitive_utils.h"
#include "utils/base_ref_py.h"
#include "utils/base_ref_py.h"
#include "utils/base_ref_extends.h"
#include "pybind_api/api_register.h"
#include "pybind_api/api_register.h"
#include "pybind_api/export_flags.h"
#include "pybind_api/export_flags.h"
...
...
mindspore/ccsrc/utils/primitive_utils.cc
浏览文件 @
195f04e5
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include "pipeline/jit/parse/python_adapter.h"
#include "pipeline/jit/parse/python_adapter.h"
#include "utils/log_adapter.h"
#include "utils/log_adapter.h"
#include "utils/ms_utils.h"
#include "utils/ms_utils.h"
#include "utils/base_ref_extends.h"
namespace
mindspore
{
namespace
mindspore
{
py
::
function
GetBpropFunctionByObj
(
py
::
object
obj
)
{
py
::
function
GetBpropFunctionByObj
(
py
::
object
obj
)
{
...
...
mindspore/core/CMakeLists.txt
0 → 100644
浏览文件 @
195f04e5
include_directories
(
${
CMAKE_CURRENT_SOURCE_DIR
}
)
include_directories
(
${
CMAKE_BINARY_DIR
}
)
include_directories
(
${
CMAKE_SOURCE_DIR
}
/mindspore/core
)
message
(
"************build core***************"
)
if
(
CMAKE_SYSTEM_NAME MATCHES
"Windows"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-attributes -DHAVE_SNPRINTF"
)
add_compile_definitions
(
BUILDING_DLL
)
endif
()
file
(
GLOB_RECURSE CORE_SRC_LIST RELATIVE
${
CMAKE_CURRENT_SOURCE_DIR
}
"abstract/*.cc"
"base/*.cc"
"c_ops/*.cc"
"ir/*.cc"
"utils/*.cc"
"gvar/*.cc"
)
set_property
(
SOURCE
${
CORE_SRC_LIST
}
PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_CORE
)
add_library
(
mindspore_core STATIC
${
CORE_SRC_LIST
}
)
if
(
USE_GLOG
)
target_link_libraries
(
mindspore_core PRIVATE mindspore::glog
)
endif
()
mindspore/core/abstract/CMakeLists.txt
已删除
100644 → 0
浏览文件 @
beb8527d
file
(
GLOB_RECURSE _ABSTRACT_ALL_SRC_FILES RELATIVE
${
CMAKE_CURRENT_SOURCE_DIR
}
"*.cc"
)
set_property
(
SOURCE
${
_ABSTRACT_ALL_SRC_FILES
}
PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_ABSTRACT
)
add_library
(
_mindspore_abstract_obj OBJECT
${
_ABSTRACT_ALL_SRC_FILES
}
)
mindspore/core/base/CMakeLists.txt
已删除
100644 → 0
浏览文件 @
beb8527d
file
(
GLOB_RECURSE _BASE_ALL_SRC_FILES RELATIVE
${
CMAKE_CURRENT_SOURCE_DIR
}
"*.cc"
)
set_property
(
SOURCE
${
_BASE_ALL_SRC_FILES
}
PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_BASE
)
add_library
(
_mindspore_base_obj OBJECT
${
_BASE_ALL_SRC_FILES
}
)
mindspore/core/c_ops/CMakeLists.txt
已删除
100644 → 0
浏览文件 @
beb8527d
file
(
GLOB_RECURSE _C_OPS_ALL_SRC_FILES RELATIVE
${
CMAKE_CURRENT_SOURCE_DIR
}
"*.cc"
)
add_library
(
_mindspore_c_ops_obj OBJECT
${
_C_OPS_ALL_SRC_FILES
}
)
mindspore/c
csrc
/gvar/logging_level.cc
→
mindspore/c
ore
/gvar/logging_level.cc
浏览文件 @
195f04e5
文件已移动
mindspore/c
csrc
/gvar/typeid_manager.cc
→
mindspore/c
ore
/gvar/typeid_manager.cc
浏览文件 @
195f04e5
文件已移动
mindspore/core/ir/CMakeLists.txt
已删除
100644 → 0
浏览文件 @
beb8527d
file
(
GLOB_RECURSE _IR_SRC_LIST ./*.cc dtype/*.cc
)
set_property
(
SOURCE
${
_IR_SRC_LIST
}
PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_IR
)
add_library
(
_mindspore_ir_obj OBJECT
${
_IR_SRC_LIST
}
)
mindspore/core/ir/primitive.h
浏览文件 @
195f04e5
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#include "ir/dtype/type.h"
#include "ir/dtype/type.h"
#include "abstract/abstract_value.h"
#include "abstract/abstract_value.h"
#include "
utils/base_ref_extends
.h"
#include "
base/base_ref
.h"
namespace
mindspore
{
namespace
mindspore
{
// Supported meta type
// Supported meta type
...
...
mindspore/core/utils/CMakeLists.txt
已删除
100644 → 0
浏览文件 @
beb8527d
file
(
GLOB_RECURSE _UTIL_ALL_SRC_FILES RELATIVE
${
CMAKE_CURRENT_SOURCE_DIR
}
"*.cc"
)
set_property
(
SOURCE
${
_UTIL_ALL_SRC_FILES
}
PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_UTILS
)
add_library
(
_mindspore_core_utils_obj OBJECT
${
_UTIL_ALL_SRC_FILES
}
)
mindspore/core/utils/label.h
浏览文件 @
195f04e5
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
* limitations under the License.
* limitations under the License.
*/
*/
#ifndef MINDSPORE_C
CSRC
_UTILS_LABEL_H_
#ifndef MINDSPORE_C
ORE
_UTILS_LABEL_H_
#define MINDSPORE_C
CSRC
_UTILS_LABEL_H_
#define MINDSPORE_C
ORE
_UTILS_LABEL_H_
#include <iostream>
#include <iostream>
#include <memory>
#include <memory>
#include <string>
#include <string>
...
@@ -32,4 +32,4 @@ std::string Label(const DebugInfoPtr &debug_info, TraceLabelType trace_type = Tr
...
@@ -32,4 +32,4 @@ std::string Label(const DebugInfoPtr &debug_info, TraceLabelType trace_type = Tr
}
// namespace label_manage
}
// namespace label_manage
}
// namespace mindspore
}
// namespace mindspore
#endif // MINDSPORE_C
CSRC
_UTILS_LABEL_H_
#endif // MINDSPORE_C
ORE
_UTILS_LABEL_H_
mindspore/core/utils/log_adapter.cc
浏览文件 @
195f04e5
...
@@ -160,7 +160,7 @@ static std::string ExceptionTypeToString(ExceptionType type) {
...
@@ -160,7 +160,7 @@ static std::string ExceptionTypeToString(ExceptionType type) {
static
const
char
*
GetSubModuleName
(
SubModuleId
module_id
)
{
static
const
char
*
GetSubModuleName
(
SubModuleId
module_id
)
{
static
const
char
*
sub_module_names
[
NUM_SUBMODUES
]
=
{
static
const
char
*
sub_module_names
[
NUM_SUBMODUES
]
=
{
"UNKNOWN"
,
// SM_UNKNOWN
"UNKNOWN"
,
// SM_UNKNOWN
"
BASE"
,
// SM_BAS
E
"
CORE"
,
// SM_COR
E
"ANALYZER"
,
// SM_ANALYZER
"ANALYZER"
,
// SM_ANALYZER
"COMMON"
,
// SM_COMMON
"COMMON"
,
// SM_COMMON
"DEBUG"
,
// SM_DEBUG
"DEBUG"
,
// SM_DEBUG
...
@@ -180,7 +180,6 @@ static const char *GetSubModuleName(SubModuleId module_id) {
...
@@ -180,7 +180,6 @@ static const char *GetSubModuleName(SubModuleId module_id) {
"SESSION"
,
// SM_SESSION
"SESSION"
,
// SM_SESSION
"UTILS"
,
// SM_UTILS
"UTILS"
,
// SM_UTILS
"VM"
,
// SM_VM
"VM"
,
// SM_VM
"ABSTRACT"
// SM_ABSTRACT
};
};
return
sub_module_names
[
module_id
%
NUM_SUBMODUES
];
return
sub_module_names
[
module_id
%
NUM_SUBMODUES
];
...
...
mindspore/core/utils/log_adapter.h
浏览文件 @
195f04e5
...
@@ -103,7 +103,7 @@ enum MsLogLevel : int { DEBUG = 0, INFO, WARNING, ERROR, EXCEPTION };
...
@@ -103,7 +103,7 @@ enum MsLogLevel : int { DEBUG = 0, INFO, WARNING, ERROR, EXCEPTION };
enum
SubModuleId
:
int
{
enum
SubModuleId
:
int
{
SM_UNKNOWN
=
0
,
// unknown submodule
SM_UNKNOWN
=
0
,
// unknown submodule
SM_
BASE
,
// bas
e
SM_
CORE
,
// cor
e
SM_ANALYZER
,
// static analyzer
SM_ANALYZER
,
// static analyzer
SM_COMMON
,
// common
SM_COMMON
,
// common
SM_DEBUG
,
// debug
SM_DEBUG
,
// debug
...
@@ -123,7 +123,6 @@ enum SubModuleId : int {
...
@@ -123,7 +123,6 @@ enum SubModuleId : int {
SM_SESSION
,
// session
SM_SESSION
,
// session
SM_UTILS
,
// utils
SM_UTILS
,
// utils
SM_VM
,
// VM
SM_VM
,
// VM
SM_ABSTRACT
,
// abstract
NUM_SUBMODUES
// number of submodules
NUM_SUBMODUES
// number of submodules
};
};
...
...
mindspore/core/utils/ms_utils.h
浏览文件 @
195f04e5
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
#ifndef MINDSPORE_C
CSRC_COMMON
_UTILS_H_
#ifndef MINDSPORE_C
ORE_UTILS_MS
_UTILS_H_
#define MINDSPORE_C
CSRC_COMMON
_UTILS_H_
#define MINDSPORE_C
ORE_UTILS_MS
_UTILS_H_
#include <memory>
#include <memory>
#include <utility>
#include <utility>
...
@@ -49,4 +49,4 @@ static inline int SetEnv(const char *envname, const char *envvar, int overwrite
...
@@ -49,4 +49,4 @@ static inline int SetEnv(const char *envname, const char *envvar, int overwrite
}
// namespace common
}
// namespace common
}
// namespace mindspore
}
// namespace mindspore
#endif // MINDSPORE_C
CSRC_COMMON
_UTILS_H_
#endif // MINDSPORE_C
ORE_UTILS_MS
_UTILS_H_
mindspore/core/utils/profile.h
浏览文件 @
195f04e5
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
* limitations under the License.
* limitations under the License.
*/
*/
#ifndef MINDSPORE_C
CSRC
_UTILS_PROFILE_H_
#ifndef MINDSPORE_C
ORE
_UTILS_PROFILE_H_
#define MINDSPORE_C
CSRC
_UTILS_PROFILE_H_
#define MINDSPORE_C
ORE
_UTILS_PROFILE_H_
#include <map>
#include <map>
#include <string>
#include <string>
...
@@ -230,4 +230,4 @@ class MsProfile {
...
@@ -230,4 +230,4 @@ class MsProfile {
#define WITH(x) NoProfTransaction(x) -
#define WITH(x) NoProfTransaction(x) -
#endif
#endif
#endif // MINDSPORE_C
CSRC
_UTILS_PROFILE_H_
#endif // MINDSPORE_C
ORE
_UTILS_PROFILE_H_
mindspore/lite/CMakeLists.txt
浏览文件 @
195f04e5
...
@@ -65,8 +65,8 @@ endif()
...
@@ -65,8 +65,8 @@ endif()
set
(
ANF_SRC
set
(
ANF_SRC
${
CMAKE_CURRENT_SOURCE_DIR
}
/../core/ir/meta_tensor.cc
${
CMAKE_CURRENT_SOURCE_DIR
}
/../core/ir/meta_tensor.cc
${
C
CSRC
_DIR
}
/gvar/logging_level.cc
${
C
ORE
_DIR
}
/gvar/logging_level.cc
${
C
CSRC
_DIR
}
/gvar/typeid_manager.cc
${
C
ORE
_DIR
}
/gvar/typeid_manager.cc
${
CMAKE_CURRENT_SOURCE_DIR
}
/../core/base/base.cc
${
CMAKE_CURRENT_SOURCE_DIR
}
/../core/base/base.cc
${
CMAKE_CURRENT_SOURCE_DIR
}
/../core/utils/log_adapter.cc
${
CMAKE_CURRENT_SOURCE_DIR
}
/../core/utils/log_adapter.cc
)
)
...
...
mindspore/lite/minddata/CMakeLists.txt
浏览文件 @
195f04e5
...
@@ -31,7 +31,7 @@ add_library(minddata-lite SHARED
...
@@ -31,7 +31,7 @@ add_library(minddata-lite SHARED
${
MINDDATA_DIR
}
/util/path.cc
${
MINDDATA_DIR
}
/util/path.cc
${
MINDDATA_DIR
}
/api/transforms.cc
${
MINDDATA_DIR
}
/api/transforms.cc
${
CORE_DIR
}
/utils/log_adapter.cc
${
CORE_DIR
}
/utils/log_adapter.cc
${
C
CSRC
_DIR
}
/gvar/logging_level.cc
${
C
ORE
_DIR
}
/gvar/logging_level.cc
)
)
target_link_libraries
(
minddata-lite
target_link_libraries
(
minddata-lite
...
...
mindspore/lite/test/CMakeLists.txt
浏览文件 @
195f04e5
...
@@ -9,8 +9,8 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/dependency_gtest.cmake)
...
@@ -9,8 +9,8 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/dependency_gtest.cmake)
### anf src
### anf src
set
(
ANF_SRC
set
(
ANF_SRC
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../core/ir/meta_tensor.cc
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../core/ir/meta_tensor.cc
${
C
CSRC
_DIR
}
/gvar/logging_level.cc
${
C
ORE
_DIR
}
/gvar/logging_level.cc
${
C
CSRC
_DIR
}
/gvar/typeid_manager.cc
${
C
ORE
_DIR
}
/gvar/typeid_manager.cc
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../core/base/base.cc
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../core/base/base.cc
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../core/utils/log_adapter.cc
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../core/utils/log_adapter.cc
)
)
...
...
serving/CMakeLists.txt
浏览文件 @
195f04e5
...
@@ -110,5 +110,5 @@ if (ENABLE_ACL)
...
@@ -110,5 +110,5 @@ if (ENABLE_ACL)
target_link_libraries
(
ms_serving
${
ALC_LIB_SO
}
)
target_link_libraries
(
ms_serving
${
ALC_LIB_SO
}
)
target_link_libraries
(
ms_serving jpeg_turbo::jpeg
)
target_link_libraries
(
ms_serving jpeg_turbo::jpeg
)
else
()
else
()
target_link_libraries
(
ms_serving inference
mindspore_gvar
)
target_link_libraries
(
ms_serving inference
)
endif
()
endif
()
tests/ut/cpp/CMakeLists.txt
浏览文件 @
195f04e5
...
@@ -180,12 +180,12 @@ if (ENABLE_GE)
...
@@ -180,12 +180,12 @@ if (ENABLE_GE)
endif
()
endif
()
if
(
CMAKE_SYSTEM_NAME MATCHES
"Linux"
)
if
(
CMAKE_SYSTEM_NAME MATCHES
"Linux"
)
target_link_libraries
(
ut_tests PRIVATE mindspore::gtest
mindspore_gvar
${
PYTHON_LIBRARIES
}
pthread util dl
)
target_link_libraries
(
ut_tests PRIVATE mindspore::gtest
${
PYTHON_LIBRARIES
}
pthread util dl
)
if
(
ENABLE_MINDDATA
)
if
(
ENABLE_MINDDATA
)
target_link_libraries
(
ut_tests PRIVATE _c_dataengine _c_mindrecord
)
target_link_libraries
(
ut_tests PRIVATE _c_dataengine _c_mindrecord
)
endif
()
endif
()
else
()
else
()
target_link_libraries
(
ut_tests PRIVATE mindspore::gtest
mindspore_gvar
${
PYTHON_LIBRARIES
}
)
target_link_libraries
(
ut_tests PRIVATE mindspore::gtest
${
PYTHON_LIBRARIES
}
)
endif
()
endif
()
if
(
USE_GLOG
)
if
(
USE_GLOG
)
target_link_libraries
(
ut_tests PRIVATE mindspore::glog
)
target_link_libraries
(
ut_tests PRIVATE mindspore::glog
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录