forked from mindspore-Ecosystem/mindspore
Fix a tiny mistake of split ops
This commit is contained in:
parent
c9de948543
commit
24b57c222e
26
build.bat
26
build.bat
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue