MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / CompileExecutable

Function CompileExecutable

tensorflow/compiler/xla/tools/replay_computation.cc:114–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112};
113
114StatusOr<std::unique_ptr<LocalExecutable>> CompileExecutable(
115 const HloSnapshot& module, LocalClient* client) {
116 XlaComputation computation(module.hlo().hlo_module());
117 std::vector<Shape> argument_layouts;
118 argument_layouts.reserve(
119 computation.proto().host_program_shape().parameters_size());
120 std::vector<const Shape*> argument_layout_ptrs;
121 for (const ShapeProto& param :
122 computation.proto().host_program_shape().parameters()) {
123 argument_layouts.push_back(Shape(param));
124 argument_layout_ptrs.push_back(&argument_layouts.back());
125 }
126 ExecutableBuildOptions exec_build_options;
127 *exec_build_options.mutable_debug_options() = GetDebugOptionsFromFlags();
128 TF_ASSIGN_OR_RETURN(
129 auto executables,
130 client->Compile(computation, argument_layout_ptrs, exec_build_options));
131 TF_RET_CHECK(executables.size() == 1);
132 return std::move(executables[0]);
133}
134
135absl::optional<Shape> GetXfeedShape(bool is_infeed,
136 const HloModuleProto& module,

Callers 1

RealMainFunction · 0.85

Calls 10

GetDebugOptionsFromFlagsFunction · 0.85
parameters_sizeMethod · 0.80
protoMethod · 0.80
ShapeFunction · 0.50
reserveMethod · 0.45
parametersMethod · 0.45
push_backMethod · 0.45
backMethod · 0.45
mutable_debug_optionsMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected