Skip to content

Commit

Permalink
Automated Code Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 618696528
  • Loading branch information
tensorflower-gardener committed Mar 25, 2024
1 parent 2a8da79 commit 5a33f48
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 3 deletions.
7 changes: 6 additions & 1 deletion tensorflow/compiler/mlir/lite/metrics/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//tensorflow/core/platform:rules_cc.bzl", "cc_library")
load("//tensorflow:tensorflow.bzl", "tf_cc_test")
load("//tensorflow/core/platform:rules_cc.bzl", "cc_library")

package(
# copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],
Expand Down Expand Up @@ -33,6 +33,7 @@ cc_library(
"@com_google_absl//absl/strings",
"@llvm-project//mlir:IR",
"@llvm-project//mlir:Pass",
"@llvm-project//mlir:Support",
],
)

Expand All @@ -43,11 +44,15 @@ tf_cc_test(
"testdata/strided_slice.mlir",
],
deps = [
":error_collector",
":error_collector_inst",
":types_util",
"//tensorflow/compiler/mlir/tensorflow",
"//tensorflow/core:test",
"//tensorflow/core/platform:errors",
"//tensorflow/core/platform:resource_loader",
"//tensorflow/lite/python/metrics:converter_error_data_proto_cc",
"@com_google_absl//absl/status:statusor",
"@com_google_googletest//:gtest_main",
"@llvm-project//llvm:Support",
"@llvm-project//mlir:FuncDialect",
Expand Down
4 changes: 4 additions & 0 deletions tensorflow/compiler/mlir/lite/metrics/error_collector_inst.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ limitations under the License.
#include "absl/strings/match.h"
#include "absl/strings/str_split.h"
#include "mlir/IR/Diagnostics.h" // from @llvm-project
#include "mlir/IR/Location.h" // from @llvm-project
#include "mlir/Pass/Pass.h" // from @llvm-project
#include "mlir/Support/LogicalResult.h" // from @llvm-project
#include "tensorflow/compiler/mlir/lite/metrics/error_collector.h"
#include "tensorflow/compiler/mlir/lite/metrics/types_util.h"

namespace mlir {
namespace TFL {
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/compiler/mlir/lite/metrics/error_collector_inst.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ limitations under the License.
#include <unordered_map>
#include <utility>

#include "mlir/IR/Diagnostics.h" // from @llvm-project
#include "mlir/IR/Location.h" // from @llvm-project
#include "mlir/IR/MLIRContext.h" // from @llvm-project
#include "mlir/IR/Operation.h" // from @llvm-project
#include "mlir/Pass/PassInstrumentation.h" // from @llvm-project
#include "tensorflow/compiler/mlir/lite/metrics/error_collector.h"
Expand Down
14 changes: 12 additions & 2 deletions tensorflow/compiler/mlir/lite/metrics/error_collector_inst_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,29 @@ limitations under the License.

#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "llvm/Support/MemoryBuffer.h"
#include "absl/status/statusor.h"
#include "llvm/Support/SMLoc.h"
#include "llvm/Support/SourceMgr.h"
#include "mlir/Dialect/Func/IR/FuncOps.h" // from @llvm-project
#include "mlir/IR/BuiltinAttributes.h" // from @llvm-project
#include "mlir/IR/BuiltinOps.h" // from @llvm-project
#include "mlir/IR/DialectRegistry.h" // from @llvm-project
#include "mlir/IR/Location.h" // from @llvm-project
#include "mlir/IR/Operation.h" // from @llvm-project
#include "mlir/IR/OwningOpRef.h" // from @llvm-project
#include "mlir/Parser/Parser.h" // from @llvm-project
#include "mlir/Pass/Pass.h" // from @llvm-project
#include "mlir/Pass/PassManager.h" // from @llvm-project
#include "mlir/Support/FileUtilities.h" // from @llvm-project
#include "mlir/Support/LogicalResult.h" // from @llvm-project
#include "mlir/Support/TypeID.h" // from @llvm-project
#include "tensorflow/compiler/mlir/lite/metrics/error_collector.h"
#include "tensorflow/compiler/mlir/lite/metrics/types_util.h"
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_ops.h"
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_dialect.h"
#include "tensorflow/core/platform/errors.h"
#include "tensorflow/core/platform/resource_loader.h"
#include "tensorflow/core/platform/test.h"
#include "tensorflow/lite/python/metrics/converter_error_data.pb.h"
#include "tsl/platform/statusor.h"

namespace mlir {
Expand Down
3 changes: 3 additions & 0 deletions tensorflow/compiler/mlir/lite/metrics/types_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ limitations under the License.

#include <string>

#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/TypeSwitch.h"
#include "mlir/IR/BuiltinAttributes.h" // from @llvm-project
#include "mlir/IR/Location.h" // from @llvm-project
#include "tensorflow/lite/python/metrics/converter_error_data.pb.h"

namespace mlir {
namespace TFL {
Expand Down

0 comments on commit 5a33f48

Please sign in to comment.