Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
e6fcdd47
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看板
提交
e6fcdd47
编写于
7月 04, 2017
作者:
Q
qijun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix wrong including header-file in files in paddle/platform/dynload dir
上级
6fd41f7b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
26 addition
and
27 deletion
+26
-27
paddle/platform/dynload/cublas.h
paddle/platform/dynload/cublas.h
+3
-1
paddle/platform/dynload/cudnn.h
paddle/platform/dynload/cudnn.h
+3
-1
paddle/platform/dynload/curand.h
paddle/platform/dynload/curand.h
+3
-1
paddle/platform/dynload/dynamic_loader.cc
paddle/platform/dynload/dynamic_loader.cc
+17
-24
未找到文件。
paddle/platform/dynload/cublas.h
浏览文件 @
e6fcdd47
...
...
@@ -15,7 +15,9 @@ limitations under the License. */
#pragma once
#include <cublas_v2.h>
#include "paddle/platform/dynamic_loader.h"
#include <dlfcn.h>
#include <mutex>
#include "paddle/platform/dynload/dynamic_loader.h"
namespace
paddle
{
namespace
platform
{
...
...
paddle/platform/dynload/cudnn.h
浏览文件 @
e6fcdd47
...
...
@@ -15,7 +15,9 @@ limitations under the License. */
#pragma once
#include <cudnn.h>
#include "paddle/platform/dynamic_loader.h"
#include <dlfcn.h>
#include <mutex>
#include "paddle/platform/dynload/dynamic_loader.h"
namespace
paddle
{
namespace
platform
{
...
...
paddle/platform/dynload/curand.h
浏览文件 @
e6fcdd47
...
...
@@ -15,7 +15,9 @@ limitations under the License. */
#pragma once
#include <curand.h>
#include "paddle/platform/dynamic_loader.h"
#include <dlfcn.h>
#include <mutex>
#include "paddle/platform/dynload/dynamic_loader.h"
namespace
paddle
{
namespace
platform
{
...
...
paddle/platform/dynload/dynamic_loader.cc
浏览文件 @
e6fcdd47
...
...
@@ -12,13 +12,14 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include "dynamic_loader.h"
#include "
paddle/platform/dynload/
dynamic_loader.h"
#include <dlfcn.h>
#include <memory>
#include <mutex>
#include <string>
#include "gflags/gflags.h"
#include "glog/logging.h"
#include "paddle/framework/enforce.h"
DEFINE_string
(
cudnn_dir
,
""
,
"Specify path for loading libcudnn.so. For instance, "
...
...
@@ -72,13 +73,12 @@ static inline void GetDsoHandleFromDefaultPath(std::string& dso_path,
*
dso_handle
=
dlopen
(
dso_path
.
c_str
(),
dynload_flags
);
if
(
nullptr
==
*
dso_handle
)
{
if
(
dso_path
==
"libcudnn.dylib"
)
{
LOG
(
FATAL
)
<<
"Note: [Recommend] copy cudnn into /usr/local/cuda/
\n
"
// NOLINT
<<
"For instance, sudo tar -xzf "
"cudnn-7.5-osx-x64-v5.0-ga.tgz -C "
// NOLINT
<<
"/usr/local
\n
sudo chmod a+r "
"/usr/local/cuda/include/cudnn.h "
// NOLINT
<<
"/usr/local/cuda/lib/libcudnn*"
;
PADDLE_ENFORCE
(
true
,
"Note: [Recommend] copy cudnn into /usr/local/cuda/
\n
"
"For instance, sudo tar -xzf "
"cudnn-7.5-osx-x64-v5.0-ga.tgz -C /usr/local
\n
sudo "
"chmod a+r /usr/local/cuda/include/cudnn.h "
"/usr/local/cuda/lib/libcudnn*"
);
}
}
}
...
...
@@ -106,22 +106,15 @@ static inline void GetDsoHandleFromSearchPath(const std::string& search_root,
GetDsoHandleFromDefaultPath
(
dlPath
,
dso_handle
,
dynload_flags
);
}
}
CHECK
(
nullptr
!=
*
dso_handle
)
<<
"Failed to find dynamic library: "
<<
dlPath
<<
" ("
<<
dlerror
()
<<
")
\n
"
<<
"Please specify its path correctly using "
"following ways:
\n
"
<<
"Method. set environment variable "
"LD_LIBRARY_PATH on Linux or "
<<
"DYLD_LIBRARY_PATH on Mac OS.
\n
"
<<
"For instance, issue command: export "
"LD_LIBRARY_PATH=...
\n
"
<<
"Note: After Mac OS 10.11, using the "
"DYLD_LIBRARY_PATH is impossible "
<<
"unless System Integrity Protection (SIP) "
"is disabled."
;
PADDLE_ENFORCE
(
nullptr
!=
*
dso_handle
,
"Failed to find dynamic library: %s ( %s )
\n
Please specify "
"its path correctly using following ways:
\n
Method. set "
"environment variable LD_LIBRARY_PATH on Linux or "
"DYLD_LIBRARY_PATH on Mac OS.
\n
For instance, issue command: "
"export LD_LIBRARY_PATH=...
\n
Note: After Mac OS 10.11, "
"using the DYLD_LIBRARY_PATH is impossible unless System "
"Integrity Protection (SIP) is disabled."
,
dlPath
,
dlerror
());
}
void
GetCublasDsoHandle
(
void
**
dso_handle
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录