Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
36980306
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看板
未验证
提交
36980306
编写于
6月 09, 2022
作者:
Z
zhupengyang
提交者:
GitHub
6月 09, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
disable lite gpu (#43178)
上级
e161979e
变更
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
浏览文件 @
36980306
...
...
@@ -106,7 +106,7 @@ if (NOT LITE_SOURCE_DIR OR NOT LITE_BINARY_DIR)
else
()
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
...
...
@@ -115,9 +115,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
浏览文件 @
36980306
...
...
@@ -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
浏览文件 @
36980306
...
...
@@ -151,22 +151,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
浏览文件 @
36980306
...
...
@@ -119,35 +119,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
浏览文件 @
36980306
...
...
@@ -22,10 +22,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
);
...
...
@@ -73,10 +72,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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录