aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/graph
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-08-10 22:34:17 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-08-10 22:38:34 -0700
commita8e78e2e617b6ca10f4878fe99fdf43ddedfa7c6 (patch)
treed6d7d12dc263afbd4faadc034753c498f574fc93 /tensorflow/core/graph
parentf97e945914e83bed8cc2d51a27f1394719f0e7b0 (diff)
Rename MKL-related feature macros.
The existing feature macros are named INTEL_MKL to indicate that any flavor of MKL is available, INTEL_MKL_ML to indicate that *only* MKL-ML is available (i.e. MKL-DNN is not), and DO_NOT_USE_ML to indicate that *only* MKL-DNN is available (i.e. MKL-ML is not). This change renames INTEL_MKL_ML to INTEL_MKL_ML_ONLY and DO_NOT_USE_ML to INTEL_MKL_DNN_ONLY. The meanings of the macros have not changed. This change also adds a few sanity checks to mkl_util.h that ensures that the combination of INTEL_MKL, INTEL_MKL_ML_ONLY, and INTEL_MKL_DNN_ONLY is logically consistent: the *_ONLY macros may not both be defined, and if either of them is defined, bare INTEL_MKL must also be defined. PiperOrigin-RevId: 208313735
Diffstat (limited to 'tensorflow/core/graph')
-rw-r--r--tensorflow/core/graph/mkl_layout_pass.cc6
-rw-r--r--tensorflow/core/graph/mkl_layout_pass_test.cc6
2 files changed, 6 insertions, 6 deletions
diff --git a/tensorflow/core/graph/mkl_layout_pass.cc b/tensorflow/core/graph/mkl_layout_pass.cc
index c22e0a3872..5683944e46 100644
--- a/tensorflow/core/graph/mkl_layout_pass.cc
+++ b/tensorflow/core/graph/mkl_layout_pass.cc
@@ -43,7 +43,7 @@ limitations under the License.
namespace tensorflow {
-#ifdef INTEL_MKL_ML
+#ifdef INTEL_MKL_ML_ONLY
// This pass implements rewriting of graph to support following scenarios:
// (A) Merging nodes in the graph
@@ -2211,7 +2211,7 @@ Status MklLayoutRewritePass::Run(const GraphOptimizationPassOptions& options) {
return Status::OK();
}
-#else // INTEL_MKL_ML
+#else // INTEL_MKL_ML_ONLY
// This pass implements rewriting of graph to support following scenarios:
// (A) Merging nodes in the graph
@@ -4474,7 +4474,7 @@ Status MklLayoutRewritePass::Run(const GraphOptimizationPassOptions& options) {
return Status::OK();
}
-#endif // INTEL_MKL_ML
+#endif // INTEL_MKL_ML_ONLY
} // namespace tensorflow
#endif
diff --git a/tensorflow/core/graph/mkl_layout_pass_test.cc b/tensorflow/core/graph/mkl_layout_pass_test.cc
index a41f5861af..e8bac847e5 100644
--- a/tensorflow/core/graph/mkl_layout_pass_test.cc
+++ b/tensorflow/core/graph/mkl_layout_pass_test.cc
@@ -37,7 +37,7 @@ limitations under the License.
namespace tensorflow {
-#ifdef INTEL_MKL_ML
+#ifdef INTEL_MKL_ML_ONLY
namespace {
@@ -1898,7 +1898,7 @@ BENCHMARK(BM_MklLayoutRewritePass)->Arg(1000)->Arg(10000);
} // namespace
-#else // INTEL_MKL_ML
+#else // INTEL_MKL_ML_ONLY
// NOTE: Unit tests in this file rely on a topological sorted graph for
// printing. But since sibling nodes of a node in the topologically sorted graph
@@ -3582,7 +3582,7 @@ BENCHMARK(BM_MklLayoutRewritePass)->Arg(1000)->Arg(10000);
} // namespace
-#endif // INTEL_MKL_ML
+#endif // INTEL_MKL_ML_ONLY
} // namespace tensorflow