aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/kernels/batch_matmul_op_complex.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-09-25 22:57:54 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-09-25 23:02:36 -0700
commitc63d21b0bfc534b6377b332e9d2ba2abbdb7e0eb (patch)
tree6fb44dc9eb26de3ff6e25f57e4799ac2da066d95 /tensorflow/core/kernels/batch_matmul_op_complex.cc
parentf2b17b22e12bd743b66945070f338f70b5fa3332 (diff)
Adds a build flag to enable MKL (mkl_enabled=true).
PiperOrigin-RevId: 214557082
Diffstat (limited to 'tensorflow/core/kernels/batch_matmul_op_complex.cc')
-rw-r--r--tensorflow/core/kernels/batch_matmul_op_complex.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/tensorflow/core/kernels/batch_matmul_op_complex.cc b/tensorflow/core/kernels/batch_matmul_op_complex.cc
index 54c45bfe63..f48bd0c318 100644
--- a/tensorflow/core/kernels/batch_matmul_op_complex.cc
+++ b/tensorflow/core/kernels/batch_matmul_op_complex.cc
@@ -17,14 +17,18 @@ limitations under the License.
namespace tensorflow {
-#if !defined(INTEL_MKL) || defined(INTEL_MKL_DNN_ONLY)
+// MKL_ML registers its own complex64/128 kernels in mkl_batch_matmul_op.cc
+// if defined(INTEL_MKL) && !defined(INTEL_MKL_DNN_ONLY) && defined(ENABLE_MKL).
+// Anything else (the complement) should register the TF ones.
+// (MKL-DNN doesn't implement these kernels either.)
+#if !defined(INTEL_MKL) || defined(INTEL_MKL_DNN_ONLY) || !defined(ENABLE_MKL)
TF_CALL_complex64(REGISTER_BATCH_MATMUL_CPU);
TF_CALL_complex128(REGISTER_BATCH_MATMUL_CPU);
-#endif
+#endif // !INTEL_MKL || INTEL_MKL_DNN_ONLY || !ENABLE_MKL
#if GOOGLE_CUDA
TF_CALL_complex64(REGISTER_BATCH_MATMUL_GPU);
TF_CALL_complex128(REGISTER_BATCH_MATMUL_GPU);
-#endif
+#endif // GOOGLE_CUDA
} // namespace tensorflow