Commit Graph

10 Commits

Author SHA1 Message Date
Sanjoy Das
65cd482a27 Teach the HLO bisect utility to run a script when testing for a bug
We also remove the Crash BugKind: it was unimplemented and can be trivially
implemented using the script BugKind.

I also made some minor adjustments:

 - Add two CHECKs to ensure that we do not "lose" the bug in
   TrimComputationByOutputs and TrimComputationByInstructions.

 - Fix a typo.

PiperOrigin-RevId: 260181098
2019-07-26 11:45:19 -07:00
Justin Lebar
39587aaeb7 [XLA] Rework debug flags for dumping HLO.
The following flags (usually passed via the XLA_FLAGS envvar) are removed:

  xla_dump_computations_to
  xla_dump_executions_to
  xla_dump_ir_to
  xla_dump_optimized_hlo_proto_to
  xla_dump_per_pass_hlo_proto_to
  xla_dump_unoptimized_hlo_proto_to
  xla_generate_hlo_graph
  xla_generate_hlo_text_to
  xla_hlo_dump_as_html
  xla_hlo_graph_path
  xla_log_hlo_text

The following new flags are added:

  xla_dump_to
  xla_dump_hlo_module_re
  xla_dump_hlo_pass_re
  xla_dump_hlo_as_text
  xla_dump_hlo_as_proto
  xla_dump_hlo_as_dot
  xla_dump_hlo_as_url
  xla_dump_hlo_as_html
  xla_dump_ir
  xla_dump_hlo_snapshots

The default is not to dump anything at all, but as soon as some dumping flag is
specified, we enable the following defaults (most of which can be overridden).

 * dump to stdout (overridden by --xla_dump_to)
 * dump HLO modules at the very beginning and end of the optimization pipeline
 * don't dump between any HLO passes (overridden by --xla_dump_hlo_pass_re)
 * dump all HLO modules (overridden by --xla_dump_hlo_module_re)
 * dump in textual format (overridden by
   --xla_dump_hlo_as_{text,proto,dot,url,html}).

For example, to dump optimized and unoptimized HLO text and protos to /tmp/foo,
pass

  --xla_dump_to=/tmp/foo --xla_dump_hlo_as_text --xla_dump_hlo_as_proto

For details on these flags' meanings, see xla.proto.

The intent of this change is to make dumping both simpler to use and more
powerful.

For example:

 * Previously there was no way to dump the HLO module during the pass pipeline
   in HLO text format; the only option was --dump_per_pass_hlo_proto_to, which
   dumped in proto format.

   Now this is --xla_dump_pass_re=.* --xla_dump_hlo_as_text.  (In fact, the
   second flag is not necessary in this case, as dumping as text is the
   default.)

 * Previously there was no way to dump HLO as a graph before and after
   compilation; the only option was --xla_generate_hlo_graph, which would dump
   before/after every pass.

   Now this is --xla_dump_hlo_as_{dot,url,html} (depending on what format you
   want the graph in).

 * Previously, there was no coordination between the filenames written by the
   various flags, so info about one module might be dumped with various
   filename prefixes.  Now the filenames are consistent and all dumps from a
   particular module are next to each other.

If you only specify some of these flags, we try to figure out what you wanted.
For example:

 * --xla_dump_to implies --xla_dump_hlo_as_text unless you specify some
   other --xla_dump_as_* flag.

 * --xla_dump_hlo_as_text or --xla_dump_ir implies dumping to stdout unless you
   specify a different --xla_dump_to directory.  You can explicitly dump to
   stdout with --xla_dump_to=-.

As part of this change, I simplified the debugging code in the HLO passes for
dumping HLO modules.  Previously, many tests explicitly VLOG'ed the HLO module
before, after, and sometimes during the pass.  I removed these VLOGs.  If you
want dumps before/during/after an HLO pass, use --xla_dump_pass_re=<pass_name>.

PiperOrigin-RevId: 237920279
2019-03-11 17:35:39 -07:00
Peter Hawkins
c1e50881f3 [XLA] Avoid undefined behavior in absl::bit_cast with Eigen::half.
[XLA] [TF] Fix more compile warnings in Mac OS OSS build.

PiperOrigin-RevId: 223035708
2018-11-27 12:29:49 -08:00
Chris Leary
1831ef73ba [XLA] Add hook for dump directory expansion.
Also puts a ".unoptimized" suffix on dumped HLO protobuf files
to avoid the unoptimized dumped HLO protobuf colliding with the
optimized dumped HLO protobufs when the same dump directory is
specified for both.

PiperOrigin-RevId: 212914100
2018-09-13 18:38:09 -07:00
A. Unique TensorFlower
5c24b8b1e5 XLA refactoring
PiperOrigin-RevId: 172891551
2017-10-20 09:25:19 -07:00
Mark Heffernan
5dd569cf02 Make the HLO proto representation (hlo.proto) full fidelity. Hlo modules can be serialized to HLO protos and deserialized without any information loss.
As part of this change, a bug is fixed in NameUniquer. Previously, passing names with numeric suffixes could result in name collisions.

PiperOrigin-RevId: 172161360
2017-10-13 16:29:20 -07:00
A. Unique TensorFlower
9bdeea9b56 Fix protobuf_util build failure in open source.
PiperOrigin-RevId: 157265680
2017-05-26 14:48:15 -07:00
A. Unique TensorFlower
7b401106a4 [XLA:HLO] Add buffer aliases to BufferAssignmentProto serialization.
Also add ".json" suffix to saved data files.

PiperOrigin-RevId: 157236140
2017-05-26 10:40:29 -07:00
A. Unique TensorFlower
3e767e9db0 Add debug protos that serialize HLO graph information.
Also add flags to dump this data in JSON format, for each backend.
This is useful for upcoming debugging tools.

PiperOrigin-RevId: 157178357
2017-05-25 18:22:34 -07:00
Peter Hawkins
1e67c90e2c Initial open-source release of XLA: Accelerated Linear Algebra.
XLA is a compiler-based linear algebra execution engine that targets CPUs, GPUs and custom accelerators.

XLA is still experimental; we are releasing it early to get the community involved.
Change: 143990941
2017-01-09 12:26:35 -08:00