aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/hlo_runner.cc
diff options
context:
space:
mode:
authorGravatar Mark Heffernan <meheff@google.com>2017-10-27 18:11:01 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-10-27 18:14:31 -0700
commit45c5118f0e924c1b2212dc97ad535c35891c66b0 (patch)
treeed553590a69f525c28dd433ff54e9e17c3c27dac /tensorflow/compiler/xla/service/hlo_runner.cc
parent09a89ae57d92b9753c76fa298d373468cb05cc6a (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.cc9
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);
}