Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
aab47cc0
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
695
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
aab47cc0
编写于
6月 29, 2018
作者:
F
fengjiayi
提交者:
Yan Chunwei
6月 29, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix Mac compile errors (#11829)
上级
8d76cf39
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
7 deletion
+15
-7
paddle/fluid/inference/analysis/tensorrt_subgraph_node_mark_pass.h
...uid/inference/analysis/tensorrt_subgraph_node_mark_pass.h
+10
-3
paddle/fluid/inference/analysis/tensorrt_subgraph_pass.h
paddle/fluid/inference/analysis/tensorrt_subgraph_pass.h
+5
-4
未找到文件。
paddle/fluid/inference/analysis/tensorrt_subgraph_node_mark_pass.h
浏览文件 @
aab47cc0
...
@@ -16,6 +16,10 @@
...
@@ -16,6 +16,10 @@
* This file defines TensorRTSubgraphNodeMarkPass which helps to mark the ops
* This file defines TensorRTSubgraphNodeMarkPass which helps to mark the ops
* that supported by TensorRT engine.
* that supported by TensorRT engine.
*/
*/
#pragma once
#include <string>
#include "paddle/fluid/inference/analysis/pass.h"
#include "paddle/fluid/inference/analysis/pass.h"
#include "paddle/fluid/inference/analysis/subgraph_splitter.h"
#include "paddle/fluid/inference/analysis/subgraph_splitter.h"
...
@@ -30,7 +34,8 @@ class TensorRTSubgraphNodeMarkPass : public DataFlowGraphPass {
...
@@ -30,7 +34,8 @@ class TensorRTSubgraphNodeMarkPass : public DataFlowGraphPass {
public:
public:
using
teller_t
=
SubGraphSplitter
::
NodeInsideSubgraphTeller
;
using
teller_t
=
SubGraphSplitter
::
NodeInsideSubgraphTeller
;
TensorRTSubgraphNodeMarkPass
(
const
teller_t
&
teller
)
:
teller_
(
teller
)
{}
explicit
TensorRTSubgraphNodeMarkPass
(
const
teller_t
&
teller
)
:
teller_
(
teller
)
{}
bool
Initialize
(
Argument
*
argument
)
override
{
return
true
;
}
bool
Initialize
(
Argument
*
argument
)
override
{
return
true
;
}
...
@@ -38,8 +43,10 @@ class TensorRTSubgraphNodeMarkPass : public DataFlowGraphPass {
...
@@ -38,8 +43,10 @@ class TensorRTSubgraphNodeMarkPass : public DataFlowGraphPass {
// sub-graph into TensorRT.
// sub-graph into TensorRT.
void
Run
(
DataFlowGraph
*
graph
)
override
;
void
Run
(
DataFlowGraph
*
graph
)
override
;
std
::
string
repr
()
const
{
return
"tensorrt-sub-subgraph-mark"
;
}
std
::
string
repr
()
const
override
{
return
"tensorrt-sub-subgraph-mark"
;
}
std
::
string
description
()
const
{
return
"tensorrt sub-graph mark pass"
;
}
std
::
string
description
()
const
override
{
return
"tensorrt sub-graph mark pass"
;
}
Pass
*
CreateGraphvizDebugerPass
()
const
override
;
Pass
*
CreateGraphvizDebugerPass
()
const
override
;
bool
Finalize
()
override
;
bool
Finalize
()
override
;
...
...
paddle/fluid/inference/analysis/tensorrt_subgraph_pass.h
浏览文件 @
aab47cc0
...
@@ -14,6 +14,7 @@ limitations under the License. */
...
@@ -14,6 +14,7 @@ limitations under the License. */
#pragma once
#pragma once
#include <string>
#include "paddle/fluid/inference/analysis/node.h"
#include "paddle/fluid/inference/analysis/node.h"
#include "paddle/fluid/inference/analysis/pass.h"
#include "paddle/fluid/inference/analysis/pass.h"
#include "paddle/fluid/inference/analysis/subgraph_splitter.h"
#include "paddle/fluid/inference/analysis/subgraph_splitter.h"
...
@@ -30,7 +31,7 @@ class TensorRTSubGraphPass : public DataFlowGraphPass {
...
@@ -30,7 +31,7 @@ class TensorRTSubGraphPass : public DataFlowGraphPass {
// Tell whether to transform a sub-graph into TensorRT.
// Tell whether to transform a sub-graph into TensorRT.
using
NodeInsideSubgraphTeller
=
SubGraphFuse
::
NodeInsideSubgraphTeller
;
using
NodeInsideSubgraphTeller
=
SubGraphFuse
::
NodeInsideSubgraphTeller
;
TensorRTSubGraphPass
(
const
NodeInsideSubgraphTeller
&
teller
);
explicit
TensorRTSubGraphPass
(
const
NodeInsideSubgraphTeller
&
teller
);
bool
Initialize
(
Argument
*
argument
)
override
{
return
true
;
}
bool
Initialize
(
Argument
*
argument
)
override
{
return
true
;
}
...
@@ -40,8 +41,8 @@ class TensorRTSubGraphPass : public DataFlowGraphPass {
...
@@ -40,8 +41,8 @@ class TensorRTSubGraphPass : public DataFlowGraphPass {
bool
Finalize
()
override
{
return
true
;
}
bool
Finalize
()
override
{
return
true
;
}
std
::
string
repr
()
const
{
return
"tensorrt-sub-graph"
;
}
std
::
string
repr
()
const
override
{
return
"tensorrt-sub-graph"
;
}
std
::
string
description
()
const
{
return
"tensorrt sub graph pass"
;
}
std
::
string
description
()
const
override
{
return
"tensorrt sub graph pass"
;
}
private:
private:
NodeInsideSubgraphTeller
node_inside_subgraph_teller_
;
NodeInsideSubgraphTeller
node_inside_subgraph_teller_
;
...
@@ -49,4 +50,4 @@ class TensorRTSubGraphPass : public DataFlowGraphPass {
...
@@ -49,4 +50,4 @@ class TensorRTSubGraphPass : public DataFlowGraphPass {
}
// namespace analysis
}
// namespace analysis
}
// namespace inference
}
// namespace inference
}
// paddle
}
//
namespace
paddle
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录