diff options
author | Mark Heffernan <meheff@google.com> | 2017-10-27 18:11:01 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-10-27 18:14:31 -0700 |
commit | 45c5118f0e924c1b2212dc97ad535c35891c66b0 (patch) | |
tree | ed553590a69f525c28dd433ff54e9e17c3c27dac /tensorflow/compiler/xla/service/hlo_runner.cc | |
parent | 09a89ae57d92b9753c76fa298d373468cb05cc6a (diff) |
When creating an HloModule from an HloProto construct the HloModuleConfig
with a correct ProgramShape which matches the shapes of the entry computation.
Previously the module config had a bogus or default constructed ProgramShape.
PiperOrigin-RevId: 173741104
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_runner.cc')
-rw-r--r-- | tensorflow/compiler/xla/service/hlo_runner.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_runner.cc b/tensorflow/compiler/xla/service/hlo_runner.cc index 9fdda38d2d..c3f74e253f 100644 --- a/tensorflow/compiler/xla/service/hlo_runner.cc +++ b/tensorflow/compiler/xla/service/hlo_runner.cc @@ -45,11 +45,12 @@ HloRunner::ReadModuleFromHloProtoFile(const char* filename, HloProto proto; TF_RETURN_IF_ERROR(tensorflow::ReadBinaryProto(tensorflow::Env::Default(), filename, &proto)); - HloModuleConfig config; + TF_ASSIGN_OR_RETURN( + HloModuleConfig config, + HloModule::CreateModuleConfigFromProto(proto.hlo_module())); config.set_debug_options(debug_options); - TF_ASSIGN_OR_RETURN(auto module, HloModule::CreateFromProto( - proto.hlo_module(), - VersionedComputationHandle(), config)); + TF_ASSIGN_OR_RETURN(auto module, + HloModule::CreateFromProto(proto.hlo_module(), config)); return std::move(module); } |