Compare commits
104 Commits
Author | SHA1 | Date |
---|---|---|
mindspore-ci-bot | 49aa7bb17b | 4 years ago |
lianghao | 82c1afa937 | 4 years ago |
mindspore-ci-bot | ab5ec6dc22 | 4 years ago |
lianghao | 77b56c0c08 | 4 years ago |
mindspore-ci-bot | 14a7c6a880 | 4 years ago |
lianghao | 2e67c3d45a | 4 years ago |
mindspore-ci-bot | 4bbaa371f0 | 4 years ago |
lianghao | eb830a57ad | 4 years ago |
mindspore-ci-bot | cee0f1b66a | 4 years ago |
y00500818 | 4f32ef5b79 | 4 years ago |
mindspore-ci-bot | 793abeabcf | 4 years ago |
wangxiaotian22 | f8bdf04f0b | 4 years ago |
mindspore-ci-bot | b159ab4d03 | 4 years ago |
yanghaoran | 82dd040420 | 4 years ago |
mindspore-ci-bot | 1bcdf925d1 | 4 years ago |
王涛 | 2d31b66f9d | 4 years ago |
mindspore-ci-bot | 312c394163 | 4 years ago |
mindspore-ci-bot | ebb409130c | 4 years ago |
wangwenhua1@huawei.com | 87a6726b2f | 4 years ago |
wangwenhua1@huawei.com | f24291b161 | 4 years ago |
wangwenhua1@huawei.com | 41282db089 | 4 years ago |
wangwenhua1@huawei.com | 0828878bbd | 4 years ago |
lianghao | acafc1b578 | 4 years ago |
wangwenhua1@huawei.com | 6453e36696 | 4 years ago |
mindspore-ci-bot | 49a014c687 | 4 years ago |
y00500818 | 5fe5f712bf | 4 years ago |
mindspore-ci-bot | b8457f7e21 | 4 years ago |
王涛 | eed48a4245 | 4 years ago |
mindspore-ci-bot | 78c8adccc8 | 4 years ago |
y00500818 | fca7991db2 | 4 years ago |
mindspore-ci-bot | 1fcf20a787 | 4 years ago |
wqtshg | 596515a68b | 4 years ago |
mindspore-ci-bot | 8c4aef3cef | 4 years ago |
wqtshg | b351f9ee54 | 4 years ago |
mindspore-ci-bot | 4e7301f926 | 4 years ago |
taoxudonghaha | 8692ffc23f | 4 years ago |
mindspore-ci-bot | 892da7167c | 4 years ago |
y00500818 | a4bab5bc89 | 4 years ago |
mindspore-ci-bot | e7e7f4143a | 4 years ago |
y00500818 | 0f96eff3af | 4 years ago |
计晨 | 05020186f0 | 4 years ago |
wqtshg | 66f563a97d | 4 years ago |
wqtshg | 66e9b44b89 | 4 years ago |
wqtshg | d16cf136c2 | 4 years ago |
wqtshg | 06e33a7c04 | 4 years ago |
wqtshg | 3ad7da206e | 4 years ago |
wqtshg | b409e6a442 | 4 years ago |
wqtshg | f5e161b876 | 4 years ago |
wqtshg | 73e3484b2c | 4 years ago |
wqtshg | 5292a506a7 | 4 years ago |
w00562650 | 61f5835f2e | 4 years ago |
w00562650 | 0cfdcdb096 | 4 years ago |
w00562650 | cd9185189b | 4 years ago |
w00562650 | 7c19be97fd | 4 years ago |
计晨 | 238d73e2a9 | 4 years ago |
zhaoxinxin | 8751d19dd8 | 4 years ago |
mindspore-ci-bot | c60bfbe20b | 4 years ago |
wqtshg | 7a1a82437d | 4 years ago |
mindspore-ci-bot | 0ebedf55b1 | 4 years ago |
wqtshg | 45570c3cae | 4 years ago |
mindspore-ci-bot | 9391fe4cfe | 4 years ago |
wqtshg | cd4eb3384c | 4 years ago |
mindspore-ci-bot | 0e9a7c2ab9 | 4 years ago |
王涛 | 15775d3218 | 4 years ago |
mindspore-ci-bot | 7f3cf91352 | 4 years ago |
王涛 | ec18205196 | 4 years ago |
王涛 | 7750ef2efb | 4 years ago |
王涛 | fb9144aa36 | 4 years ago |
王涛 | fd228c4843 | 4 years ago |
wqtshg | d8bfb8056b | 4 years ago |
mindspore-ci-bot | 4112a9addf | 4 years ago |
王涛 | 6d74596eaf | 4 years ago |
mindspore-ci-bot | 9d79097319 | 4 years ago |
yanghaoran | 501e8eda58 | 4 years ago |
mindspore-ci-bot | c97bc41186 | 4 years ago |
yanghaoran | 2debb65452 | 4 years ago |
mindspore-ci-bot | a5d9a75c85 | 4 years ago |
wuweikang | db4d2a9540 | 4 years ago |
mindspore-ci-bot | 0b2e3dff2f | 4 years ago |
lujiale | 995cfcac25 | 4 years ago |
lujiale | 4679646fb5 | 4 years ago |
lujiale | e0032f656f | 4 years ago |
王涛 | adb54f5f9b | 4 years ago |
taoxiangdong | 319f4d167f | 4 years ago |
taoxiangdong | 416127b1f1 | 4 years ago |
taoxiangdong | dea1063e80 | 4 years ago |
yanghaoran | 5ac356b3e2 | 4 years ago |
zhoufeng | c8d6e94441 | 4 years ago |
wuweikang | 1a651a4e57 | 4 years ago |
wuweikang | a2ec076850 | 4 years ago |
王涛 | cd365aa247 | 4 years ago |
yanghaoran | b25b70c9c2 | 4 years ago |
mindspore-ci-bot | 575b546b55 | 4 years ago |
yanghaoran | 1f4f0a47b1 | 4 years ago |
mindspore-ci-bot | 866c61a4e6 | 4 years ago |
zhoufeng | 0667dcfa3f | 4 years ago |
mindspore-ci-bot | 7a75f024d5 | 4 years ago |
wuweikang | 250465a71f | 4 years ago |
mindspore-ci-bot | 80dfd25e01 | 4 years ago |
yanghaoran | fe038d0ae5 | 4 years ago |
mindspore-ci-bot | 88049a688b | 4 years ago |
yanghaoran | dcc1768c68 | 4 years ago |
mindspore-ci-bot | 14db109491 | 4 years ago |
wuweikang | bf316a3eeb | 4 years ago |
@ -1,8 +1,6 @@
|
||||
[submodule "parser"]
|
||||
path = parser
|
||||
url = https://gitee.com/ascend/parser.git
|
||||
branch = development
|
||||
[submodule "metadef"]
|
||||
path = metadef
|
||||
url = https://gitee.com/ascend/metadef.git
|
||||
branch = development
|
||||
[submodule "parser"]
|
||||
path = parser
|
||||
url = https://gitee.com/ascend/parser.git
|
||||
|
@ -1,103 +1,112 @@
|
||||
if (HAVE_PROTOC)
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(ExternalProject)
|
||||
include(GNUInstallDirs)
|
||||
#set(CMAKE_INSTALL_PREFIX ${GE_CODE_DIR}/output)
|
||||
|
||||
if ((${CMAKE_INSTALL_PREFIX} STREQUAL /usr/local) OR
|
||||
(${CMAKE_INSTALL_PREFIX} STREQUAL "C:/Program Files (x86)/ascend"))
|
||||
set(CMAKE_INSTALL_PREFIX ${GE_CODE_DIR}/output CACHE STRING "path for install()" FORCE)
|
||||
message(STATUS "No install prefix selected, default to ${CMAKE_INSTALL_PREFIX}.")
|
||||
endif()
|
||||
|
||||
set(protobuf_CXXFLAGS "-Wno-maybe-uninitialized -Wno-unused-parameter -fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2 -D_GLIBCXX_USE_CXX11_ABI=0 -O2")
|
||||
set(protobuf_LDFLAGS "-Wl,-z,relro,-z,now,-z,noexecstack")
|
||||
ExternalProject_Add(protoc_build
|
||||
URL https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz
|
||||
#URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz
|
||||
#SOURCE_DIR ${GE_CODE_DIR}/../third_party/protobuf/src/protobuf-3.8.0
|
||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS=${protobuf_CXXFLAGS} -DCMAKE_CXX_LDFLAGS=${protobuf_LDFLAGS} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}/protoc <SOURCE_DIR>/cmake
|
||||
BUILD_COMMAND $(MAKE)
|
||||
INSTALL_COMMAND $(MAKE) install
|
||||
EXCLUDE_FROM_ALL TRUE
|
||||
)
|
||||
|
||||
set(PROTOC_PKG_DIR ${CMAKE_INSTALL_PREFIX}/protoc)
|
||||
|
||||
set(protoc_EXECUTABLE ${PROTOC_PKG_DIR}/${CMAKE_INSTALL_BINDIR}/protoc)
|
||||
|
||||
function(protobuf_generate comp c_var h_var)
|
||||
if(NOT ARGN)
|
||||
message(SEND_ERROR "Error: protobuf_generate() called without any proto files")
|
||||
return()
|
||||
endif()
|
||||
set(${c_var})
|
||||
set(${h_var})
|
||||
|
||||
foreach(file ${ARGN})
|
||||
get_filename_component(abs_file ${file} ABSOLUTE)
|
||||
get_filename_component(file_name ${file} NAME_WE)
|
||||
get_filename_component(file_dir ${abs_file} PATH)
|
||||
get_filename_component(parent_subdir ${file_dir} NAME)
|
||||
|
||||
if("${parent_subdir}" STREQUAL "proto")
|
||||
set(proto_output_path ${CMAKE_BINARY_DIR}/proto/${comp}/proto)
|
||||
else()
|
||||
set(proto_output_path ${CMAKE_BINARY_DIR}/proto/${comp}/proto/${parent_subdir})
|
||||
endif()
|
||||
list(APPEND ${c_var} "${proto_output_path}/${file_name}.pb.cc")
|
||||
list(APPEND ${h_var} "${proto_output_path}/${file_name}.pb.h")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${proto_output_path}/${file_name}.pb.cc" "${proto_output_path}/${file_name}.pb.h"
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${proto_output_path}"
|
||||
COMMAND ${protoc_EXECUTABLE} -I${file_dir} --cpp_out=${proto_output_path} ${abs_file}
|
||||
DEPENDS protoc_build ${abs_file}
|
||||
COMMENT "Running C++ protocol buffer compiler on ${file}" VERBATIM )
|
||||
endforeach()
|
||||
|
||||
set_source_files_properties(${${c_var}} ${${h_var}} PROPERTIES GENERATED TRUE)
|
||||
set(${c_var} ${${c_var}} PARENT_SCOPE)
|
||||
set(${h_var} ${${h_var}} PARENT_SCOPE)
|
||||
|
||||
endfunction()
|
||||
|
||||
function(protobuf_generate_py comp py_var)
|
||||
if(NOT ARGN)
|
||||
message(SEND_ERROR "Error: protobuf_generate_py() called without any proto files")
|
||||
return()
|
||||
endif()
|
||||
set(${py_var})
|
||||
|
||||
foreach(file ${ARGN})
|
||||
get_filename_component(abs_file ${file} ABSOLUTE)
|
||||
get_filename_component(file_name ${file} NAME_WE)
|
||||
get_filename_component(file_dir ${abs_file} PATH)
|
||||
get_filename_component(parent_subdir ${file_dir} NAME)
|
||||
|
||||
if("${parent_subdir}" STREQUAL "proto")
|
||||
set(proto_output_path ${CMAKE_BINARY_DIR}/proto/${comp}/proto)
|
||||
else()
|
||||
set(proto_output_path ${CMAKE_BINARY_DIR}/proto/${comp}/proto/${parent_subdir})
|
||||
endif()
|
||||
list(APPEND ${py_var} "${proto_output_path}/${file_name}_pb2.py")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${proto_output_path}/${file_name}_pb2.py"
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${proto_output_path}"
|
||||
COMMAND ${protoc_EXECUTABLE} -I${file_dir} --python_out=${proto_output_path} ${abs_file}
|
||||
DEPENDS protoc_build ${abs_file}
|
||||
COMMENT "Running PYTHON protocol buffer compiler on ${file}" VERBATIM )
|
||||
endforeach()
|
||||
|
||||
set_source_files_properties(${${py_var}} PROPERTIES GENERATED TRUE)
|
||||
set(${py_var} ${${py_var}} PARENT_SCOPE)
|
||||
|
||||
endfunction()
|
||||
|
||||
#set(HAVE_PROTOC TRUE CACHE BOOL "protoc build add")
|
||||
set(HAVE_PROTOC TRUE)
|
||||
if (HAVE_PROTOC)
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(ExternalProject)
|
||||
include(GNUInstallDirs)
|
||||
#set(CMAKE_INSTALL_PREFIX ${GE_CODE_DIR}/output)
|
||||
|
||||
if ((${CMAKE_INSTALL_PREFIX} STREQUAL /usr/local) OR
|
||||
(${CMAKE_INSTALL_PREFIX} STREQUAL "C:/Program Files (x86)/ascend"))
|
||||
set(CMAKE_INSTALL_PREFIX ${GE_CODE_DIR}/output CACHE STRING "path for install()" FORCE)
|
||||
message(STATUS "No install prefix selected, default to ${CMAKE_INSTALL_PREFIX}.")
|
||||
endif()
|
||||
|
||||
if (ENABLE_GITEE)
|
||||
set(REQ_URL "https://gitee.com/mirrors/protobuf_source/repository/archive/v3.8.0.tar.gz")
|
||||
set(MD5 "eba86ae9f07ba5cfbaf8af3bc4e84236")
|
||||
else()
|
||||
set(REQ_URL "https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz")
|
||||
set(MD5 "3d9e32700639618a4d2d342c99d4507a")
|
||||
endif ()
|
||||
|
||||
|
||||
set(protobuf_CXXFLAGS "-Wno-maybe-uninitialized -Wno-unused-parameter -fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2 -D_GLIBCXX_USE_CXX11_ABI=0 -O2")
|
||||
set(protobuf_LDFLAGS "-Wl,-z,relro,-z,now,-z,noexecstack")
|
||||
ExternalProject_Add(protoc_build
|
||||
URL ${REQ_URL}
|
||||
#URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz
|
||||
#SOURCE_DIR ${GE_CODE_DIR}/../third_party/protobuf/src/protobuf-3.8.0
|
||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS=${protobuf_CXXFLAGS} -DCMAKE_CXX_LDFLAGS=${protobuf_LDFLAGS} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}/protoc <SOURCE_DIR>/cmake
|
||||
BUILD_COMMAND $(MAKE)
|
||||
INSTALL_COMMAND $(MAKE) install
|
||||
EXCLUDE_FROM_ALL TRUE
|
||||
)
|
||||
|
||||
set(PROTOC_PKG_DIR ${CMAKE_INSTALL_PREFIX}/protoc)
|
||||
|
||||
set(protoc_EXECUTABLE ${PROTOC_PKG_DIR}/${CMAKE_INSTALL_BINDIR}/protoc)
|
||||
|
||||
function(protobuf_generate comp c_var h_var)
|
||||
if(NOT ARGN)
|
||||
message(SEND_ERROR "Error: protobuf_generate() called without any proto files")
|
||||
return()
|
||||
endif()
|
||||
set(${c_var})
|
||||
set(${h_var})
|
||||
|
||||
foreach(file ${ARGN})
|
||||
get_filename_component(abs_file ${file} ABSOLUTE)
|
||||
get_filename_component(file_name ${file} NAME_WE)
|
||||
get_filename_component(file_dir ${abs_file} PATH)
|
||||
get_filename_component(parent_subdir ${file_dir} NAME)
|
||||
|
||||
if("${parent_subdir}" STREQUAL "proto")
|
||||
set(proto_output_path ${CMAKE_BINARY_DIR}/proto/${comp}/proto)
|
||||
else()
|
||||
set(proto_output_path ${CMAKE_BINARY_DIR}/proto/${comp}/proto/${parent_subdir})
|
||||
endif()
|
||||
list(APPEND ${c_var} "${proto_output_path}/${file_name}.pb.cc")
|
||||
list(APPEND ${h_var} "${proto_output_path}/${file_name}.pb.h")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${proto_output_path}/${file_name}.pb.cc" "${proto_output_path}/${file_name}.pb.h"
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${proto_output_path}"
|
||||
COMMAND ${protoc_EXECUTABLE} -I${file_dir} --cpp_out=${proto_output_path} ${abs_file}
|
||||
DEPENDS protoc_build ${abs_file}
|
||||
COMMENT "Running C++ protocol buffer compiler on ${file}" VERBATIM )
|
||||
endforeach()
|
||||
|
||||
set_source_files_properties(${${c_var}} ${${h_var}} PROPERTIES GENERATED TRUE)
|
||||
set(${c_var} ${${c_var}} PARENT_SCOPE)
|
||||
set(${h_var} ${${h_var}} PARENT_SCOPE)
|
||||
|
||||
endfunction()
|
||||
|
||||
function(protobuf_generate_py comp py_var)
|
||||
if(NOT ARGN)
|
||||
message(SEND_ERROR "Error: protobuf_generate_py() called without any proto files")
|
||||
return()
|
||||
endif()
|
||||
set(${py_var})
|
||||
|
||||
foreach(file ${ARGN})
|
||||
get_filename_component(abs_file ${file} ABSOLUTE)
|
||||
get_filename_component(file_name ${file} NAME_WE)
|
||||
get_filename_component(file_dir ${abs_file} PATH)
|
||||
get_filename_component(parent_subdir ${file_dir} NAME)
|
||||
|
||||
if("${parent_subdir}" STREQUAL "proto")
|
||||
set(proto_output_path ${CMAKE_BINARY_DIR}/proto/${comp}/proto)
|
||||
else()
|
||||
set(proto_output_path ${CMAKE_BINARY_DIR}/proto/${comp}/proto/${parent_subdir})
|
||||
endif()
|
||||
list(APPEND ${py_var} "${proto_output_path}/${file_name}_pb2.py")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${proto_output_path}/${file_name}_pb2.py"
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${proto_output_path}"
|
||||
COMMAND ${protoc_EXECUTABLE} -I${file_dir} --python_out=${proto_output_path} ${abs_file}
|
||||
DEPENDS protoc_build ${abs_file}
|
||||
COMMENT "Running PYTHON protocol buffer compiler on ${file}" VERBATIM )
|
||||
endforeach()
|
||||
|
||||
set_source_files_properties(${${py_var}} PROPERTIES GENERATED TRUE)
|
||||
set(${py_var} ${${py_var}} PARENT_SCOPE)
|
||||
|
||||
endfunction()
|
||||
|
||||
#set(HAVE_PROTOC TRUE CACHE BOOL "protoc build add")
|
||||
set(HAVE_PROTOC TRUE)
|
||||
|
@ -1 +1,104 @@
|
||||
../../proto/ge_api.proto
|
||||
/**
|
||||
* Copyright 2019-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.
|
||||
*/
|
||||
|
||||
syntax = "proto3";
|
||||
package ge.api_pb;
|
||||
|
||||
import "ge_ir.proto";
|
||||
|
||||
// GE initialize
|
||||
message GEInitialize {
|
||||
map<string, string> options = 1;
|
||||
};
|
||||
|
||||
// initialize response
|
||||
message GEInitializeResponse {
|
||||
uint32 status = 1;
|
||||
uint32 clientId = 2;
|
||||
};
|
||||
|
||||
// GE finalize
|
||||
message GEFinalize {
|
||||
bool final = 1;
|
||||
uint32 clientId = 2;
|
||||
};
|
||||
|
||||
message GEFinalizeResponse {
|
||||
uint32 status = 1;
|
||||
};
|
||||
|
||||
// GE Session
|
||||
message CreateSession{
|
||||
map<string, string> options = 1;
|
||||
};
|
||||
|
||||
message CreateSessionResponse {
|
||||
uint32 status = 1;
|
||||
uint64 sessionId = 2;
|
||||
};
|
||||
|
||||
//GE AddGraph
|
||||
//model serialize :: serializegraph
|
||||
message SessionAddGraph{
|
||||
uint32 graphId = 1;
|
||||
uint64 sessionId = 2;
|
||||
ge.proto.GraphDef graph = 3;
|
||||
};
|
||||
|
||||
message SessionAddGraphResponse {
|
||||
uint32 status = 1;
|
||||
};
|
||||
|
||||
//GE SessionRemoveGraph
|
||||
message SessionRemoveGraph{
|
||||
uint32 graphId = 1;
|
||||
uint64 sessionId = 2;
|
||||
};
|
||||
|
||||
message SessionRemoveGraphResponse {
|
||||
uint32 status = 1;
|
||||
};
|
||||
|
||||
message SessionRunGraph{
|
||||
uint32 graphId = 1;
|
||||
uint64 sessionId = 2;
|
||||
repeated ge.proto.TensorDef tensor = 3;
|
||||
};
|
||||
|
||||
message SessionBuildGraph{
|
||||
uint32 graphId = 1;
|
||||
uint64 sessionId = 2;
|
||||
repeated ge.proto.TensorDef tensor = 3;
|
||||
string savePath = 4;
|
||||
};
|
||||
|
||||
message SessionRunGraphResponse {
|
||||
uint32 status = 1;
|
||||
repeated ge.proto.TensorDef tensor = 2;
|
||||
};
|
||||
|
||||
message SessionBuildGraphResponse {
|
||||
uint32 status = 1;
|
||||
};
|
||||
|
||||
message DestroySession{
|
||||
bool final = 1;
|
||||
uint64 sessionId = 2;
|
||||
};
|
||||
|
||||
message DestroySessionResponse {
|
||||
uint32 status = 1;
|
||||
};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue