提交 1e4fc4cf 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!5485 Fix a tiny mistake of split ops

Merge pull request !5485 from liuwenhao/lite
......@@ -20,14 +20,14 @@ IF NOT EXIST "%BASEPATH%/build" (
md "build"
)
cd "%BASEPATH%/build"
cd %BASEPATH%/build
set BUILD_PATH=%CD%
IF NOT EXIST "%BUILD_PATH%/mindspore" (
md "mindspore"
)
cd "%CD%/mindspore"
cd %CD%/mindspore
IF "%1%" == "lite" (
call :gene_gtest
......@@ -56,7 +56,7 @@ IF "%1%" == "lite" (
echo "build fail."
goto run_fail
) ELSE (
cd "%BASEPATH%/output"
cd %BASEPATH%/output
rd /s /q _CPack_Packages
)
) ELSE (
......@@ -78,22 +78,22 @@ IF "%1%" == "lite" (
)
)
cd "%BASEPATH%"
cd %BASEPATH%
goto run_eof
:run_cmake
cd "%BUILD_PATH%/mindspore"
cd %BUILD_PATH%/mindspore
cmake -DBUILD_DEVICE=on -DBUILD_CONVERTER=on -DPLATFORM_ARM64=off -DSUPPORT_TRAIN=off ^
-DCMAKE_BUILD_TYPE=Release -DSUPPORT_GPU=off -DBUILD_MINDDATA=off -DOFFLINE_COMPILE=off ^
-G "CodeBlocks - MinGW Makefiles" "%BASEPATH%/mindspore/lite"
GOTO:EOF
:gene_gtest
cd "%BASEPATH%/third_party"
cd %BASEPATH%/third_party
IF EXIST googletest rd /s /q googletest
git submodule update --init --recursive googletest
cd "%BUILD_PATH%/mindspore"
cd %BUILD_PATH%/mindspore
GOTO:EOF
:gene_protobuf
......@@ -111,22 +111,22 @@ GOTO:EOF
:gene_flatbuffer
SET FLATC="%BASEPATH%/build/mindspore/_deps/flatbuffers-src/_build/flatc"
SET FLAT_DIR="%BASEPATH%/mindspore/lite/schema"
SET FLAT_DIR=%BASEPATH%/mindspore/lite/schema
cd %FLAT_DIR%
IF EXIST inner rd /s /q inner
md inner
%FLATC% -c -b *.fbs
%FLATC% -c -b --reflect-types --gen-mutable --reflect-names --gen-object-api -o %FLAT_DIR%/inner *.fbs
%FLATC% -c -b --reflect-types --gen-mutable --reflect-names --gen-object-api -o "%FLAT_DIR%/inner" *.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% *.fbs
cd "%BUILD_PATH%/mindspore"
%FLATC% -c -b --reflect-types --gen-mutable --reflect-names --gen-object-api -o "%FLAT_DIR%" *.fbs
cd %BUILD_PATH%/mindspore
GOTO:EOF
:run_fail
cd "%BASEPATH%"
cd %BASEPATH%
set errorlevel=1
:run_eof
......@@ -28,7 +28,11 @@ using mindspore::lite::RET_OK;
using mindspore::schema::PrimitiveType_Split;
namespace mindspore::kernel {
int SplitBaseCPUKernel::Init() { return RET_OK; }
int SplitBaseCPUKernel::Init() {
auto split_dim = param->split_dim_;
param->split_dim_ = split_dim >= 0 ? split_dim : in_tensors_.front()->shape().size() + split_dim;
return RET_OK;
}
int SplitBaseCPUKernel::ReSize() {
auto in_tensor = in_tensors_.front();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册