forked from mindspore-Ecosystem/mindspore
update flatbuffer
This commit is contained in:
parent
f5af432e04
commit
5a26480857
|
@ -12,17 +12,17 @@ if(WIN32)
|
|||
endif()
|
||||
|
||||
if(ENABLE_GITEE)
|
||||
set(REQ_URL "https://gitee.com/mirrors/flatbuffers/repository/archive/v1.11.0.tar.gz")
|
||||
set(MD5 "8a391b9cd64afb9bf2b25c4e7715239d")
|
||||
set(REQ_URL "https://gitee.com/mirrors/flatbuffers/repository/archive/v2.0.0.tar.gz")
|
||||
set(MD5 "4181afaa9c279bd6c690a36bc15a23d2")
|
||||
else()
|
||||
set(REQ_URL "https://github.com/google/flatbuffers/archive/v1.11.0.tar.gz")
|
||||
set(MD5 "02c64880acb89dbd57eebacfd67200d8")
|
||||
set(REQ_URL "https://github.com/google/flatbuffers/archive/v2.0.0.tar.gz")
|
||||
set(MD5 "a27992324c3cbf86dd888268a23d17bd")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
set(FLATBUFFERS_PATCH ${TOP_DIR}/third_party/patch/flatbuffers/flatbuffers.patch001)
|
||||
mindspore_add_pkg(flatbuffers
|
||||
VER 1.11.0
|
||||
VER 2.0.0
|
||||
LIBS flatbuffers
|
||||
EXE flatc
|
||||
URL ${REQ_URL}
|
||||
|
@ -31,7 +31,7 @@ if(APPLE)
|
|||
CMAKE_OPTION -DFLATBUFFERS_BUILD_TESTS=OFF -DCMAKE_INSTALL_LIBDIR=lib)
|
||||
else()
|
||||
mindspore_add_pkg(flatbuffers
|
||||
VER 1.11.0
|
||||
VER 2.0.0
|
||||
LIBS flatbuffers
|
||||
EXE flatc
|
||||
URL ${REQ_URL}
|
||||
|
|
|
@ -237,13 +237,13 @@ build_lite() {
|
|||
compile_nnie_script=${BASEPATH}/mindspore/lite/tools/providers/NNIE/Hi3516D/compile_nnie.sh
|
||||
cd ${BASEPATH}/../
|
||||
if [[ "${local_lite_platform}" == "x86_64" ]]; then
|
||||
sh ${compile_nnie_script} -I x86_64 -b nnie_3516_master_dev -j $THREAD_NUM
|
||||
sh ${compile_nnie_script} -I x86_64 -b nnie_3516_master -j $THREAD_NUM
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "compile x86_64 for nnie failed."
|
||||
exit 1
|
||||
fi
|
||||
elif [[ "${local_lite_platform}" == "arm32" ]]; then
|
||||
sh ${compile_nnie_script} -I arm32 -b nnie_3516_master_dev -j $THREAD_NUM
|
||||
sh ${compile_nnie_script} -I arm32 -b nnie_3516_master -j $THREAD_NUM
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "compile arm32 for nnie failed."
|
||||
exit 1
|
||||
|
|
|
@ -49,7 +49,7 @@ dependencies {
|
|||
testCompile group: 'com.squareup.okhttp3', name: 'mockwebserver', version: '3.14.9'
|
||||
|
||||
// https://mvnrepository.com/artifact/com.google.flatbuffers/flatbuffers-java
|
||||
compile group: 'com.google.flatbuffers', name: 'flatbuffers-java', version: '1.11.0'
|
||||
compile group: 'com.google.flatbuffers', name: 'flatbuffers-java', version: '2.0.0'
|
||||
|
||||
compile(group: 'org.bouncycastle',name: 'bcprov-jdk15on', version: '1.68')
|
||||
implementation project(':common')
|
||||
|
@ -81,7 +81,7 @@ flatbuffers {
|
|||
println('flatc Path: ' + libPath)
|
||||
String version = getFlatVersion(libPath)
|
||||
println('version: ' + version)
|
||||
if ('1.11.0' == version) {
|
||||
if ('2.0.0' == version) {
|
||||
msLibPath = libPath
|
||||
return true
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ flatbuffers {
|
|||
if (file('../../../build/_deps/flatbuffers-src/_build/flatc').exists()) {
|
||||
String version = getFlatVersion('../../../build/_deps/flatbuffers-src/_build/flatc')
|
||||
println('version: ' + version)
|
||||
if ('1.11.0' == version) {
|
||||
if ('2.0.0' == version) {
|
||||
flatcPath = '../../../build/_deps/flatbuffers-src/_build/flatc'
|
||||
} else {
|
||||
println('the version of build flatc is not valid, will find the other flatc')
|
||||
|
@ -97,7 +97,7 @@ flatbuffers {
|
|||
} else if (msLibPath != '' && file(msLibPath).exists()){
|
||||
flatcPath = msLibPath
|
||||
} else {
|
||||
println("the needed flatc of version 1.11.0 is not exist, please check")
|
||||
println("the needed flatc of version 2.0.0 is not exist, please check")
|
||||
}
|
||||
println("the used flatc path: " + flatcPath)
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
|
||||
namespace mindspore {
|
||||
namespace lite {
|
||||
|
||||
int StringsToMSTensor(const std::vector<std::string> &inputs, tensor::MSTensor *tensor) {
|
||||
#ifndef STRING_KERNEL_CLIP
|
||||
if (tensor == nullptr) {
|
||||
|
|
|
@ -25,6 +25,7 @@ using mindspore::lite::RET_ERROR;
|
|||
using mindspore::lite::RET_NULL_PTR;
|
||||
using mindspore::lite::RET_OK;
|
||||
using mindspore::schema::PrimitiveType_SplitWithOverlap;
|
||||
#define MIN_NUM_SPLIT 2
|
||||
|
||||
namespace mindspore::kernel {
|
||||
|
||||
|
@ -62,7 +63,7 @@ int SplitWithOverlapBaseCPUKernel::CalculateSplitedShapes(const std::vector<int>
|
|||
int SplitWithOverlapBaseCPUKernel::Init() {
|
||||
CHECK_LESS_RETURN(in_tensors_.size(), 1);
|
||||
CHECK_LESS_RETURN(out_tensors_.size(), 1);
|
||||
CHECK_LESS_RETURN(param_->num_split_, 2);
|
||||
CHECK_LESS_RETURN(param_->num_split_, MIN_NUM_SPLIT);
|
||||
return ReSize();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue