diff --git a/tensorflow/core/common_runtime/eager/mkl_eager_op_rewrite_test.cc b/tensorflow/core/common_runtime/eager/mkl_eager_op_rewrite_test.cc index b01646b749890f..057fabdec12783 100644 --- a/tensorflow/core/common_runtime/eager/mkl_eager_op_rewrite_test.cc +++ b/tensorflow/core/common_runtime/eager/mkl_eager_op_rewrite_test.cc @@ -38,12 +38,13 @@ class EagerOpRewriteTest : public ::testing::Test { std::make_unique(DeviceFactory::NewDevice( "CPU", {}, "/job:localhost/replica:0/task:0/device:CPU:0")); bool async = false; - tensorflow::Rendezvous* rendezvous = - new tensorflow::IntraProcessRendezvous(device_mgr.get()); + auto rendezvous = + tsl::core::RefCountPtr( + new tensorflow::IntraProcessRendezvous(device_mgr.get())); eager_ctx_ = new tensorflow::EagerContext( SessionOptions(), tensorflow::ContextDevicePlacementPolicy::DEVICE_PLACEMENT_SILENT, - async, device_mgr.get(), false, rendezvous, nullptr, nullptr, + async, device_mgr.get(), false, std::move(rendezvous), nullptr, nullptr, /*run_eager_op_as_function=*/true); EagerExecutor executor_(false);