Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
飞不过沧海
Paddle
提交
811d57d8
P
Paddle
项目概览
飞不过沧海
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
811d57d8
编写于
6月 08, 2022
作者:
Z
zhupengyang
提交者:
GitHub
6月 08, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
disable lite gpu (#43177)
上级
971e4791
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
3 addition
and
44 deletion
+3
-44
cmake/external/lite.cmake
cmake/external/lite.cmake
+1
-4
paddle/fluid/inference/lite/engine.cc
paddle/fluid/inference/lite/engine.cc
+0
-4
paddle/fluid/inference/lite/test_tensor_utils.cc
paddle/fluid/inference/lite/test_tensor_utils.cc
+0
-10
paddle/fluid/inference/tests/api/lite_mul_model_test.cc
paddle/fluid/inference/tests/api/lite_mul_model_test.cc
+0
-22
paddle/fluid/inference/tests/api/lite_resnet50_test.cc
paddle/fluid/inference/tests/api/lite_resnet50_test.cc
+2
-4
未找到文件。
cmake/external/lite.cmake
浏览文件 @
811d57d8
...
...
@@ -115,7 +115,7 @@ if(NOT LITE_SOURCE_DIR OR NOT LITE_BINARY_DIR)
set
(
LITE_BUILD_COMMAND $
(
MAKE
)
publish_inference -j
)
set
(
LITE_OPTIONAL_ARGS
-DWITH_MKL=ON
-DLITE_WITH_CUDA=
${
WITH_GPU
}
-DLITE_WITH_CUDA=
OFF
-DWITH_MKLDNN=OFF
-DLITE_WITH_X86=ON
-DLITE_WITH_PROFILE=OFF
...
...
@@ -124,9 +124,6 @@ if(NOT LITE_SOURCE_DIR OR NOT LITE_BINARY_DIR)
-DWITH_PYTHON=OFF
-DWITH_TESTING=OFF
-DLITE_BUILD_EXTRA=ON
-DCUDNN_ROOT=
${
CUDNN_ROOT
}
-DLITE_WITH_STATIC_CUDA=OFF
-DCUDA_ARCH_NAME=
${
CUDA_ARCH_NAME
}
-DLITE_WITH_XPU=
${
LITE_WITH_XPU
}
-DXPU_SDK_URL=
${
XPU_BASE_URL
}
-DXPU_SDK_ENV=
${
XPU_SDK_ENV
}
...
...
paddle/fluid/inference/lite/engine.cc
浏览文件 @
811d57d8
...
...
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
#define LITE_WITH_CUDA 1
#endif
#ifdef LITE_SUBGRAPH_WITH_XPU
#define LITE_WITH_XPU 1
#endif
...
...
paddle/fluid/inference/lite/test_tensor_utils.cc
浏览文件 @
811d57d8
...
...
@@ -152,22 +152,12 @@ TEST(LiteEngineOp, TensorCopyAsync) {
auto
*
ctx_cpu
=
platform
::
DeviceContextPool
::
Instance
().
Get
(
platform
::
CPUPlace
());
test_tensor_copy
(
*
ctx_cpu
);
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
auto
*
ctx_gpu
=
platform
::
DeviceContextPool
::
Instance
().
Get
(
platform
::
CUDAPlace
(
0
));
test_tensor_copy
(
*
ctx_gpu
);
#endif
}
TEST
(
LiteEngineOp
,
TensorShare
)
{
auto
*
ctx_cpu
=
platform
::
DeviceContextPool
::
Instance
().
Get
(
platform
::
CPUPlace
());
test_tensor_share
(
*
ctx_cpu
);
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
auto
*
ctx_gpu
=
platform
::
DeviceContextPool
::
Instance
().
Get
(
platform
::
CUDAPlace
(
0
));
test_tensor_share
(
*
ctx_gpu
);
#endif
}
}
// namespace utils
...
...
paddle/fluid/inference/tests/api/lite_mul_model_test.cc
浏览文件 @
811d57d8
...
...
@@ -120,35 +120,13 @@ TEST(AnalysisPredictor, lite_xpu) {
}
#endif
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
TEST
(
AnalysisPredictor
,
thread_local_stream
)
{
const
size_t
thread_num
=
5
;
std
::
vector
<
std
::
thread
>
threads
(
thread_num
);
Barrier
barrier
(
thread_num
);
for
(
size_t
i
=
0
;
i
<
threads
.
size
();
++
i
)
{
threads
[
i
]
=
std
::
thread
([
&
barrier
,
i
]()
{
AnalysisConfig
config
;
config
.
EnableUseGpu
(
100
,
0
);
config
.
SetModel
(
FLAGS_infer_model
+
"/"
+
"mul_model"
);
config
.
EnableGpuMultiStream
();
test_predictor
(
config
,
&
barrier
);
test_predictor_zero_copy
(
config
);
});
}
for
(
auto
&
th
:
threads
)
{
th
.
join
();
}
}
TEST
(
AnalysisPredictor
,
lite_engine
)
{
AnalysisConfig
config
;
config
.
EnableUseGpu
(
100
,
0
);
config
.
SetModel
(
FLAGS_infer_model
+
"/"
+
"mul_model"
);
config
.
EnableLiteEngine
(
paddle
::
AnalysisConfig
::
Precision
::
kFloat32
);
test_predictor
(
config
);
test_predictor_zero_copy
(
config
);
}
#endif
}
// namespace inference
}
// namespace paddle
paddle/fluid/inference/tests/api/lite_resnet50_test.cc
浏览文件 @
811d57d8
...
...
@@ -23,10 +23,9 @@ limitations under the License. */
namespace
paddle
{
namespace
inference
{
TEST
(
AnalysisPredictor
,
use_
g
pu
)
{
TEST
(
AnalysisPredictor
,
use_
c
pu
)
{
std
::
string
model_dir
=
FLAGS_infer_model
+
"/"
+
"model"
;
AnalysisConfig
config
;
config
.
EnableUseGpu
(
100
,
0
);
config
.
SetModel
(
model_dir
+
"/model"
,
model_dir
+
"/params"
);
config
.
EnableLiteEngine
(
paddle
::
AnalysisConfig
::
Precision
::
kFloat32
,
true
);
...
...
@@ -74,10 +73,9 @@ TEST(AnalysisPredictor, use_gpu) {
namespace
paddle_infer
{
TEST
(
Predictor
,
use_
g
pu
)
{
TEST
(
Predictor
,
use_
c
pu
)
{
std
::
string
model_dir
=
FLAGS_infer_model
+
"/"
+
"model"
;
Config
config
;
config
.
EnableUseGpu
(
100
,
0
);
config
.
SetModel
(
model_dir
+
"/model"
,
model_dir
+
"/params"
);
config
.
EnableLiteEngine
(
PrecisionType
::
kFloat32
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录