Fix "does not depend on module" error when building `//tensorflow/core/common_runtime/eager:execute` with oneDNN.
Error message:
```
tensorflow/core/graph/mkl_graph_util.h:20:10: error: module //tensorflow/core/common_runtime/eager:execute does not depend on a module exporting 'absl/base/call_once.h'
```
PiperOrigin-RevId: 492663173
GitOrigin-RevId: a6b8adba642e740fb46521c129683d054a1680ce
Change-Id: Ida6c33c11352c7e459884a38f56b86fe4fabbcc0
diff --git a/tensorflow/core/common_runtime/eager/BUILD b/tensorflow/core/common_runtime/eager/BUILD
index 8b638a6..44d610e 100644
--- a/tensorflow/core/common_runtime/eager/BUILD
+++ b/tensorflow/core/common_runtime/eager/BUILD
@@ -496,7 +496,7 @@
hdrs = [
"execute.h",
"execute_node.h",
- ] + if_mkl(["//tensorflow/core/graph:mkl_graph_util_header"]),
+ ],
copts = if_mkl(["-DINTEL_MKL"]),
deps = [
":context",
@@ -534,7 +534,10 @@
"//tensorflow/core/distributed_runtime/eager:remote_execute_node",
"//tensorflow/core/distributed_runtime/eager:remote_copy_node",
],
- }) + if_mkl([":mkl_eager_op_rewrite"]),
+ }) + if_mkl([
+ ":mkl_eager_op_rewrite",
+ "//tensorflow/core/graph:mkl_graph_util",
+ ]),
)
tf_cc_test(
diff --git a/tensorflow/core/graph/BUILD b/tensorflow/core/graph/BUILD
index ad6d478..7498015 100644
--- a/tensorflow/core/graph/BUILD
+++ b/tensorflow/core/graph/BUILD
@@ -24,7 +24,10 @@
cc_library(
name = "mkl_graph_util",
hdrs = ["mkl_graph_util.h"],
- deps = ["@com_google_absl//absl/container:flat_hash_map"],
+ deps = [
+ "@com_google_absl//absl/base",
+ "@com_google_absl//absl/container:flat_hash_map",
+ ],
)
tf_cc_test(