| 163 | } // namespace |
| 164 | |
| 165 | xla::DebugOptions BuildXlaDebugOptions(const xla::DebugOptions& ref_options) { |
| 166 | static const bool options_passthrough = DebugOptionsPassThroughEnabled(); |
| 167 | if (options_passthrough) { |
| 168 | return ref_options; |
| 169 | } |
| 170 | xla::DebugOptions options = xla::GetDebugOptionsFromFlags(); |
| 171 | options.set_xla_dump_to(SafeDebugPath(ref_options.xla_dump_to())); |
| 172 | options.set_xla_dump_hlo_as_proto(ref_options.xla_dump_hlo_as_proto()); |
| 173 | options.set_xla_dump_hlo_as_text(ref_options.xla_dump_hlo_as_text()); |
| 174 | options.set_xla_dump_hlo_snapshots(ref_options.xla_dump_hlo_snapshots()); |
| 175 | options.set_xla_dump_hlo_pass_re(ref_options.xla_dump_hlo_pass_re()); |
| 176 | for (auto& pass : ref_options.xla_disable_hlo_passes()) { |
| 177 | options.add_xla_disable_hlo_passes(pass); |
| 178 | } |
| 179 | return options; |
| 180 | } |
| 181 | |
| 182 | xla::StatusOr<std::vector<InputCoords>> GetComputationInputs( |
| 183 | OpKernelContext* context, const char* input_name) { |
no test coverage detected