From fcad3004bc40e1141ec9cdc1f5a0f330c9cbac91 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Wed, 24 Jun 2020 10:33:26 -0700 Subject: [PATCH] Add a method to PyClient returning std::shared_ptr. PiperOrigin-RevId: 318092346 Change-Id: Ic5cdbc20a270f7a2c62eebbd47a2a0591f4d7c46 --- tensorflow/compiler/xla/python/py_client.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tensorflow/compiler/xla/python/py_client.h b/tensorflow/compiler/xla/python/py_client.h index c94a206a926..be61bd74419 100644 --- a/tensorflow/compiler/xla/python/py_client.h +++ b/tensorflow/compiler/xla/python/py_client.h @@ -91,6 +91,7 @@ class PyClient : public std::enable_shared_from_this { explicit PyClient(std::shared_ptr pjrt_client); PjRtClient* pjrt_client() const { return pjrt_client_.get(); } + std::shared_ptr shared_pjrt_client() { return pjrt_client_; } const std::string& platform_name() const { return pjrt_client_->platform_name();