Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hlo_runner_pjrt: Have PjRtWrappedExecutable own the underlying executable. #17724

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions xla/service/hlo_runner_pjrt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<PjRtLoadedExecutable> pjrt_loaded_executable_;
};

absl::StatusOr<ExecutionOutput> PjRtWrappedExecutable::ExecuteAsyncOnStream(
Expand Down Expand Up @@ -373,9 +373,7 @@ absl::StatusOr<std::unique_ptr<Executable>> HloRunnerPjRt::CreateExecutable(
std::move(pjrt_executable->GetHloModules().value()[0])),
pjrt_executable.release());

std::unique_ptr<Executable> exec =
static_cast<std::unique_ptr<Executable>>(executable.release());
return exec;
return executable;
}

absl::StatusOr<std::vector<Literal>> HloRunnerPjRt::ExecuteReplicated(
Expand Down
Loading