未验证 提交 1aaea1ff 编写于 作者: G Goldie Gadde 提交者: GitHub

Merge pull request #37362 from lgeiger/r2.2-split-unroll-bn-pass

[r2.2:Cherryppick] Split unroll_batch_matmul pass into own build target
......@@ -325,8 +325,8 @@ cc_library(
"//tensorflow/compiler/mlir/tensorflow",
"//tensorflow/compiler/mlir/tensorflow:convert_tensor",
"//tensorflow/compiler/mlir/tensorflow:mangling_util",
"//tensorflow/compiler/mlir/tensorflow:tensorflow_passes",
"//tensorflow/compiler/mlir/tensorflow:tensorflow_types",
"//tensorflow/compiler/mlir/tensorflow:unroll_batch_matmul_pass",
"//tensorflow/compiler/xla:status",
"//tensorflow/compiler/xla:statusor",
"//tensorflow/core:framework",
......
......@@ -264,6 +264,27 @@ cc_library(
],
)
cc_library(
name = "unroll_batch_matmul_pass",
srcs = [
"transforms/unroll_batch_matmul.cc",
],
hdrs = [
"transforms/unroll_batch_matmul.h",
],
deps = [
":tensorflow",
"//tensorflow/core:framework",
"@com_google_absl//absl/memory",
"@llvm-project//llvm:support",
"@llvm-project//mlir:Analysis",
"@llvm-project//mlir:IR",
"@llvm-project//mlir:Pass",
"@llvm-project//mlir:StandardOps",
"@llvm-project//mlir:Support",
],
)
cc_library(
name = "tensorflow_passes",
srcs = [
......@@ -308,7 +329,6 @@ cc_library(
"transforms/tpu_rewrite_pass.cc",
"transforms/tpu_sharding_identification_pass.cc",
"transforms/tpu_variable_runtime_reformatting.cc",
"transforms/unroll_batch_matmul.cc",
"translate/breakup-islands.cc",
"translate/control_to_executor_dialect.cc",
"translate/executor_to_control_dialect.cc",
......@@ -318,7 +338,6 @@ cc_library(
"transforms/bridge.h",
"transforms/passes.h",
"transforms/shape_inference.h",
"transforms/unroll_batch_matmul.h",
],
includes = ["include"],
deps = [
......@@ -337,6 +356,7 @@ cc_library(
":tensorflow_types",
":tpu_rewrite_device_util",
":translate_utils",
":unroll_batch_matmul_pass",
"//tensorflow/compiler/mlir/lite:validators",
"//tensorflow/compiler/xla:xla_data_proto_cc",
"//tensorflow/compiler/xla:xla_proto_cc",
......@@ -348,14 +368,12 @@ cc_library(
"//tensorflow/core/platform:random",
"//tensorflow/core/protobuf/tpu:compile_metadata_proto_cc",
"//tensorflow/core/protobuf/tpu:dynamic_padding_proto_cc",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings",
"@llvm-project//llvm:support",
"@llvm-project//mlir:Analysis",
"@llvm-project//mlir:IR",
"@llvm-project//mlir:Parser",
"@llvm-project//mlir:Pass",
"@llvm-project//mlir:QuantOps",
"@llvm-project//mlir:StandardOps",
"@llvm-project//mlir:Support",
"@llvm-project//mlir:TransformUtils",
......
......@@ -25,8 +25,6 @@ limitations under the License.
#include "llvm/Support/Casting.h"
#include "llvm/Support/Debug.h"
#include "mlir/Analysis/LoopAnalysis.h" // TF:llvm-project
#include "mlir/Dialect/QuantOps/FakeQuantSupport.h" // TF:llvm-project
#include "mlir/Dialect/QuantOps/UniformSupport.h" // TF:llvm-project
#include "mlir/Dialect/StandardOps/IR/Ops.h" // TF:llvm-project
#include "mlir/IR/Attributes.h" // TF:llvm-project
#include "mlir/IR/OpImplementation.h" // TF:llvm-project
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册