forked from mindspore-Ecosystem/mindspore
Fix some tiny bugs for converter in windows enviroment
This commit is contained in:
parent
4ec343961e
commit
a2aa56abe5
42
build.bat
42
build.bat
|
@ -30,7 +30,6 @@ IF NOT EXIST "%BUILD_PATH%/mindspore" (
|
||||||
cd %CD%/mindspore
|
cd %CD%/mindspore
|
||||||
|
|
||||||
IF "%1%" == "lite" (
|
IF "%1%" == "lite" (
|
||||||
call :gene_gtest
|
|
||||||
call :run_cmake
|
call :run_cmake
|
||||||
IF errorlevel 1 (
|
IF errorlevel 1 (
|
||||||
echo "cmake fail one time."
|
echo "cmake fail one time."
|
||||||
|
@ -89,39 +88,34 @@ goto run_eof
|
||||||
-G "CodeBlocks - MinGW Makefiles" "%BASEPATH%/mindspore/lite"
|
-G "CodeBlocks - MinGW Makefiles" "%BASEPATH%/mindspore/lite"
|
||||||
GOTO:EOF
|
GOTO:EOF
|
||||||
|
|
||||||
:gene_gtest
|
|
||||||
cd %BASEPATH%/third_party
|
|
||||||
IF EXIST googletest rd /s /q googletest
|
|
||||||
git submodule update --init --recursive googletest
|
|
||||||
cd %BUILD_PATH%/mindspore
|
|
||||||
GOTO:EOF
|
|
||||||
|
|
||||||
:gene_protobuf
|
:gene_protobuf
|
||||||
SET PROTOC="%BASEPATH%/build/mindspore/_deps/protobuf-src/_build/protoc"
|
IF NOT DEFINED MSLIBS_CACHE_PATH (
|
||||||
|
cd %BASEPATH%/build/mindspore/_deps/protobuf-src/_build
|
||||||
|
) ELSE (
|
||||||
|
cd %MSLIBS_CACHE_PATH%/protobuf_*/bin
|
||||||
|
)
|
||||||
|
|
||||||
SET PROTO_SRC_DIR="%BASEPATH%/mindspore/lite/tools/converter/parser/caffe"
|
SET PROTO_SRC_DIR=%BASEPATH%/mindspore/lite/tools/converter/parser/caffe
|
||||||
cd %PROTO_SRC_DIR%
|
protoc "%PROTO_SRC_DIR%/*.proto" --proto_path="%PROTO_SRC_DIR%" --cpp_out="%PROTO_SRC_DIR%"
|
||||||
%PROTOC% *.proto --proto_path=%PROTO_SRC_DIR% --cpp_out=%PROTO_SRC_DIR%
|
|
||||||
|
|
||||||
SET PROTO_SRC_DIR="%BASEPATH%/mindspore/lite/tools/converter/parser/onnx"
|
SET PROTO_SRC_DIR=%BASEPATH%/mindspore/lite/tools/converter/parser/onnx
|
||||||
cd %PROTO_SRC_DIR%
|
protoc "%PROTO_SRC_DIR%/*.proto" --proto_path="%PROTO_SRC_DIR%" --cpp_out="%PROTO_SRC_DIR%"
|
||||||
%PROTOC% *.proto --proto_path=%PROTO_SRC_DIR% --cpp_out=%PROTO_SRC_DIR%
|
|
||||||
cd %BUILD_PATH%/mindspore
|
cd %BUILD_PATH%/mindspore
|
||||||
GOTO:EOF
|
GOTO:EOF
|
||||||
|
|
||||||
:gene_flatbuffer
|
:gene_flatbuffer
|
||||||
SET FLATC="%BASEPATH%/build/mindspore/_deps/flatbuffers-src/_build/flatc"
|
IF NOT DEFINED MSLIBS_CACHE_PATH (
|
||||||
SET FLAT_DIR=%BASEPATH%/mindspore/lite/schema
|
cd %BASEPATH%/build/mindspore/_deps/flatbuffers-src/_build
|
||||||
cd %FLAT_DIR%
|
) ELSE (
|
||||||
IF EXIST inner rd /s /q inner
|
cd %MSLIBS_CACHE_PATH%/flatbuffers_*/bin
|
||||||
md inner
|
)
|
||||||
|
|
||||||
%FLATC% -c -b *.fbs
|
SET FLAT_DIR=%BASEPATH%/mindspore/lite/schema
|
||||||
%FLATC% -c -b --reflect-types --gen-mutable --reflect-names --gen-object-api -o "%FLAT_DIR%/inner" *.fbs
|
flatc -c -b -o "%FLAT_DIR%" "%FLAT_DIR%/*.fbs"
|
||||||
|
flatc -c -b --reflect-types --gen-mutable --reflect-names --gen-object-api -o "%FLAT_DIR%/inner" "%FLAT_DIR%/*.fbs"
|
||||||
|
|
||||||
SET FLAT_DIR=%BASEPATH%/mindspore/lite/tools/converter/parser/tflite
|
SET FLAT_DIR=%BASEPATH%/mindspore/lite/tools/converter/parser/tflite
|
||||||
cd %FLAT_DIR%
|
flatc -c -b --reflect-types --gen-mutable --reflect-names --gen-object-api -o "%FLAT_DIR%" "%FLAT_DIR%/*.fbs"
|
||||||
%FLATC% -c -b --reflect-types --gen-mutable --reflect-names --gen-object-api -o "%FLAT_DIR%" *.fbs
|
|
||||||
cd %BUILD_PATH%/mindspore
|
cd %BUILD_PATH%/mindspore
|
||||||
GOTO:EOF
|
GOTO:EOF
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue