aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/kernels/mkl_conv_grad_input_ops.cc
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/kernels/mkl_conv_grad_input_ops.cc
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/kernels/mkl_conv_grad_input_ops.cc')
-rw-r--r--tensorflow/core/kernels/mkl_conv_grad_input_ops.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/tensorflow/core/kernels/mkl_conv_grad_input_ops.cc b/tensorflow/core/kernels/mkl_conv_grad_input_ops.cc
index 39498f1a80..38e014d68e 100644
--- a/tensorflow/core/kernels/mkl_conv_grad_input_ops.cc
+++ b/tensorflow/core/kernels/mkl_conv_grad_input_ops.cc
@@ -23,7 +23,7 @@ limitations under the License.
#define EIGEN_USE_THREADS
#include <algorithm>
#include <vector>
-#ifdef INTEL_MKL_ML
+#ifdef INTEL_MKL_ML_ONLY
#include "mkl_dnn.h"
#include "mkl_dnn_types.h"
#endif
@@ -46,7 +46,7 @@ limitations under the License.
#include "tensorflow/core/util/use_cudnn.h"
#include "tensorflow/core/util/work_sharder.h"
-#ifndef INTEL_MKL_ML
+#ifndef INTEL_MKL_ML_ONLY
#include "mkldnn.hpp"
using mkldnn::convolution_backward_data;
@@ -57,7 +57,7 @@ using mkldnn::stream;
namespace tensorflow {
typedef Eigen::ThreadPoolDevice CPUDevice;
-#ifndef INTEL_MKL_ML
+#ifndef INTEL_MKL_ML_ONLY
/// utility classes enabling primitive reuse for backward conv2d ops.
struct MklConvBwdInputParams {
@@ -294,7 +294,7 @@ class MklConv2DBwdInputPrimitiveFactory : public MklPrimitiveFactory<T> {
#endif
-#ifdef INTEL_MKL_ML
+#ifdef INTEL_MKL_ML_ONLY
template <typename Device, class T>
class MklConv2DCustomBackpropInputOp : public OpKernel {
@@ -839,7 +839,7 @@ class MklConv2DCustomBackpropInputOp
}
};
-#endif // INTEL_MKL_ML
+#endif // INTEL_MKL_ML_ONLY
#define REGISTER_MKL_CPU_KERNELS(T) \
REGISTER_KERNEL_BUILDER(Name("_MklConv2DBackpropInput") \