diff --git a/xla/service/hlo_runner_pjrt.cc b/xla/service/hlo_runner_pjrt.cc index 3965bf61870f3a..66b64492d32c35 100644 --- a/xla/service/hlo_runner_pjrt.cc +++ b/xla/service/hlo_runner_pjrt.cc @@ -125,11 +125,11 @@ class PjRtWrappedExecutable : public Executable { HloExecutionProfile* hlo_execution_profile) override; PjRtLoadedExecutable* GetPjRtLoadedExecutable() const { - return pjrt_loaded_executable_; + return pjrt_loaded_executable_.get(); } private: - PjRtLoadedExecutable* pjrt_loaded_executable_; + std::unique_ptr pjrt_loaded_executable_; }; absl::StatusOr PjRtWrappedExecutable::ExecuteAsyncOnStream( @@ -373,9 +373,7 @@ absl::StatusOr> HloRunnerPjRt::CreateExecutable( std::move(pjrt_executable->GetHloModules().value()[0])), pjrt_executable.release()); - std::unique_ptr exec = - static_cast>(executable.release()); - return exec; + return executable; } absl::StatusOr> HloRunnerPjRt::ExecuteReplicated(