STT-tensorflow/tensorflow/python/compiler/mlir/BUILD
Andy Ly ba167d161e Add python wrapper mlir.experimental.convert_function for importing ConcreteFunctions into TF MLIR.
This takes a ConcreteFunction, collects a FunctionDef for the function and an associated FunctionDefLibrary, and imports the FunctionDef and FunctionDefLibrary via `ConvertFunctionToMlir`.
Control rets/target nodes of the entry function are also now supported in `ConvertFunctionToMlir`.

PiperOrigin-RevId: 331195841
Change-Id: Ib3a7264e90ca303ab7a850bf18c8d5e330063a4f
2020-09-11 12:21:46 -07:00

32 lines
730 B
Python

load("//tensorflow:tensorflow.bzl", "py_test")
package(
default_visibility = ["//visibility:public"],
licenses = ["notice"], # Apache 2.0
)
py_library(
name = "mlir",
srcs = ["mlir.py"],
srcs_version = "PY2AND3",
deps = [
"//tensorflow/python:pywrap_mlir",
"//tensorflow/python:tf_export",
],
)
py_test(
name = "mlir_test",
srcs = ["mlir_test.py"],
python_version = "PY3",
deps = [
":mlir",
"//tensorflow/python:client_testlib",
"//tensorflow/python:dtypes",
"//tensorflow/python:errors",
"//tensorflow/python:logging_ops",
"//tensorflow/python:tensor_spec",
"//tensorflow/python/eager:def_function",
],
)