Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
0404fd81
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
331
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
271
列表
看板
标记
里程碑
合并请求
78
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle-Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
271
Issue
271
列表
看板
标记
里程碑
合并请求
78
合并请求
78
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
0404fd81
编写于
11月 21, 2019
作者:
myq406450149
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix format
上级
37b2d22c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
13 deletion
+15
-13
lite/kernels/arm/CMakeLists.txt
lite/kernels/arm/CMakeLists.txt
+2
-2
lite/operators/op_params.h
lite/operators/op_params.h
+1
-2
lite/operators/split_op.cc
lite/operators/split_op.cc
+12
-9
未找到文件。
lite/kernels/arm/CMakeLists.txt
浏览文件 @
0404fd81
...
@@ -46,7 +46,7 @@ add_kernel(reduce_max_compute_arm ARM basic SRCS reduce_max_compute.cc DEPS ${li
...
@@ -46,7 +46,7 @@ add_kernel(reduce_max_compute_arm ARM basic SRCS reduce_max_compute.cc DEPS ${li
add_kernel
(
sequence_expand_compute_arm ARM basic SRCS sequence_expand_compute.cc DEPS
${
lite_kernel_deps
}
math_arm
)
add_kernel
(
sequence_expand_compute_arm ARM basic SRCS sequence_expand_compute.cc DEPS
${
lite_kernel_deps
}
math_arm
)
add_kernel
(
im2sequence_compute_arm ARM basic SRCS im2sequence_compute.cc DEPS
${
lite_kernel_deps
}
math_arm
)
add_kernel
(
im2sequence_compute_arm ARM basic SRCS im2sequence_compute.cc DEPS
${
lite_kernel_deps
}
math_arm
)
add_kernel
(
sequence_pool_compute_arm ARM basic SRCS sequence_pool_compute.cc DEPS
${
lite_kernel_deps
}
math_arm
)
add_kernel
(
sequence_pool_compute_arm ARM basic SRCS sequence_pool_compute.cc DEPS
${
lite_kernel_deps
}
math_arm
)
add_kernel
(
layer_norm_compute_arm ARM extra SRCS layer_norm_compute.cc DEPS
${
lite_kernel_deps
}
math_arm
)
#
add_kernel(layer_norm_compute_arm ARM extra SRCS layer_norm_compute.cc DEPS ${lite_kernel_deps} math_arm)
add_kernel
(
gather_compute_arm ARM extra SRCS gather_compute.cc DEPS
${
lite_kernel_deps
}
math_arm
)
add_kernel
(
gather_compute_arm ARM extra SRCS gather_compute.cc DEPS
${
lite_kernel_deps
}
math_arm
)
add_kernel
(
reduce_mean_compute_arm ARM extra SRCS reduce_mean_compute.cc DEPS
${
lite_kernel_deps
}
math_arm
)
add_kernel
(
reduce_mean_compute_arm ARM extra SRCS reduce_mean_compute.cc DEPS
${
lite_kernel_deps
}
math_arm
)
add_kernel
(
stack_compute_arm ARM extra SRCS stack_compute.cc DEPS
${
lite_kernel_deps
}
math_arm
)
add_kernel
(
stack_compute_arm ARM extra SRCS stack_compute.cc DEPS
${
lite_kernel_deps
}
math_arm
)
...
@@ -100,5 +100,5 @@ lite_cc_test(test_dropout_compute_arm SRCS dropout_compute_test.cc DEPS dropout_
...
@@ -100,5 +100,5 @@ lite_cc_test(test_dropout_compute_arm SRCS dropout_compute_test.cc DEPS dropout_
lite_cc_test
(
test_transpose_compute_arm SRCS transpose_compute_test.cc DEPS transpose_compute_arm COMPILE_LEVEL extra
)
lite_cc_test
(
test_transpose_compute_arm SRCS transpose_compute_test.cc DEPS transpose_compute_arm COMPILE_LEVEL extra
)
lite_cc_test
(
test_argmax_compute_arm SRCS argmax_compute_test.cc DEPS argmax_compute_arm
)
lite_cc_test
(
test_argmax_compute_arm SRCS argmax_compute_test.cc DEPS argmax_compute_arm
)
lite_cc_test
(
test_axpy_compute_arm SRCS axpy_compute_test.cc DEPS axpy_compute_arm
)
lite_cc_test
(
test_axpy_compute_arm SRCS axpy_compute_test.cc DEPS axpy_compute_arm
)
lite_cc_test
(
test_layer_norm_compute_arm SRCS layer_norm_compute_test.cc DEPS layer_norm_compute_arm
)
#
lite_cc_test(test_layer_norm_compute_arm SRCS layer_norm_compute_test.cc DEPS layer_norm_compute_arm)
lite_cc_test
(
test_conv_transpose_compute_arm SRCS conv_transpose_compute_test.cc DEPS conv_transpose_compute_arm
)
lite_cc_test
(
test_conv_transpose_compute_arm SRCS conv_transpose_compute_test.cc DEPS conv_transpose_compute_arm
)
lite/operators/op_params.h
浏览文件 @
0404fd81
...
@@ -317,7 +317,7 @@ struct SplitParam {
...
@@ -317,7 +317,7 @@ struct SplitParam {
lite
::
Tensor
*
x
{};
lite
::
Tensor
*
x
{};
std
::
vector
<
lite
::
Tensor
*>
output
{};
std
::
vector
<
lite
::
Tensor
*>
output
{};
lite
::
Tensor
*
axis_tensor
;
lite
::
Tensor
*
axis_tensor
;
std
::
vector
<
lite
::
Tensor
>*
sections_tensor_list
{};
std
::
vector
<
lite
::
Tensor
*>
sections_tensor_list
{};
int
axis
{
-
1
};
int
axis
{
-
1
};
int
num
{
0
};
int
num
{
0
};
...
@@ -380,7 +380,6 @@ struct MeanGradParam {
...
@@ -380,7 +380,6 @@ struct MeanGradParam {
struct
FillConstantParam
{
struct
FillConstantParam
{
int
dtype
{
static_cast
<
int
>
(
VarDescAPI
::
VarDataType
::
FP32
)};
int
dtype
{
static_cast
<
int
>
(
VarDescAPI
::
VarDataType
::
FP32
)};
std
::
vector
<
int64_t
>
shape
{};
std
::
vector
<
int64_t
>
shape
{};
float
value
{
0.0
f
};
float
value
{
0.0
f
};
// useless for x86, keep it for compatibility
// useless for x86, keep it for compatibility
bool
force_cpu
{
false
};
bool
force_cpu
{
false
};
...
...
lite/operators/split_op.cc
浏览文件 @
0404fd81
...
@@ -39,15 +39,13 @@ bool SplitOp::InferShape() const {
...
@@ -39,15 +39,13 @@ bool SplitOp::InferShape() const {
const
int
outs_number
=
outs
.
size
();
const
int
outs_number
=
outs
.
size
();
std
::
vector
<
lite
::
DDim
>
outs_dims
;
std
::
vector
<
lite
::
DDim
>
outs_dims
;
outs_dims
.
reserve
(
outs_number
);
outs_dims
.
reserve
(
outs_number
);
std
::
vector
<
lite
::
Tensor
>
*
sections_tensor_list_
=
std
::
vector
<
lite
::
Tensor
*>
sections_tensor_list_
=
param_
.
sections_tensor_list
;
param_
.
sections_tensor_list
;
if
(
sections
.
size
()
>
0
&&
sections_tensor_list_
->
size
()
>
0
)
{
if
(
sections
.
size
()
>
0
&&
sections_tensor_list_
.
size
()
>
0
)
{
std
::
vector
<
int
>
vec_sections
;
std
::
vector
<
int
>
vec_sections
;
for
(
size_t
i
=
0
;
i
<
sections_tensor_list_
->
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
sections_tensor_list_
.
size
();
++
i
)
{
auto
dim
=
in_dims
;
auto
dim
=
in_dims
;
// lite::TensorLite aa = sections_tensor_list_[i];
dim
[
axis
]
=
sections_tensor_list_
[
i
]
->
data
<
int
>
()[
0
];
dim
[
axis
]
=
(
*
sections_tensor_list_
)[
i
].
data
<
int
>
()[
0
];
// final_axes.push_back(axes_tensor_vct[i].data<int>()[0]);
outs_dims
.
push_back
(
dim
);
outs_dims
.
push_back
(
dim
);
}
}
}
else
if
(
num
>
0
)
{
}
else
if
(
num
>
0
)
{
...
@@ -87,15 +85,20 @@ bool SplitOp::AttachImpl(const cpp::OpDesc &opdesc, lite::Scope *scope) {
...
@@ -87,15 +85,20 @@ bool SplitOp::AttachImpl(const cpp::OpDesc &opdesc, lite::Scope *scope) {
for
(
auto
var
:
outs
)
{
for
(
auto
var
:
outs
)
{
param_
.
output
.
push_back
(
scope
->
FindVar
(
var
)
->
GetMutable
<
lite
::
Tensor
>
());
param_
.
output
.
push_back
(
scope
->
FindVar
(
var
)
->
GetMutable
<
lite
::
Tensor
>
());
}
}
if
(
opdesc
.
HasAttr
(
"AxisTensor"
))
{
std
::
vector
<
std
::
string
>
input_arg_names
=
opdesc
.
InputArgumentNames
();
if
(
std
::
find
(
input_arg_names
.
begin
(),
input_arg_names
.
end
(),
"AxisTensor"
)
!=
input_arg_names
.
end
())
{
auto
args
=
opdesc
.
Input
(
"AxisTensor"
);
auto
args
=
opdesc
.
Input
(
"AxisTensor"
);
auto
*
var
=
scope
->
FindVar
(
args
.
front
());
auto
*
var
=
scope
->
FindVar
(
args
.
front
());
param_
.
axis_tensor
=
var
->
GetMutable
<
lite
::
Tensor
>
();
param_
.
axis_tensor
=
var
->
GetMutable
<
lite
::
Tensor
>
();
}
}
if
(
opdesc
.
HasAttr
(
"SectionsTensorList"
))
{
if
(
std
::
find
(
input_arg_names
.
begin
(),
input_arg_names
.
end
(),
"SectionsTensorList"
)
!=
input_arg_names
.
end
())
{
auto
args
=
opdesc
.
Input
(
"SectionsTensorList"
);
auto
args
=
opdesc
.
Input
(
"SectionsTensorList"
);
auto
*
var
=
scope
->
FindVar
(
args
.
front
());
auto
*
var
=
scope
->
FindVar
(
args
.
front
());
param_
.
sections_tensor_list
=
var
->
GetMutable
<
std
::
vector
<
lite
::
Tensor
>>
();
param_
.
sections_tensor_list
=
*
(
var
->
GetMutable
<
std
::
vector
<
lite
::
Tensor
*>>
());
}
}
return
true
;
return
true
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录