STT-tensorflow/tensorflow/compiler/mlir
Alexander Grund 956025aa53 Rename exec_tools to tools
Follow up to #43156
Based on
https://github.com/bazelbuild/bazel/issues/12059#issuecomment-725641997
exec_tools might no longer be needed and hence can be replaced by tools.
This fixes various build failures caused by missing environment
variables in environments where they are required, e.g. using custom
compilers.
2020-11-23 15:41:54 -08:00
..
g3doc [XLA/GPU] Sync the XLA/GPU -> MLIR doc. 2020-07-20 13:44:57 -07:00
hlo [mlir] Simplify DDR matching patterns with equal operands for operators. 2020-10-20 10:53:59 -07:00
lite Merge pull request #41790 from lgeiger:fix-matmul-fusion 2020-11-06 13:01:02 +00:00
python Rename filecheck-lib target to match style of other targets 2020-10-01 13:34:45 -07:00
tensorflow Merge pull request #41790 from lgeiger:fix-matmul-fusion 2020-11-06 13:01:02 +00:00
tfjs [mlir] Simplify DDR matching patterns with equal operands for operators. 2020-10-20 10:53:59 -07:00
tfr Rename exec_tools to tools 2020-11-23 15:41:54 -08:00
tools/kernel_gen [MLIR][KERNEL_GEN] Extend tf_framework.alloc to support input forwarding. 2020-10-21 07:12:32 -07:00
utils Add util for converting between llvm and absl view container objects (StringRef <-> string_view, {Mutable}ArrayRef <-> Span). 2020-08-27 10:50:48 -07:00
xla Fix TensorFlow ScatterNd op lowering to HLO 2020-10-21 15:47:51 -07:00
BUILD Add target environment constraints to more TensorFlow packages and targets. 2020-09-24 22:38:24 -07:00
glob_lit_test.bzl Introduce tfjs-opt test utility and remove TFJSDialect static registration 2020-08-24 11:28:39 -07:00
init_mlir.cc Print a TensorFlow URL instead of LLVM on crashes 2020-09-28 15:57:01 -07:00
init_mlir.h
mlir_graph_optimization_pass_registration.cc [TF:MLIR] Add generic MLIR pass registration mechanism. 2020-03-10 16:04:53 -07:00
mlir_graph_optimization_pass.cc Use explicit dialect registration in mlir_graph_optimization_pass.cc (NFC) 2020-08-24 10:28:51 -07:00
mlir_graph_optimization_pass.h Change comment of the external repo #include file origin. 2020-03-23 10:42:53 -07:00
op_or_arg_name_mapper.cc Update LegalizeNodeName to mutate inplace (NFC). 2020-08-27 10:24:14 -07:00
op_or_arg_name_mapper.h Add an interface to add separator before appending numbers in OpOrArgNameMapper. 2020-04-21 19:02:02 -07:00
README.md Add missing word 2020-10-05 16:10:24 -07:00
runlit.cfg.py cuda:fatbinary dependency causes licensing issues. 2020-10-07 00:44:03 -07:00
runlit.site.cfg.py [MLIR][KERNEL_GEN] Add TFFramework MLIR dialect. 2020-07-27 06:17:32 -07:00
tf_mlir_opt_main.cc Add mlir-hlo passes to tf-opt, this is required to reproduce entire TF->HLO bridge pipeline. 2020-09-21 16:48:22 -07:00
tf_mlir_translate_main.cc Remove the use of the global dialect registry in tf-mlir-translate (NFC) 2020-08-24 23:05:33 -07:00

MLIR dialects and utilities for TensorFlow, TensorFlow Lite and XLA.

This module contains the MLIR (Multi-Level Intermediate Representation) dialects and utilities for

  1. TensorFlow
  2. XLA
  3. TF Lite

See MLIR's website for complete documentation.

Getting started

Building dialects and utilities here follow the standard approach using bazel as the rest of TensorFlow.

Using local LLVM repo

To develop across MLIR core and TensorFlow, it is useful to override the repo to use a local version instead of fetching from head. This can be achieved as below but note, the BUILD files are not automatically generated from or CMake used, so if your change requires a BUILD file change (or you are using a different version of LLVM than set in tensorflow/workspace.bzl's LLVM_COMMIT) then manual BUILD file changes may be required.

LLVM_SRC=...

# Create basic workspace file
echo 'workspace(name = "llvm-project")' > $LLVM_SRC/WORKSPACE
# and copy over the bazel BUILD files.
cp third_party/llvm/llvm.autogenerated.BUILD $LLVM_SRC/llvm/BUILD
cp third_party/mlir/BUILD $LLVM_SRC/mlir
cp third_party/mlir/test.BUILD $LLVM_SRC/mlir/test/BUILD

bazel build --override_repository=llvm-project=$LLVM_SRC \
  -c opt tensorflow/compiler/mlir:tf-opt