Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
852d905b
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
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看板
未验证
提交
852d905b
编写于
11月 09, 2017
作者:
T
tensor-tang
提交者:
GitHub
11月 09, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #5492 from tensor-tang/mkltags
update tags of MKLML and MKL-DNN
上级
b698d19b
4fd432fd
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
11 addition
and
7 deletion
+11
-7
cmake/external/mkldnn.cmake
cmake/external/mkldnn.cmake
+5
-1
cmake/external/mklml.cmake
cmake/external/mklml.cmake
+2
-2
paddle/gserver/layers/MKLDNNAddtoLayer.cpp
paddle/gserver/layers/MKLDNNAddtoLayer.cpp
+3
-3
paddle/gserver/layers/MKLDNNLayer.cpp
paddle/gserver/layers/MKLDNNLayer.cpp
+1
-1
未找到文件。
cmake/external/mkldnn.cmake
浏览文件 @
852d905b
...
...
@@ -46,16 +46,20 @@ IF(${CBLAS_PROVIDER} STREQUAL "MKLML")
MESSAGE
(
STATUS
"Build MKLDNN with
${
MKLDNN_MKLROOT
}
"
)
ENDIF
()
SET
(
MKLDNN_CFLAG
"
${
CMAKE_C_FLAGS
}
-Wno-error=strict-overflow"
)
SET
(
MKLDNN_CXXFLAG
"
${
CMAKE_CXX_FLAGS
}
-Wno-error=strict-overflow"
)
ExternalProject_Add
(
${
MKLDNN_PROJECT
}
${
EXTERNAL_PROJECT_LOG_ARGS
}
DEPENDS
${
MKLDNN_DEPENDS
}
GIT_REPOSITORY
"https://github.com/01org/mkl-dnn.git"
GIT_TAG
"v0.1
0
"
GIT_TAG
"v0.1
1
"
PREFIX
${
MKLDNN_SOURCES_DIR
}
UPDATE_COMMAND
""
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=
${
MKLDNN_INSTALL_DIR
}
CMAKE_ARGS -DMKLROOT=
${
MKLDNN_MKLROOT
}
CMAKE_ARGS -DCMAKE_C_FLAGS=
${
MKLDNN_CFLAG
}
CMAKE_ARGS -DCMAKE_CXX_FLAGS=
${
MKLDNN_CXXFLAG
}
CMAKE_CACHE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=
${
MKLDNN_INSTALL_DIR
}
-DMKLROOT:PATH=
${
MKLDNN_MKLROOT
}
)
...
...
cmake/external/mklml.cmake
浏览文件 @
852d905b
...
...
@@ -27,8 +27,8 @@ ENDIF()
INCLUDE
(
ExternalProject
)
SET
(
MKLML_PROJECT
"extern_mklml"
)
SET
(
MKLML_VER
"mklml_lnx_2018.0.
20170720
"
)
SET
(
MKLML_URL
"https://github.com/01org/mkl-dnn/releases/download/v0.1
0
/
${
MKLML_VER
}
.tgz"
)
SET
(
MKLML_VER
"mklml_lnx_2018.0.
1.20171007
"
)
SET
(
MKLML_URL
"https://github.com/01org/mkl-dnn/releases/download/v0.1
1
/
${
MKLML_VER
}
.tgz"
)
SET
(
MKLML_SOURCE_DIR
"
${
THIRD_PARTY_PATH
}
/mklml"
)
SET
(
MKLML_DOWNLOAD_DIR
"
${
MKLML_SOURCE_DIR
}
/src/
${
MKLML_PROJECT
}
"
)
SET
(
MKLML_DST_DIR
"mklml"
)
...
...
paddle/gserver/layers/MKLDNNAddtoLayer.cpp
浏览文件 @
852d905b
...
...
@@ -91,7 +91,7 @@ void MKLDNNAddtoLayer::resetBwd(std::vector<primitive>& pipeline,
// backward bias
bwdBias_
=
nullptr
;
if
(
bias
)
{
std
::
vector
<
double
>
scales
(
bs_
,
1.0
);
std
::
vector
<
float
>
scales
(
bs_
,
1.0
);
std
::
vector
<
memory
::
primitive_desc
>
srcPDs
(
bs_
,
bias
->
getPrimitiveDesc
());
auto
biasPD
=
sum
::
primitive_desc
(
bias
->
getMemoryDesc
(),
scales
,
srcPDs
);
std
::
vector
<
primitive
::
at
>
srcs
;
...
...
@@ -153,7 +153,7 @@ void MKLDNNAddtoLayer::resetFwdPD(std::shared_ptr<sum::primitive_desc>& pd,
std
::
vector
<
MKLDNNMatrixPtr
>&
inputs
,
MKLDNNMatrixPtr
bias
,
MKLDNNMatrixPtr
out
)
{
std
::
vector
<
double
>
scales
(
inputs
.
size
(),
1.0
);
std
::
vector
<
float
>
scales
(
inputs
.
size
(),
1.0
);
std
::
vector
<
memory
::
primitive_desc
>
srcPDs
;
for
(
size_t
i
=
0
;
i
<
inputs
.
size
();
i
++
)
{
srcPDs
.
push_back
(
inputs
[
i
]
->
getPrimitiveDesc
());
...
...
@@ -164,7 +164,7 @@ void MKLDNNAddtoLayer::resetFwdPD(std::shared_ptr<sum::primitive_desc>& pd,
biasPD
=
nullptr
;
if
(
bias
)
{
std
::
vector
<
double
>
scales
(
2
,
1.0
);
std
::
vector
<
float
>
scales
(
2
,
1.0
);
std
::
vector
<
memory
::
primitive_desc
>
srcPDs
(
2
,
bias
->
getPrimitiveDesc
());
biasPD
.
reset
(
new
sum
::
primitive_desc
(
bias
->
getMemoryDesc
(),
scales
,
srcPDs
));
...
...
paddle/gserver/layers/MKLDNNLayer.cpp
浏览文件 @
852d905b
...
...
@@ -287,7 +287,7 @@ void MKLDNNLayer::resetMergeGrad(MKLDNNMatrixPtr& out) {
return
;
}
CHECK
(
out
)
<<
"should have reset internal ouput grad"
;
std
::
vector
<
double
>
scales
(
outputMap_
.
size
(),
1.0
);
std
::
vector
<
float
>
scales
(
outputMap_
.
size
(),
1.0
);
std
::
vector
<
memory
::
primitive_desc
>
srcPDs
;
std
::
vector
<
primitive
::
at
>
srcs
;
for
(
auto
it
=
outputMap_
.
begin
();
it
!=
outputMap_
.
end
();
++
it
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录