diff options
author | 2018-05-30 22:03:16 -0700 | |
---|---|---|
committer | 2018-05-30 22:06:00 -0700 | |
commit | ca4bda919793cc2578e5c0f7440525261da16fdf (patch) | |
tree | 43ab529ccaddafcc5eed0323e77f75795b9f2321 /tensorflow/compiler/xla/service/compile_only_service.cc | |
parent | 52a21f5df5ba0c7eeae91e4f818a6f2b989734cb (diff) |
[XLA] Redesign: delete the old service interface.
- Computation
- ComputeConstant
- Execute
- ExecuteAsync
- ExecuteParallel
- GetComputationStats
- GetComputationShape
- GetLocalShape
- IsConstant
- LoadComputationSnapshot
- Op
- SetReturnValue
- SnapshotComputation
PiperOrigin-RevId: 198669035
Diffstat (limited to 'tensorflow/compiler/xla/service/compile_only_service.cc')
-rw-r--r-- | tensorflow/compiler/xla/service/compile_only_service.cc | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/tensorflow/compiler/xla/service/compile_only_service.cc b/tensorflow/compiler/xla/service/compile_only_service.cc index d39fd7307a..c2e698a49f 100644 --- a/tensorflow/compiler/xla/service/compile_only_service.cc +++ b/tensorflow/compiler/xla/service/compile_only_service.cc @@ -104,56 +104,4 @@ CompileOnlyService::CompileAheadOfTime( return compiler_->CompileAheadOfTime(std::move(hlo_modules), options); } -StatusOr<std::vector<std::unique_ptr<AotCompilationResult>>> -CompileOnlyService::CompileAheadOfTime( - const tensorflow::gtl::ArraySlice<AotComputationInstance> computations, - const AotCompilationOptions& options) { - std::vector<std::unique_ptr<HloModule>> hlo_modules; - for (const AotComputationInstance& instance : computations) { - TF_ASSIGN_OR_RETURN(UserComputation * user_computation, - computation_tracker_.Resolve(instance.computation)); - VersionedComputationHandle versioned_handle = - user_computation->GetVersionedHandle(); - - const DebugOptions& debug_options = options.debug_options(); - - // Dump computation proto state if flag is set. - const string& directory_path = debug_options.xla_dump_computations_to(); - if (!directory_path.empty()) { - TF_ASSIGN_OR_RETURN( - std::unique_ptr<SessionModule> session_module, - computation_tracker_.SnapshotComputation(versioned_handle.handle)); - string filename = tensorflow::strings::StrCat( - "computation_", versioned_handle.handle.handle(), "__", - session_module->entry().name(), "__version_", - versioned_handle.version); - const string& per_host_path = tensorflow::io::JoinPath( - directory_path, tensorflow::port::Hostname()); - - TF_RETURN_IF_ERROR(Executable::DumpToDirectory(per_host_path, filename, - *session_module)); - } - - TF_ASSIGN_OR_RETURN( - std::shared_ptr<const ProgramShape> program_shape, - user_computation->ComputeProgramShape(versioned_handle.version)); - - ExecutionOptions execution_options; - *execution_options.mutable_debug_options() = debug_options; - TF_ASSIGN_OR_RETURN( - std::unique_ptr<HloModuleConfig> module_config, - CreateModuleConfig(*program_shape, instance.argument_layouts, - &execution_options, user_computation)); - - TF_ASSIGN_OR_RETURN(std::unique_ptr<HloModule> hlo_module, - computation_tracker_.BuildHloModule( - versioned_handle, *module_config, - /*include_unreachable_instructions=*/true)); - TF_RETURN_IF_ERROR(MaybeDumpHloModule(*hlo_module)); - hlo_modules.push_back(std::move(hlo_module)); - } - - return compiler_->CompileAheadOfTime(std::move(hlo_modules), options); -} - } // namespace xla |