Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
72afff36
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看板
未验证
提交
72afff36
编写于
9月 17, 2020
作者:
H
hong19860320
提交者:
GitHub
9月 17, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[NPU] Fix build error caused by flatbuffer if the target is tiny_publish (#4340)
上级
571f6651
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
16 addition
and
16 deletion
+16
-16
lite/kernels/apu/bridges/conv_op.cc
lite/kernels/apu/bridges/conv_op.cc
+2
-2
lite/kernels/apu/bridges/pool_op.cc
lite/kernels/apu/bridges/pool_op.cc
+1
-1
lite/kernels/npu/bridges/conv_op.cc
lite/kernels/npu/bridges/conv_op.cc
+2
-2
lite/kernels/npu/bridges/conv_transpose_op.cc
lite/kernels/npu/bridges/conv_transpose_op.cc
+2
-2
lite/kernels/npu/bridges/pad2d_op.cc
lite/kernels/npu/bridges/pad2d_op.cc
+1
-1
lite/kernels/npu/bridges/pool_op.cc
lite/kernels/npu/bridges/pool_op.cc
+1
-1
lite/kernels/npu/bridges/reduce_mean_op.cc
lite/kernels/npu/bridges/reduce_mean_op.cc
+1
-1
lite/kernels/rknpu/bridges/conv_op.cc
lite/kernels/rknpu/bridges/conv_op.cc
+2
-2
lite/kernels/rknpu/bridges/pool_op.cc
lite/kernels/rknpu/bridges/pool_op.cc
+1
-1
lite/kernels/xpu/bridges/conv_op.cc
lite/kernels/xpu/bridges/conv_op.cc
+2
-2
lite/kernels/xpu/bridges/pool_op.cc
lite/kernels/xpu/bridges/pool_op.cc
+1
-1
未找到文件。
lite/kernels/apu/bridges/conv_op.cc
浏览文件 @
72afff36
...
...
@@ -60,9 +60,9 @@ int ConvConverter(void* ctx, OpLite* op, KernelBase* kernel) {
CHECK_EQ
(
output_dims
[
0
],
bs
);
CHECK_EQ
(
output_dims
[
1
],
oc
);
auto
strides
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"strides"
);
auto
paddings
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"paddings"
);
std
::
vector
<
int
>
paddings
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"paddings"
);
auto
groups
=
op_info
->
GetAttr
<
int
>
(
"groups"
);
auto
dilations
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"dilations"
);
std
::
vector
<
int
>
dilations
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"dilations"
);
bool
with_act
=
op_info
->
HasAttr
(
"with_act"
)
&&
op_info
->
GetAttr
<
bool
>
(
"with_act"
);
std
::
string
act_type
=
...
...
lite/kernels/apu/bridges/pool_op.cc
浏览文件 @
72afff36
...
...
@@ -45,7 +45,7 @@ int PoolConverter(void* ctx, OpLite* op, KernelBase* kernel) {
auto
pooling_type
=
op_info
->
GetAttr
<
std
::
string
>
(
"pooling_type"
);
auto
global_pooling
=
op_info
->
GetAttr
<
bool
>
(
"global_pooling"
);
auto
ksize
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"ksize"
);
auto
paddings
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"paddings"
);
std
::
vector
<
int
>
paddings
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"paddings"
);
// pool mode
if
((
pooling_type
==
"max"
)
||
(
pooling_type
==
"avg"
))
{
...
...
lite/kernels/npu/bridges/conv_op.cc
浏览文件 @
72afff36
...
...
@@ -53,9 +53,9 @@ int ConvConverter(void* ctx, OpLite* op, KernelBase* kernel) {
CHECK_EQ
(
output_dims
[
0
],
bs
);
CHECK_EQ
(
output_dims
[
1
],
oc
);
auto
strides
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"strides"
);
auto
paddings
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"paddings"
);
std
::
vector
<
int
>
paddings
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"paddings"
);
auto
groups
=
op_info
->
GetAttr
<
int
>
(
"groups"
);
auto
dilations
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"dilations"
);
std
::
vector
<
int
>
dilations
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"dilations"
);
bool
with_act
=
op_info
->
HasAttr
(
"with_act"
)
&&
op_info
->
GetAttr
<
bool
>
(
"with_act"
);
std
::
string
act_type
=
...
...
lite/kernels/npu/bridges/conv_transpose_op.cc
浏览文件 @
72afff36
...
...
@@ -59,8 +59,8 @@ int ConvTransposeConverter(void* ctx, OpLite* op, KernelBase* kernel) {
output_size
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"output_size"
);
}
auto
paddings
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"paddings"
);
auto
dilations
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"dilations"
);
std
::
vector
<
int
>
paddings
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"paddings"
);
std
::
vector
<
int
>
dilations
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"dilations"
);
CHECK_EQ
(
dilations
.
size
(),
2L
);
std
::
string
padding_algorithm
=
op_info
->
HasAttr
(
"padding_algorithm"
)
...
...
lite/kernels/npu/bridges/pad2d_op.cc
浏览文件 @
72afff36
...
...
@@ -35,7 +35,7 @@ int Pad2dConverter(void* ctx, OpLite* op, KernelBase* kernel) {
auto
x
=
scope
->
FindMutableTensor
(
x_name
);
auto
x_dims
=
x
->
dims
();
auto
out_name
=
op_info
->
Output
(
"Out"
).
front
();
auto
padding
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"paddings"
);
std
::
vector
<
int
>
padding
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"paddings"
);
CHECK_EQ
(
padding
.
size
(),
4
);
// X node
...
...
lite/kernels/npu/bridges/pool_op.cc
浏览文件 @
72afff36
...
...
@@ -39,7 +39,7 @@ int PoolConverter(void* ctx, OpLite* op, KernelBase* kernel) {
auto
pooling_type
=
op_info
->
GetAttr
<
std
::
string
>
(
"pooling_type"
);
auto
global_pooling
=
op_info
->
GetAttr
<
bool
>
(
"global_pooling"
);
auto
ksize
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"ksize"
);
auto
paddings
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"paddings"
);
std
::
vector
<
int
>
paddings
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"paddings"
);
// X node
std
::
shared_ptr
<
Node
>
x_node
=
nullptr
;
...
...
lite/kernels/npu/bridges/reduce_mean_op.cc
浏览文件 @
72afff36
...
...
@@ -36,7 +36,7 @@ int ReduceMeanConverter(void* ctx, OpLite* op, KernelBase* kernel) {
auto
x_dims
=
x
->
dims
();
auto
out_name
=
op_info
->
Input
(
"Out"
).
front
();
auto
keep_dim
=
op_info
->
GetAttr
<
bool
>
(
"keep_dim"
);
auto
dim
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"dim"
);
std
::
vector
<
int
>
dim
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"dim"
);
CHECK
(
!
dim
.
empty
())
<<
"[NPU]
\"
dim
\"
of reduce_mean should not be empty."
;
for
(
size_t
i
=
0
;
i
<
dim
.
size
();
i
++
)
{
if
(
dim
[
i
]
<
0
)
{
...
...
lite/kernels/rknpu/bridges/conv_op.cc
浏览文件 @
72afff36
...
...
@@ -51,9 +51,9 @@ int ConvConverter(void* ctx, OpLite* op, KernelBase* kernel) {
CHECK_EQ
(
output_dims
[
0
],
bs
);
CHECK_EQ
(
output_dims
[
1
],
oc
);
auto
strides
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"strides"
);
auto
paddings
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"paddings"
);
std
::
vector
<
int
>
paddings
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"paddings"
);
auto
groups
=
op_info
->
GetAttr
<
int
>
(
"groups"
);
auto
dilations
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"dilations"
);
std
::
vector
<
int
>
dilations
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"dilations"
);
auto
fuse_relu
=
op_info
->
GetAttr
<
bool
>
(
"fuse_relu"
);
CHECK_EQ
(
strides
.
size
(),
2L
);
CHECK_EQ
(
dilations
.
size
(),
2L
);
...
...
lite/kernels/rknpu/bridges/pool_op.cc
浏览文件 @
72afff36
...
...
@@ -42,7 +42,7 @@ int PoolConverter(void* ctx, OpLite* op, KernelBase* kernel) {
auto
pooling_type
=
op_info
->
GetAttr
<
std
::
string
>
(
"pooling_type"
);
auto
global_pooling
=
op_info
->
GetAttr
<
bool
>
(
"global_pooling"
);
auto
ksize
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"ksize"
);
auto
paddings
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"paddings"
);
std
::
vector
<
int
>
paddings
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"paddings"
);
// for quantization
bool
enable_int8
=
false
;
...
...
lite/kernels/xpu/bridges/conv_op.cc
浏览文件 @
72afff36
...
...
@@ -44,9 +44,9 @@ int ConvConverter(void* ctx, OpLite* op, KernelBase* kernel) {
CHECK_EQ
(
input_dims
.
size
(),
4
);
CHECK_EQ
(
filter_dims
.
size
(),
4
);
auto
strides
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"strides"
);
auto
paddings
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"paddings"
);
std
::
vector
<
int
>
paddings
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"paddings"
);
auto
groups
=
op_info
->
GetAttr
<
int
>
(
"groups"
);
auto
dilations
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"dilations"
);
std
::
vector
<
int
>
dilations
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"dilations"
);
auto
fuse_relu
=
op_info
->
GetAttr
<
bool
>
(
"fuse_relu"
);
CHECK_EQ
(
strides
.
size
(),
2L
);
CHECK_EQ
(
dilations
.
size
(),
2L
);
...
...
lite/kernels/xpu/bridges/pool_op.cc
浏览文件 @
72afff36
...
...
@@ -37,7 +37,7 @@ int PoolConverter(void* ctx, OpLite* op, KernelBase* kernel) {
auto
out_name
=
op_info
->
Output
(
"Out"
).
front
();
auto
pooling_type
=
op_info
->
GetAttr
<
std
::
string
>
(
"pooling_type"
);
auto
ceil_mode
=
op_info
->
GetAttr
<
bool
>
(
"ceil_mode"
);
auto
paddings
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"paddings"
);
std
::
vector
<
int
>
paddings
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"paddings"
);
auto
global_pooling
=
op_info
->
GetAttr
<
bool
>
(
"global_pooling"
);
auto
ksize
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"ksize"
);
auto
strides
=
op_info
->
GetAttr
<
std
::
vector
<
int
>>
(
"strides"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录