Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
b970c6d5
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 2 年 前同步成功
通知
2325
Star
20933
Fork
5424
代码
文件
提交
分支
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看板
提交
b970c6d5
编写于
10月 17, 2018
作者:
N
nhzlx
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' of
https://github.com/PaddlePaddle/Paddle
into fix_demo_ci_trt
test=develop
上级
32072d31
6553956b
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
12 addition
and
25 deletion
+12
-25
paddle/fluid/inference/analysis/analyzer_tester.cc
paddle/fluid/inference/analysis/analyzer_tester.cc
+1
-3
paddle/fluid/inference/api/analysis_predictor_tester.cc
paddle/fluid/inference/api/analysis_predictor_tester.cc
+1
-3
paddle/fluid/inference/api/api_tensorrt_subgraph_engine_tester.cc
...luid/inference/api/api_tensorrt_subgraph_engine_tester.cc
+2
-5
paddle/fluid/inference/tests/api/analyzer_rnn1_tester.cc
paddle/fluid/inference/tests/api/analyzer_rnn1_tester.cc
+2
-6
paddle/fluid/inference/tests/api/tester_helper.h
paddle/fluid/inference/tests/api/tester_helper.h
+1
-2
paddle/fluid/inference/tests/api/trt_models_tester.cc
paddle/fluid/inference/tests/api/trt_models_tester.cc
+2
-5
paddle/scripts/paddle_build.sh
paddle/scripts/paddle_build.sh
+3
-1
未找到文件。
paddle/fluid/inference/analysis/analyzer_tester.cc
浏览文件 @
b970c6d5
...
@@ -51,9 +51,7 @@ void TestWord2vecPrediction(const std::string& model_path) {
...
@@ -51,9 +51,7 @@ void TestWord2vecPrediction(const std::string& model_path) {
config
.
model_dir
=
model_path
;
config
.
model_dir
=
model_path
;
config
.
use_gpu
=
false
;
config
.
use_gpu
=
false
;
config
.
device
=
0
;
config
.
device
=
0
;
auto
predictor
=
auto
predictor
=
::
paddle
::
CreatePaddlePredictor
<
NativeConfig
>
(
config
);
::
paddle
::
CreatePaddlePredictor
<
NativeConfig
,
PaddleEngineKind
::
kNative
>
(
config
);
// One single batch
// One single batch
...
...
paddle/fluid/inference/api/analysis_predictor_tester.cc
浏览文件 @
b970c6d5
...
@@ -27,9 +27,7 @@ TEST(AnalysisPredictor, ZeroCopy) {
...
@@ -27,9 +27,7 @@ TEST(AnalysisPredictor, ZeroCopy) {
config
.
model_dir
=
FLAGS_dirname
+
"/word2vec.inference.model"
;
config
.
model_dir
=
FLAGS_dirname
+
"/word2vec.inference.model"
;
config
.
use_feed_fetch_ops
=
false
;
config
.
use_feed_fetch_ops
=
false
;
auto
predictor
=
auto
predictor
=
CreatePaddlePredictor
<
AnalysisConfig
>
(
config
);
CreatePaddlePredictor
<
AnalysisConfig
,
PaddleEngineKind
::
kAnalysis
>
(
config
);
auto
w0
=
predictor
->
GetInputTensor
(
"firstw"
);
auto
w0
=
predictor
->
GetInputTensor
(
"firstw"
);
auto
w1
=
predictor
->
GetInputTensor
(
"secondw"
);
auto
w1
=
predictor
->
GetInputTensor
(
"secondw"
);
...
...
paddle/fluid/inference/api/api_tensorrt_subgraph_engine_tester.cc
浏览文件 @
b970c6d5
...
@@ -41,11 +41,8 @@ void CompareTensorRTWithFluid(bool enable_tensorrt) {
...
@@ -41,11 +41,8 @@ void CompareTensorRTWithFluid(bool enable_tensorrt) {
config1
.
device
=
0
;
config1
.
device
=
0
;
config1
.
max_batch_size
=
10
;
config1
.
max_batch_size
=
10
;
auto
predictor0
=
auto
predictor0
=
CreatePaddlePredictor
<
NativeConfig
>
(
config0
);
CreatePaddlePredictor
<
NativeConfig
,
PaddleEngineKind
::
kNative
>
(
config0
);
auto
predictor1
=
CreatePaddlePredictor
<
MixedRTConfig
>
(
config1
);
auto
predictor1
=
CreatePaddlePredictor
<
MixedRTConfig
,
PaddleEngineKind
::
kAutoMixedTensorRT
>
(
config1
);
for
(
int
batch_id
=
0
;
batch_id
<
1
;
batch_id
++
)
{
for
(
int
batch_id
=
0
;
batch_id
<
1
;
batch_id
++
)
{
//# 2. Prepare input.
//# 2. Prepare input.
...
...
paddle/fluid/inference/tests/api/analyzer_rnn1_tester.cc
浏览文件 @
b970c6d5
...
@@ -308,18 +308,14 @@ TEST(Analyzer_rnn1, ZeroCopy) {
...
@@ -308,18 +308,14 @@ TEST(Analyzer_rnn1, ZeroCopy) {
PaddlePlace
place
;
PaddlePlace
place
;
int
output_size
{
0
};
int
output_size
{
0
};
auto
predictor
=
auto
predictor
=
CreatePaddlePredictor
<
AnalysisConfig
>
(
config
);
CreatePaddlePredictor
<
AnalysisConfig
,
PaddleEngineKind
::
kAnalysis
>
(
config
);
config
.
use_feed_fetch_ops
=
true
;
config
.
use_feed_fetch_ops
=
true
;
auto
native_predictor
=
auto
native_predictor
=
CreatePaddlePredictor
<
NativeConfig
,
PaddleEngineKind
::
kNative
>
(
config
);
CreatePaddlePredictor
<
NativeConfig
,
PaddleEngineKind
::
kNative
>
(
config
);
config
.
use_feed_fetch_ops
=
true
;
// the analysis predictor needs feed/fetch.
config
.
use_feed_fetch_ops
=
true
;
// the analysis predictor needs feed/fetch.
auto
analysis_predictor
=
auto
analysis_predictor
=
CreatePaddlePredictor
<
AnalysisConfig
>
(
config
);
CreatePaddlePredictor
<
AnalysisConfig
,
PaddleEngineKind
::
kAnalysis
>
(
config
);
#define NEW_TENSOR(name__) \
#define NEW_TENSOR(name__) \
auto name__##_tensor = predictor->GetInputTensor(#name__);
auto name__##_tensor = predictor->GetInputTensor(#name__);
...
...
paddle/fluid/inference/tests/api/tester_helper.h
浏览文件 @
b970c6d5
...
@@ -77,8 +77,7 @@ void CompareResult(const std::vector<PaddleTensor> &outputs,
...
@@ -77,8 +77,7 @@ void CompareResult(const std::vector<PaddleTensor> &outputs,
std
::
unique_ptr
<
PaddlePredictor
>
CreateTestPredictor
(
std
::
unique_ptr
<
PaddlePredictor
>
CreateTestPredictor
(
const
AnalysisConfig
&
config
,
bool
use_analysis
=
true
)
{
const
AnalysisConfig
&
config
,
bool
use_analysis
=
true
)
{
if
(
use_analysis
)
{
if
(
use_analysis
)
{
return
CreatePaddlePredictor
<
contrib
::
AnalysisConfig
,
return
CreatePaddlePredictor
<
contrib
::
AnalysisConfig
>
(
config
);
PaddleEngineKind
::
kAnalysis
>
(
config
);
}
else
{
}
else
{
return
CreatePaddlePredictor
<
NativeConfig
,
PaddleEngineKind
::
kNative
>
(
return
CreatePaddlePredictor
<
NativeConfig
,
PaddleEngineKind
::
kNative
>
(
config
);
config
);
...
...
paddle/fluid/inference/tests/api/trt_models_tester.cc
浏览文件 @
b970c6d5
...
@@ -51,11 +51,8 @@ void CompareTensorRTWithFluid(int batch_size, std::string model_dirname) {
...
@@ -51,11 +51,8 @@ void CompareTensorRTWithFluid(int batch_size, std::string model_dirname) {
config1
.
model_dir
=
model_dirname
;
config1
.
model_dir
=
model_dirname
;
config1
.
max_batch_size
=
batch_size
;
config1
.
max_batch_size
=
batch_size
;
auto
predictor0
=
auto
predictor0
=
CreatePaddlePredictor
<
NativeConfig
>
(
config0
);
CreatePaddlePredictor
<
NativeConfig
,
PaddleEngineKind
::
kNative
>
(
config0
);
auto
predictor1
=
CreatePaddlePredictor
<
MixedRTConfig
>
(
config1
);
auto
predictor1
=
CreatePaddlePredictor
<
MixedRTConfig
,
PaddleEngineKind
::
kAutoMixedTensorRT
>
(
config1
);
// Prepare inputs
// Prepare inputs
int
height
=
224
;
int
height
=
224
;
int
width
=
224
;
int
width
=
224
;
...
...
paddle/scripts/paddle_build.sh
浏览文件 @
b970c6d5
...
@@ -390,7 +390,9 @@ function run_mac_test() {
...
@@ -390,7 +390,9 @@ function run_mac_test() {
Running unit tests ...
Running unit tests ...
========================================
========================================
EOF
EOF
#remove proxy here to fix dist error on mac
export
http_proxy
=
export
https_proxy
=
# TODO: jiabin need to refine this part when these tests fixed on mac
# TODO: jiabin need to refine this part when these tests fixed on mac
ctest
--output-on-failure
-j
$1
ctest
--output-on-failure
-j
$1
# make install should also be test when unittest
# make install should also be test when unittest
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录