Skip to content

Commit 690b8e8

Browse files
authored
Merge pull request tensorflow#18499 from samikama/PR18444_cherrypick
Cherry-picking PR tensorflow#18444 into r1.8
2 parents 3970b47 + a6bc4af commit 690b8e8

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

tensorflow/contrib/tensorrt/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ tf_custom_op_library(
5252
"ops/trt_engine_op.cc",
5353
],
5454
deps = [
55-
":trt_engine_op_kernel",
5655
":trt_shape_function",
5756
"//tensorflow/core:lib_proto_parsing",
5857
] + if_tensorrt([
@@ -183,6 +182,7 @@ tf_py_wrap_cc(
183182
copts = tf_copts(),
184183
deps = [
185184
":trt_conversion",
185+
":trt_engine_op_kernel",
186186
"//tensorflow/core:framework_lite",
187187
"//util/python:python_headers",
188188
],

tensorflow/contrib/tensorrt/resources/trt_resource_manager.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ limitations under the License.
1919
namespace tensorflow {
2020
namespace tensorrt {
2121

22+
std::shared_ptr<TRTResourceManager>
23+
tensorflow::tensorrt::TRTResourceManager::instance() {
24+
static std::shared_ptr<TRTResourceManager> instance_(new TRTResourceManager);
25+
return instance_;
26+
}
27+
2228
std::shared_ptr<tensorflow::ResourceMgr>
2329
tensorflow::tensorrt::TRTResourceManager::getManager(const string& op_name) {
2430
// mutex is held for lookup only. Most instantiations where mutex will be held

tensorflow/contrib/tensorrt/resources/trt_resource_manager.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@ class TRTResourceManager {
2929
TRTResourceManager() = default;
3030

3131
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();
3733
// returns a manager for given op, if it doesn't exists it creates one
3834
std::shared_ptr<tensorflow::ResourceMgr> getManager(const string& op_name);
3935

0 commit comments

Comments
 (0)