Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
9b380f99
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
9b380f99
编写于
10月 11, 2018
作者:
X
xiaolil1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify quantize op
上级
727cdea5
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
6 deletion
+6
-6
paddle/fluid/operators/dequantize_op.cc
paddle/fluid/operators/dequantize_op.cc
+2
-2
paddle/fluid/operators/quantize_op.cc
paddle/fluid/operators/quantize_op.cc
+2
-2
paddle/fluid/operators/requantize_op.cc
paddle/fluid/operators/requantize_op.cc
+2
-2
未找到文件。
paddle/fluid/operators/dequantize_op.cc
浏览文件 @
9b380f99
...
...
@@ -62,13 +62,13 @@ class DeQuantOpKernel : public framework::OpKernel<T> {
auto
src_md
=
platform
::
MKLDNNMemDesc
(
{
src_tz
},
src_dt
,
src_fmt
);
auto
src_pd
=
mkldnn
::
memory
::
primitive_desc
{
src_md
,
engine
}
;
auto
src_pd
=
mkldnn
::
memory
::
primitive_desc
(
src_md
,
engine
)
;
auto
src_memory
=
std
::
make_shared
<
mkldnn
::
memory
>
(
src_pd
,
to_void_cast
<
T
>
(
input_data
));
std
::
shared_ptr
<
primitive
::
at
>
src_memory_p
=
std
::
shared_ptr
<
primitive
::
at
>
(
new
primitive
::
at
(
*
src_memory
));
auto
dst_md
=
platform
::
MKLDNNMemDesc
(
{
dst_tz
},
memory
::
data_type
::
f32
,
memory
::
format
::
nchw
);
auto
dst_pd
=
mkldnn
::
memory
::
primitive_desc
{
dst_md
,
engine
}
;
auto
dst_pd
=
mkldnn
::
memory
::
primitive_desc
(
dst_md
,
engine
)
;
auto
dst_memory
=
mkldnn
::
memory
(
dst_pd
,
to_void_cast
<
T
>
(
output_data
));
auto
reorder_pd
=
std
::
shared_ptr
<
reorder
::
primitive_desc
>
(
...
...
paddle/fluid/operators/quantize_op.cc
浏览文件 @
9b380f99
...
...
@@ -56,13 +56,13 @@ class QuantOpKernel : public framework::OpKernel<T> {
auto
src_md
=
platform
::
MKLDNNMemDesc
(
{
src_tz
},
memory
::
data_type
::
f32
,
input
->
format
());
auto
src_pd
=
mkldnn
::
memory
::
primitive_desc
{
src_md
,
engine
}
;
auto
src_pd
=
mkldnn
::
memory
::
primitive_desc
(
src_md
,
engine
)
;
auto
src_memory
=
std
::
make_shared
<
mkldnn
::
memory
>
(
src_pd
,
to_void_cast
<
T
>
(
input_data
));
std
::
shared_ptr
<
primitive
::
at
>
src_memory_p
=
std
::
shared_ptr
<
primitive
::
at
>
(
new
primitive
::
at
(
*
src_memory
));
auto
dst_md
=
platform
::
MKLDNNMemDesc
(
{
dst_tz
},
memory
::
data_type
::
u8
,
memory
::
format
::
nhwc
);
auto
dst_pd
=
mkldnn
::
memory
::
primitive_desc
{
dst_md
,
engine
}
;
auto
dst_pd
=
mkldnn
::
memory
::
primitive_desc
(
dst_md
,
engine
)
;
auto
dst_memory
=
mkldnn
::
memory
(
dst_pd
,
to_void_cast
<
T
>
(
output_data
));
auto
reorder_pd
=
std
::
shared_ptr
<
reorder
::
primitive_desc
>
(
...
...
paddle/fluid/operators/requantize_op.cc
浏览文件 @
9b380f99
...
...
@@ -63,13 +63,13 @@ class ReQuantOpKernel : public framework::OpKernel<T> {
auto
src_md
=
platform
::
MKLDNNMemDesc
(
{
src_tz
},
src_dt
,
src_fmt
);
//FIX ME WITH S8
auto
src_pd
=
mkldnn
::
memory
::
primitive_desc
{
src_md
,
engine
}
;
auto
src_pd
=
mkldnn
::
memory
::
primitive_desc
(
src_md
,
engine
)
;
auto
src_memory
=
std
::
make_shared
<
mkldnn
::
memory
>
(
src_pd
,
to_void_cast
<
T
>
(
input_data
));
std
::
shared_ptr
<
primitive
::
at
>
src_memory_p
=
std
::
shared_ptr
<
primitive
::
at
>
(
new
primitive
::
at
(
*
src_memory
));
auto
dst_md
=
platform
::
MKLDNNMemDesc
(
{
dst_tz
},
dst_dt
,
dst_fmt
);
auto
dst_pd
=
mkldnn
::
memory
::
primitive_desc
{
dst_md
,
engine
}
;
auto
dst_pd
=
mkldnn
::
memory
::
primitive_desc
(
dst_md
,
engine
)
;
auto
dst_memory
=
mkldnn
::
memory
(
dst_pd
,
to_void_cast
<
T
>
(
output_data
));
auto
reorder_pd
=
std
::
shared_ptr
<
reorder
::
primitive_desc
>
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录