Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
7e2ecbd6
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
7e2ecbd6
编写于
6月 21, 2019
作者:
N
nhzlx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add some int8 option
上级
9d127391
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
6 addition
and
3 deletion
+6
-3
paddle/fluid/lite/api/cxx_api.h
paddle/fluid/lite/api/cxx_api.h
+1
-0
paddle/fluid/lite/core/mir/fusion/quant_dequant_op_fuser.h
paddle/fluid/lite/core/mir/fusion/quant_dequant_op_fuser.h
+1
-1
paddle/fluid/lite/core/mir/pattern_matcher_high_api.cc
paddle/fluid/lite/core/mir/pattern_matcher_high_api.cc
+1
-1
paddle/fluid/lite/core/op_registry.cc
paddle/fluid/lite/core/op_registry.cc
+1
-0
paddle/fluid/lite/core/op_registry.h
paddle/fluid/lite/core/op_registry.h
+2
-0
paddle/fluid/lite/core/optimizer.h
paddle/fluid/lite/core/optimizer.h
+0
-1
未找到文件。
paddle/fluid/lite/api/cxx_api.h
浏览文件 @
7e2ecbd6
...
@@ -50,6 +50,7 @@ class ExecutorLite {
...
@@ -50,6 +50,7 @@ class ExecutorLite {
optimizer_
.
KernelPickPreferPlace
(
prefer_place
);
optimizer_
.
KernelPickPreferPlace
(
prefer_place
);
core
::
KernelPickFactor
factor
;
core
::
KernelPickFactor
factor
;
factor
.
ConsiderTarget
();
factor
.
ConsiderTarget
();
factor
.
ConsiderPrecision
();
optimizer_
.
Run
(
std
::
move
(
program
),
valid_places
,
factor
);
optimizer_
.
Run
(
std
::
move
(
program
),
valid_places
,
factor
);
program_
=
optimizer_
.
GenRuntimeProgram
();
program_
=
optimizer_
.
GenRuntimeProgram
();
}
}
...
...
paddle/fluid/lite/core/mir/fusion/quant_dequant_op_fuser.h
浏览文件 @
7e2ecbd6
...
@@ -25,7 +25,7 @@ namespace fusion {
...
@@ -25,7 +25,7 @@ namespace fusion {
/* The model trained by fluid quantization is a simulation of real int8.
/* The model trained by fluid quantization is a simulation of real int8.
* The quantized Ops(conv2d, mul, depthwise conv2d etc) have fake_quantop
* The quantized Ops(conv2d, mul, depthwise conv2d etc) have fake_quantop
* in front
and fake_dequantop behind.
* in front and fake_dequantop behind.
*
*
* When in int8 mode, the pattern like "fake_quant + quantized_op +
* When in int8 mode, the pattern like "fake_quant + quantized_op +
* fake_dequant"
* fake_dequant"
...
...
paddle/fluid/lite/core/mir/pattern_matcher_high_api.cc
浏览文件 @
7e2ecbd6
...
@@ -41,7 +41,7 @@ void FuseBase::DeleteInterNodes(SSAGraph *graph) {
...
@@ -41,7 +41,7 @@ void FuseBase::DeleteInterNodes(SSAGraph *graph) {
}
}
}
}
LOG
(
INFO
)
<<
"keys: "
<<
key2nodes_
.
size
();
VLOG
(
4
)
<<
"keys: "
<<
key2nodes_
.
size
();
std
::
unordered_set
<
const
Node
*>
nodes2rm
;
std
::
unordered_set
<
const
Node
*>
nodes2rm
;
for
(
auto
&
matched
:
key2nodes_
)
{
for
(
auto
&
matched
:
key2nodes_
)
{
for
(
const
auto
&
key
:
keys
)
{
for
(
const
auto
&
key
:
keys
)
{
...
...
paddle/fluid/lite/core/op_registry.cc
浏览文件 @
7e2ecbd6
...
@@ -96,6 +96,7 @@ KernelRegistry::KernelRegistry()
...
@@ -96,6 +96,7 @@ KernelRegistry::KernelRegistry()
INIT_FOR
(
kX86
,
kAny
,
kAny
);
INIT_FOR
(
kX86
,
kAny
,
kAny
);
INIT_FOR
(
kARM
,
kFloat
,
kNCHW
);
INIT_FOR
(
kARM
,
kFloat
,
kNCHW
);
INIT_FOR
(
kARM
,
kInt8
,
kNCHW
);
INIT_FOR
(
kARM
,
kAny
,
kNCHW
);
INIT_FOR
(
kARM
,
kAny
,
kNCHW
);
INIT_FOR
(
kARM
,
kAny
,
kAny
);
INIT_FOR
(
kARM
,
kAny
,
kAny
);
#undef INIT_FOR
#undef INIT_FOR
...
...
paddle/fluid/lite/core/op_registry.h
浏览文件 @
7e2ecbd6
...
@@ -80,6 +80,8 @@ class KernelRegistry final {
...
@@ -80,6 +80,8 @@ class KernelRegistry final {
KernelRegistryForTarget
<
TARGET
(
kARM
),
PRECISION
(
kAny
),
KernelRegistryForTarget
<
TARGET
(
kARM
),
PRECISION
(
kAny
),
DATALAYOUT
(
kAny
)
>
*
,
//
DATALAYOUT
(
kAny
)
>
*
,
//
KernelRegistryForTarget
<
TARGET
(
kARM
),
PRECISION
(
kFloat
),
KernelRegistryForTarget
<
TARGET
(
kARM
),
PRECISION
(
kFloat
),
DATALAYOUT
(
kNCHW
)
>
*
,
//
KernelRegistryForTarget
<
TARGET
(
kARM
),
PRECISION
(
kInt8
),
DATALAYOUT
(
kNCHW
)
>
*
//
DATALAYOUT
(
kNCHW
)
>
*
//
>
;
>
;
...
...
paddle/fluid/lite/core/optimizer.h
浏览文件 @
7e2ecbd6
...
@@ -58,7 +58,6 @@ class Optimizer {
...
@@ -58,7 +58,6 @@ class Optimizer {
#ifdef LITE_WITH_LIGHT_WEIGHT_FRAMEWORK
#ifdef LITE_WITH_LIGHT_WEIGHT_FRAMEWORK
"lite_elementwise_add_activation_fuse_pass"
,
//
"lite_elementwise_add_activation_fuse_pass"
,
//
#endif
#endif
"lite_fc_fuse_pass"
,
//
"static_kernel_pick_pass"
,
//
"static_kernel_pick_pass"
,
//
"variable_place_inference_pass"
,
//
"variable_place_inference_pass"
,
//
"argument_type_display_pass"
,
//
"argument_type_display_pass"
,
//
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录