STT-tensorflow/tensorflow/compiler/mlir
Christian Sigg 7d8e31edb0 Use mlir::OpState::operator->() to get to methods of mlir::Operation.
This is a preparation step to remove those methods from OpState.

PiperOrigin-RevId: 348642408
Change-Id: I2982f5516216e4956b1d0f7023445ef7622a545a
2020-12-22 09:05:23 -08:00
..
g3doc Op documentation update. 2020-12-17 18:34:48 -08:00
hlo Prepare to remove tensor_load and tensor_store special handling from hlo to lhlo legalization. 2020-12-22 06:34:18 -08:00
lite Integrate LLVM at llvm/llvm-project@1b97cdf885 2020-12-21 23:55:25 -08:00
python Integrate LLVM at llvm/llvm-project@1b97cdf885 2020-12-21 23:55:25 -08:00
tensorflow Use mlir::OpState::operator->() to get to methods of mlir::Operation. 2020-12-22 09:05:23 -08:00
tfjs Split out dialect hooks into separate targets 2020-12-14 12:04:38 -08:00
tfr Integrate LLVM at llvm/llvm-project@1b97cdf885 2020-12-21 23:55:25 -08:00
tools/kernel_gen Move the lowering to final gpu IR passes over to kernel generator and clean them up a bit. 2020-12-22 04:47:42 -08:00
tosa NFC: Simplify Tosa build and layering. 2020-12-11 18:35:42 -08:00
utils Support nested CallSiteLoc's when generating names from Location. 2020-11-17 18:50:20 -08:00
xla Integrate LLVM at llvm/llvm-project@1b97cdf885 2020-12-21 23:55:25 -08:00
BUILD Split out dialect hooks into separate targets 2020-12-14 12:04:38 -08: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 Add InitMlir class to initialize using TF's InitMain and InitLLVM 2019-08-20 11:11:10 -07:00
mlir_bridge_rollout_policy.cc Pass tensorflow::Graph into GetMlirBridgeRolloutPolicy 2020-11-09 17:37:45 -08:00
mlir_bridge_rollout_policy.h Pass tensorflow::Graph into GetMlirBridgeRolloutPolicy 2020-11-09 17:37:45 -08:00
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_test.cc Fixing Windows build. 2020-11-12 10:11:48 -08:00
mlir_graph_optimization_pass.cc Import shapes from attributes for tf.IteratorGetNext, tf.IteratorGetNextSync, tf.MultiDeviceIteratorGetNextFromShard, tf.InfeedDequeueTuple, and tf.InfeedDequeue when shape inference on import is not enabled, and disable shape inference on import in MlirFunctionOptimizationPass. 2020-12-04 10:02:53 -08:00
mlir_graph_optimization_pass.h [mlir][NFC] Replace usages of Function.h and Module.h with BuiltinOps.h 2020-12-01 13:23:48 -08:00
op_or_arg_name_mapper.cc Fix comment typo. 2020-11-13 10:35:52 -08: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 Integrate LLVM at llvm/llvm-project@26750a1264 2020-10-26 15:24:20 -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 Migrate TF MLIR shape inference pass to use declarative pass registration instead of manually defined pass registration (NFC). 2020-12-14 11:34:31 -08:00
tf_mlir_translate_main.cc Add the entry point for SavedModelSignatureDefImporterLite in tf-mlir-translate 2020-11-05 16:23:20 -08: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