[XLA] Add a xla::Executable constructor without HLO profile related arguments, to prepare for removing those later.

PiperOrigin-RevId: 340301643
Change-Id: I848bd9b200ee71a2e5bc1ca54df72c8b01bb6562
This commit is contained in:
Ce Zheng 2020-11-02 13:18:57 -08:00 committed by TensorFlower Gardener
parent 592947d1a6
commit 17947a6611
4 changed files with 8 additions and 10 deletions

View File

@ -232,6 +232,10 @@ class ExecutionOutput {
// interface that is used for launching compiled programs across platforms.
class Executable {
public:
explicit Executable(std::shared_ptr<HloModule> hlo_module)
: hlo_module_(std::move(hlo_module)) {}
// TODO(b/172012028): Remove this constructor.
explicit Executable(
std::shared_ptr<HloModule> hlo_module,
std::unique_ptr<HloProfilePrinterData> hlo_profile_printer_data,

View File

@ -88,7 +88,7 @@ class TpuExecutable : public TpuExecutableInterface {
public:
TpuExecutable(SE_Executable* se_executable,
std::shared_ptr<HloModule> hlo_module)
: TpuExecutableInterface(std::move(hlo_module), nullptr, nullptr),
: TpuExecutableInterface(std::move(hlo_module)),
se_executable_(se_executable) {}
~TpuExecutable() override {

View File

@ -30,9 +30,7 @@ namespace xla {
TpuExecutable::TpuExecutable(const XLA_TpuProgram* core_program,
std::unique_ptr<HloModule> hlo_module,
HostCommandHandler host_command_handler)
: TpuExecutableInterface(std::move(hlo_module),
/*hlo_profile_printer_data=*/nullptr,
/*hlo_profile_index_map=*/nullptr),
: TpuExecutableInterface(std::move(hlo_module)),
core_program_(core_program),
host_command_handler_(std::move(host_command_handler)) {}

View File

@ -40,12 +40,8 @@ namespace xla {
// An executable capable of being fed to a TPU device.
class TpuExecutableInterface : public Executable {
public:
explicit TpuExecutableInterface(
std::shared_ptr<HloModule> hlo_module,
std::unique_ptr<HloProfilePrinterData> hlo_profile_printer_data,
std::unique_ptr<HloProfileIndexMap> hlo_profile_index_map)
: Executable(std::move(hlo_module), std::move(hlo_profile_printer_data),
std::move(hlo_profile_index_map)) {}
explicit TpuExecutableInterface(std::shared_ptr<HloModule> hlo_module)
: Executable(std::move(hlo_module)) {}
~TpuExecutableInterface() override = default;
StatusOr<ExecutionOutput> ExecuteAsyncOnStream(