Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
62d44836
P
Paddle
项目概览
Crayon鑫
/
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看板
未验证
提交
62d44836
编写于
12月 14, 2020
作者:
A
arlesniak
提交者:
GitHub
12月 14, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added verbose oneDNN lib version (#29378)
上级
ff6a1450
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
21 addition
and
2 deletion
+21
-2
paddle/fluid/operators/mkldnn/concat_mkldnn_op.cc
paddle/fluid/operators/mkldnn/concat_mkldnn_op.cc
+1
-0
paddle/fluid/operators/mkldnn/fc_mkldnn_op.cc
paddle/fluid/operators/mkldnn/fc_mkldnn_op.cc
+1
-0
paddle/fluid/operators/mkldnn/matmul_mkldnn_op.cc
paddle/fluid/operators/mkldnn/matmul_mkldnn_op.cc
+1
-0
paddle/fluid/operators/mkldnn/mul_mkldnn_op.cc
paddle/fluid/operators/mkldnn/mul_mkldnn_op.cc
+1
-0
paddle/fluid/platform/device_context.cc
paddle/fluid/platform/device_context.cc
+9
-0
paddle/fluid/platform/device_context.h
paddle/fluid/platform/device_context.h
+2
-0
paddle/fluid/platform/mkldnn_reuse.h
paddle/fluid/platform/mkldnn_reuse.h
+6
-2
未找到文件。
paddle/fluid/operators/mkldnn/concat_mkldnn_op.cc
浏览文件 @
62d44836
...
...
@@ -144,6 +144,7 @@ class ConcatMKLDNNOpKernel : public paddle::framework::OpKernel<T> {
platform
::
errors
::
InvalidArgument
(
"The axis is expected to be in range of [%d, %d), but got %d"
,
-
rank
,
rank
,
concat_axis
));
platform
::
MKLDNNDeviceContext
::
tls
().
log_lib_version
();
if
(
concat_axis
<
0
)
{
concat_axis
=
concat_axis
+
rank
;
}
...
...
paddle/fluid/operators/mkldnn/fc_mkldnn_op.cc
浏览文件 @
62d44836
...
...
@@ -572,6 +572,7 @@ class FCMKLDNNOpKernel : public framework::OpKernel<T_in> {
PADDLE_ENFORCE_EQ
(
platform
::
is_cpu_place
(
ctx
.
GetPlace
()),
true
,
platform
::
errors
::
PreconditionNotMet
(
"FC MKL-DNN must use CPUPlace."
));
platform
::
MKLDNNDeviceContext
::
tls
().
log_lib_version
();
auto
input
=
ctx
.
Input
<
LoDTensor
>
(
"Input"
);
auto
w
=
ctx
.
Input
<
Tensor
>
(
"W"
);
auto
bias
=
ctx
.
Input
<
Tensor
>
(
"Bias"
);
...
...
paddle/fluid/operators/mkldnn/matmul_mkldnn_op.cc
浏览文件 @
62d44836
...
...
@@ -378,6 +378,7 @@ class DNNLMatMulKernel : public framework::OpKernel<T> {
platform
::
errors
::
Unimplemented
(
"DNNL matmul doesn't support multiple heads."
));
}
platform
::
MKLDNNDeviceContext
::
tls
().
log_lib_version
();
ExecuteMatMul
<
T
,
T
>
(
ctx
);
}
};
...
...
paddle/fluid/operators/mkldnn/mul_mkldnn_op.cc
浏览文件 @
62d44836
...
...
@@ -353,6 +353,7 @@ class MulMKLDNNKernel : public framework::OpKernel<XT> {
PADDLE_ENFORCE_EQ
(
platform
::
is_cpu_place
(
ctx
.
GetPlace
()),
true
,
paddle
::
platform
::
errors
::
PreconditionNotMet
(
"Operator DNNL Mul must use CPUPlace"
));
platform
::
MKLDNNDeviceContext
::
tls
().
log_lib_version
();
auto
&
dev_ctx
=
ctx
.
template
device_context
<
MKLDNNDeviceContext
>();
const
auto
&
mkldnn_engine
=
dev_ctx
.
GetEngine
();
...
...
paddle/fluid/platform/device_context.cc
浏览文件 @
62d44836
...
...
@@ -466,6 +466,15 @@ MKLDNNDeviceContextThreadLocals::Body::get_cur_paddle_data_layout(void) {
return
cur_paddle_data_layout
;
}
void
MKLDNNDeviceContextThreadLocals
::
Body
::
log_lib_version
(
void
)
{
if
(
!
said_once
)
{
said_once
=
true
;
auto
dv
=
dnnl
::
version
();
LOG
(
INFO
)
<<
"oneDNN v"
<<
dv
->
major
<<
"."
<<
dv
->
minor
<<
"."
<<
dv
->
patch
;
}
}
void
MKLDNNDeviceContext
::
ResetBlobMap
()
{
std
::
lock_guard
<
decltype
(
*
p_mutex_
)
>
lock
(
*
p_mutex_
);
if
(
!
block_next_cache_clearing_
)
{
...
...
paddle/fluid/platform/device_context.h
浏览文件 @
62d44836
...
...
@@ -466,6 +466,7 @@ class MKLDNNDeviceContextThreadLocals {
typedef
MKLDNNDeviceContextThreadLocals
self
;
struct
Body
{
bool
said_once
=
false
;
size_t
cur_mkldnn_session_id
;
// Current data input shape string.
// - For fixed-shape, it's a null string in default.
...
...
@@ -485,6 +486,7 @@ class MKLDNNDeviceContextThreadLocals {
void
set_cur_input_shape_cache_capacity
(
int
input_shape_cache_capacity
);
void
set_cur_paddle_data_layout
(
framework
::
DataLayout
dl
);
framework
::
DataLayout
get_cur_paddle_data_layout
(
void
);
void
log_lib_version
(
void
);
};
MKLDNNDeviceContextThreadLocals
()
=
default
;
MKLDNNDeviceContextThreadLocals
(
const
MKLDNNDeviceContextThreadLocals
&
c
)
=
...
...
paddle/fluid/platform/mkldnn_reuse.h
浏览文件 @
62d44836
...
...
@@ -45,7 +45,9 @@ class MKLDNNHandlerT {
key_common_
(
base_key
),
key_
(
platform
::
ExtendKeyWithThreadInfoIfNeeded
(
dev_ctx
,
base_key
)),
fwd_pd_
(
nullptr
),
bwd_pd_
(
nullptr
)
{}
bwd_pd_
(
nullptr
)
{
platform
::
MKLDNNDeviceContext
::
tls
().
log_lib_version
();
}
std
::
shared_ptr
<
TForward
>
AcquireForwardPrimitive
()
{
const
std
::
string
key_p
=
key_
+
"@fwd_p"
;
...
...
@@ -313,7 +315,9 @@ class MKLDNNHandler {
:
dev_ctx_
(
dev_ctx
),
engine_
(
engine
),
key_common_
(
base_key
),
key_
(
platform
::
ExtendKeyWithThreadInfoIfNeeded
(
dev_ctx
,
base_key
))
{}
key_
(
platform
::
ExtendKeyWithThreadInfoIfNeeded
(
dev_ctx
,
base_key
))
{
platform
::
MKLDNNDeviceContext
::
tls
().
log_lib_version
();
}
std
::
shared_ptr
<
mkldnn
::
memory
>
AcquireSrcMemory
(
const
mkldnn
::
memory
::
desc
&
md
,
void
*
ptr
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录