File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed
paddle/fluid/inference/analysis Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 16
16
* This file defines TensorRTSubgraphNodeMarkPass which helps to mark the ops
17
17
* that supported by TensorRT engine.
18
18
*/
19
+
20
+ #pragma once
21
+
22
+ #include < string>
19
23
#include " paddle/fluid/inference/analysis/pass.h"
20
24
#include " paddle/fluid/inference/analysis/subgraph_splitter.h"
21
25
@@ -30,16 +34,19 @@ class TensorRTSubgraphNodeMarkPass : public DataFlowGraphPass {
30
34
public:
31
35
using teller_t = SubGraphSplitter::NodeInsideSubgraphTeller;
32
36
33
- TensorRTSubgraphNodeMarkPass (const teller_t & teller) : teller_(teller) {}
37
+ explicit TensorRTSubgraphNodeMarkPass (const teller_t & teller)
38
+ : teller_(teller) {}
34
39
35
40
bool Initialize (Argument* argument) override { return true ; }
36
41
37
42
// This class get a sub-graph as input and determine whether to transform this
38
43
// sub-graph into TensorRT.
39
44
void Run (DataFlowGraph* graph) override ;
40
45
41
- std::string repr () const { return " tensorrt-sub-subgraph-mark" ; }
42
- std::string description () const { return " tensorrt sub-graph mark pass" ; }
46
+ std::string repr () const override { return " tensorrt-sub-subgraph-mark" ; }
47
+ std::string description () const override {
48
+ return " tensorrt sub-graph mark pass" ;
49
+ }
43
50
44
51
Pass* CreateGraphvizDebugerPass () const override ;
45
52
bool Finalize () override ;
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ limitations under the License. */
14
14
15
15
#pragma once
16
16
17
+ #include < string>
17
18
#include " paddle/fluid/inference/analysis/node.h"
18
19
#include " paddle/fluid/inference/analysis/pass.h"
19
20
#include " paddle/fluid/inference/analysis/subgraph_splitter.h"
@@ -30,7 +31,7 @@ class TensorRTSubGraphPass : public DataFlowGraphPass {
30
31
// Tell whether to transform a sub-graph into TensorRT.
31
32
using NodeInsideSubgraphTeller = SubGraphFuse::NodeInsideSubgraphTeller;
32
33
33
- TensorRTSubGraphPass (const NodeInsideSubgraphTeller& teller);
34
+ explicit TensorRTSubGraphPass (const NodeInsideSubgraphTeller& teller);
34
35
35
36
bool Initialize (Argument* argument) override { return true ; }
36
37
@@ -40,13 +41,13 @@ class TensorRTSubGraphPass : public DataFlowGraphPass {
40
41
41
42
bool Finalize () override { return true ; }
42
43
43
- std::string repr () const { return " tensorrt-sub-graph" ; }
44
- std::string description () const { return " tensorrt sub graph pass" ; }
44
+ std::string repr () const override { return " tensorrt-sub-graph" ; }
45
+ std::string description () const override { return " tensorrt sub graph pass" ; }
45
46
46
47
private:
47
48
NodeInsideSubgraphTeller node_inside_subgraph_teller_;
48
49
};
49
50
50
51
} // namespace analysis
51
52
} // namespace inference
52
- } // paddle
53
+ } // namespace paddle
You can’t perform that action at this time.
0 commit comments