File tree 3 files changed +8
-6
lines changed
tensorflow/contrib/tensorrt 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,6 @@ tf_custom_op_library(
52
52
"ops/trt_engine_op.cc" ,
53
53
],
54
54
deps = [
55
- ":trt_engine_op_kernel" ,
56
55
":trt_shape_function" ,
57
56
"//tensorflow/core:lib_proto_parsing" ,
58
57
] + if_tensorrt ([
@@ -183,6 +182,7 @@ tf_py_wrap_cc(
183
182
copts = tf_copts (),
184
183
deps = [
185
184
":trt_conversion" ,
185
+ ":trt_engine_op_kernel" ,
186
186
"//tensorflow/core:framework_lite" ,
187
187
"//util/python:python_headers" ,
188
188
],
Original file line number Diff line number Diff line change @@ -19,6 +19,12 @@ limitations under the License.
19
19
namespace tensorflow {
20
20
namespace tensorrt {
21
21
22
+ std::shared_ptr<TRTResourceManager>
23
+ tensorflow::tensorrt::TRTResourceManager::instance () {
24
+ static std::shared_ptr<TRTResourceManager> instance_ (new TRTResourceManager);
25
+ return instance_;
26
+ }
27
+
22
28
std::shared_ptr<tensorflow::ResourceMgr>
23
29
tensorflow::tensorrt::TRTResourceManager::getManager (const string& op_name) {
24
30
// mutex is held for lookup only. Most instantiations where mutex will be held
Original file line number Diff line number Diff line change @@ -29,11 +29,7 @@ class TRTResourceManager {
29
29
TRTResourceManager () = default ;
30
30
31
31
public:
32
- static std::shared_ptr<TRTResourceManager> instance () {
33
- static std::shared_ptr<TRTResourceManager> instance_ (
34
- new TRTResourceManager);
35
- return instance_;
36
- }
32
+ static std::shared_ptr<TRTResourceManager> instance ();
37
33
// returns a manager for given op, if it doesn't exists it creates one
38
34
std::shared_ptr<tensorflow::ResourceMgr> getManager (const string& op_name);
39
35
You can’t perform that action at this time.
0 commit comments