Skip to content

Commit

Permalink
Merge pull request #37356 from lgeiger:split-unroll-bn-pass
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 299419357
Change-Id: I3b5ab58adea1e0c43a613535163da39fece90c78
  • Loading branch information
tensorflower-gardener committed Mar 6, 2020
2 parents 7810256 + b667aef commit 0e86d51
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tensorflow/compiler/mlir/lite/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
25 changes: 22 additions & 3 deletions tensorflow/compiler/mlir/tensorflow/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -311,7 +332,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",
Expand All @@ -322,7 +342,6 @@ cc_library(
"transforms/bridge.h",
"transforms/passes.h",
"transforms/shape_inference.h",
"transforms/unroll_batch_matmul.h",
],
includes = ["include"],
deps = [
Expand All @@ -341,6 +360,7 @@ cc_library(
":tensorflow_types",
":tpu_rewrite_device_util",
":translate_utils",
":unroll_batch_matmul_pass",
":xla_sharding_util",
"//tensorflow/compiler/mlir/lite:validators",
"//tensorflow/compiler/xla:xla_data_proto_cc",
Expand All @@ -360,7 +380,6 @@ cc_library(
"@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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0e86d51

Please sign in to comment.