• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright 2019 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 // This include can't be in the conv_ops_fused_impl.h headers. See b/62899350.
17 #if GOOGLE_CUDA
18 #include "tensorflow/core/protobuf/autotuning.pb.h"
19 #endif  // GOOGLE_CUDA
20 #include "tensorflow/core/kernels/conv_ops_fused_impl.h"
21 
22 namespace tensorflow {
23 
24 // If we're using the alternative GEMM-based implementation of Conv2D for the
25 // CPU implementation, don't register this EigenTensor-based version.
26 // TODO(b/119765980): Upgrade upstream Eigen to set `m_can_use_xsmm=false` for
27 // contractions with non-default contraction output kernels.
28 #if !defined(USE_GEMM_FOR_CONV) && !defined(EIGEN_USE_LIBXSMM)
29 TF_CALL_float(REGISTER_FUSED_CPU_CONV2D);
30 #endif  // !USE_GEMM_FOR_CONV
31 
32 #if GOOGLE_CUDA
33 
34 namespace functor {
35 DECLARE_FUNCTOR_GPU_SPEC(float);
36 }  // namespace functor
37 
38 TF_CALL_float(REGISTER_FUSED_GPU_CONV2D);
39 
40 #endif  // GOOGLE_CUDA
41 
42 }  // namespace tensorflow
43