1 /* Copyright 2016 The TensorFlow Authors. All Rights Reserved. 2 3 Licensed under the Apache License, Version 2.0 (the "License"); 4 you may not use this file except in compliance with the License. 5 You may obtain a copy of the License at 6 7 http://www.apache.org/licenses/LICENSE-2.0 8 9 Unless required by applicable law or agreed to in writing, software 10 distributed under the License is distributed on an "AS IS" BASIS, 11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 See the License for the specific language governing permissions and 13 limitations under the License. 14 ==============================================================================*/ 15 16 #include "tensorflow/core/kernels/batch_matmul_op_impl.h" 17 18 #if GOOGLE_CUDA 19 #include "cuda/include/cuda.h" 20 #endif // GOOGLE_CUDA 21 22 namespace tensorflow { 23 24 // MKL_ML registers its own float and double kernels in mkl_batch_matmul_op.cc 25 // if defined(INTEL_MKL) && !defined(INTEL_MKL_DNN_ONLY) && defined(ENABLE_MKL). 26 // Anything else (the complement) should register the TF ones. 27 // (MKL-DNN doesn't implement these kernels either.) 28 #if !defined(INTEL_MKL) || defined(INTEL_MKL_DNN_ONLY) || !defined(ENABLE_MKL) 29 TF_CALL_float(REGISTER_BATCH_MATMUL_CPU); 30 TF_CALL_double(REGISTER_BATCH_MATMUL_CPU); 31 #endif // !INTEL_MKL || INTEL_MKL_DNN_ONLY || !ENABLE_MKL 32 33 TF_CALL_half(REGISTER_BATCH_MATMUL_CPU); 34 TF_CALL_int32(REGISTER_BATCH_MATMUL_CPU); 35 TF_CALL_int64(REGISTER_BATCH_MATMUL_CPU); 36 37 #if GOOGLE_CUDA 38 TF_CALL_float(REGISTER_BATCH_MATMUL_GPU); 39 TF_CALL_double(REGISTER_BATCH_MATMUL_GPU); 40 TF_CALL_half(REGISTER_BATCH_MATMUL_GPU); 41 #endif // GOOGLE_CUDA 42 43 #ifdef TENSORFLOW_USE_SYCL 44 TF_CALL_float(REGISTER_BATCH_MATMUL_SYCL); 45 TF_CALL_double(REGISTER_BATCH_MATMUL_SYCL); 46 #endif // TENSORFLOW_USE_SYCL 47 } // namespace tensorflow 48