Add graph decompose pass to expand composite op if it was illegal in the tf

dialect

The pass is registered globally and only invoked when the op was not
registered. If the composition of the op is available, the original op will be
expanded.

PiperOrigin-RevId: 336921199
Change-Id: Ie2d509a1a565c04844e73f00b991942208db8e88
This commit is contained in:
Feng Liu 2020-10-13 11:40:35 -07:00 committed by TensorFlower Gardener
parent 9031396802
commit 716e817347
4 changed files with 3 additions and 6 deletions

View File

@ -218,6 +218,7 @@ tf_cuda_library(
"//tensorflow/core/distributed_runtime:server_lib",
"//tensorflow/core/kernels:logging_ops",
"//tensorflow/compiler/mlir/tfr:node_expansion_pass",
"//tensorflow/compiler/mlir/tfr:graph_decompose_pass",
],
}),
alwayslink = 1,

View File

@ -231,10 +231,6 @@ tf_py_test(
srcs = ["integration/graph_decompose_test.py"],
data = ["//tensorflow/compiler/mlir/tfr/resources:decomposition_lib"],
python_version = "PY3",
tags = [
"no_oss",
"notap",
],
deps = [
"//tensorflow/compiler/mlir/tfr/resources:composite_ops",
"//tensorflow/python/eager:def_function",

View File

@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for third_party.tensorflow.compiler.mlir.tfr.integrattion.graph_decompose."""
"""Tests for tensorflow.compiler.mlir.tfr.integrattion.graph_decompose."""
from __future__ import absolute_import
from __future__ import division

View File

@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for third_party.tensorflow.compiler.mlir.tfr.integrattion.graph_decompose."""
"""Tests for tensorflow.compiler.mlir.tfr.integrattion.node_expansion."""
from __future__ import absolute_import
from __future__ import division