Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
c008ae69
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看板
未验证
提交
c008ae69
编写于
10月 21, 2020
作者:
W
Wilber
提交者:
GitHub
10月 21, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update. (#28166)
上级
56aba4b7
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
7 addition
and
5 deletion
+7
-5
cmake/external/lite.cmake
cmake/external/lite.cmake
+1
-1
paddle/fluid/inference/api/analysis_config.cc
paddle/fluid/inference/api/analysis_config.cc
+1
-1
paddle/fluid/inference/lite/CMakeLists.txt
paddle/fluid/inference/lite/CMakeLists.txt
+1
-1
paddle/fluid/inference/lite/engine.cc
paddle/fluid/inference/lite/engine.cc
+2
-2
paddle/fluid/pybind/inference_api.cc
paddle/fluid/pybind/inference_api.cc
+2
-0
未找到文件。
cmake/external/lite.cmake
浏览文件 @
c008ae69
...
...
@@ -22,7 +22,7 @@ if(XPU_SDK_ROOT)
set
(
LITE_WITH_XPU ON
)
include_directories
(
"
${
XPU_SDK_ROOT
}
/XTDK/include"
)
include_directories
(
"
${
XPU_SDK_ROOT
}
/XTCL/include"
)
add_definitions
(
-D
PADDLE
_WITH_XPU
)
add_definitions
(
-D
LITE_SUBGRAPH
_WITH_XPU
)
LINK_DIRECTORIES
(
"
${
XPU_SDK_ROOT
}
/XTDK/shlib/"
)
LINK_DIRECTORIES
(
"
${
XPU_SDK_ROOT
}
/XTDK/runtime/shlib/"
)
endif
()
...
...
paddle/fluid/inference/api/analysis_config.cc
浏览文件 @
c008ae69
...
...
@@ -375,7 +375,7 @@ void AnalysisConfig::Update() {
}
if
(
use_xpu_
)
{
#ifndef
PADDLE
_WITH_XPU
#ifndef
LITE_SUBGRAPH
_WITH_XPU
PADDLE_THROW
(
platform
::
errors
::
Unavailable
(
"You tried to use an XPU device, but Paddle was not compiled "
"with XPU-runtime."
));
...
...
paddle/fluid/inference/lite/CMakeLists.txt
浏览文件 @
c008ae69
...
...
@@ -4,6 +4,6 @@ endif()
cc_library
(
lite_op_teller SRCS op_teller.cc DEPS lite_full_static framework_proto device_context boost xxhash
)
cc_library
(
lite_engine SRCS engine.cc DEPS lite_full_static framework_proto
${
XPU_DEPS
}
)
cc_library
(
lite_tensor_utils SRCS tensor_utils.cc DEPS memcpy lite_full_static framework_proto boost device_context
)
cc_library
(
lite_tensor_utils SRCS tensor_utils.cc DEPS memcpy lite_full_static framework_proto boost device_context
${
XPU_DEPS
}
)
cc_test
(
test_lite_engine SRCS test_engine.cc DEPS lite_engine protobuf framework_proto glog gtest analysis
)
cc_test
(
test_lite_tensor_utils SRCS test_tensor_utils.cc DEPS lite_engine lite_tensor_utils
)
paddle/fluid/inference/lite/engine.cc
浏览文件 @
c008ae69
...
...
@@ -16,7 +16,7 @@
#define LITE_WITH_CUDA 1
#endif
#ifdef
PADDLE
_WITH_XPU
#ifdef
LITE_SUBGRAPH
_WITH_XPU
#define LITE_WITH_XPU 1
#endif
...
...
@@ -59,7 +59,7 @@ paddle::lite_api::PaddlePredictor* EngineManager::Create(
cfg
.
cpu_math_library_num_threads
);
#endif
#ifdef
PADDLE
_WITH_XPU
#ifdef
LITE_SUBGRAPH
_WITH_XPU
lite_cxx_config
.
set_xpu_workspace_l3_size_per_thread
(
cfg
.
xpu_l3_workspace_size
);
#endif
...
...
paddle/fluid/pybind/inference_api.cc
浏览文件 @
c008ae69
...
...
@@ -444,6 +444,8 @@ void BindAnalysisConfig(py::module *m) {
.
def
(
"enable_use_gpu"
,
&
AnalysisConfig
::
EnableUseGpu
,
py
::
arg
(
"memory_pool_init_size_mb"
),
py
::
arg
(
"device_id"
)
=
0
)
.
def
(
"disable_gpu"
,
&
AnalysisConfig
::
DisableGpu
)
.
def
(
"enable_xpu"
,
&
AnalysisConfig
::
EnableXpu
,
py
::
arg
(
"l3_workspace_size"
))
.
def
(
"use_gpu"
,
&
AnalysisConfig
::
use_gpu
)
.
def
(
"gpu_device_id"
,
&
AnalysisConfig
::
gpu_device_id
)
.
def
(
"memory_pool_init_size_mb"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录