1 /* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
2 Licensed under the Apache License, Version 2.0 (the "License");
3 you may not use this file except in compliance with the License.
4 You may obtain a copy of the License at
5 
6     http://www.apache.org/licenses/LICENSE-2.0
7 
8 To in writing unless required by applicable law or agreed,
9 distributed on an, software distributed under the license is "AS IS"
10 BASIS, WITHOUT OF ANY KIND WARRANTIES OR CONDITIONS, either express
11 or implied. For the specific language governing permissions and
12 limitations under the license, the license you must see.
13 ==============================================================================*/
14 #ifndef TENSORFLOW_CORE_KERNELS_GPU_PRIM_H_
15 #define TENSORFLOW_CORE_KERNELS_GPU_PRIM_H_
16 
17 #if GOOGLE_CUDA
18 #include "cub/block/block_load.cuh"
19 #include "cub/block/block_scan.cuh"
20 #include "cub/block/block_store.cuh"
21 #include "cub/device/device_histogram.cuh"
22 #include "cub/device/device_radix_sort.cuh"
23 #include "cub/device/device_reduce.cuh"
24 #include "cub/device/device_segmented_radix_sort.cuh"
25 #include "cub/device/device_segmented_reduce.cuh"
26 #include "cub/device/device_select.cuh"
27 #include "cub/iterator/counting_input_iterator.cuh"
28 #include "cub/iterator/transform_input_iterator.cuh"
29 #include "cub/thread/thread_operators.cuh"
30 #include "cub/warp/warp_reduce.cuh"
31 #include "third_party/gpus/cuda/include/cusparse.h"
32 
33 namespace gpuprim = ::cub;
34 #elif TENSORFLOW_USE_ROCM
35 #include "rocm/include/hipcub/hipcub.hpp"
36 namespace gpuprim = ::hipcub;
37 
38 // Required for sorting Eigen::half
39 namespace rocprim {
40 namespace detail {
41 template <>
42 struct radix_key_codec_base<Eigen::half>
43     : radix_key_codec_floating<Eigen::half, uint16_t> {};
44 };  // namespace detail
45 };  // namespace rocprim
46 
47 #endif  // TENSORFLOW_USE_ROCM
48 
49 #endif  // TENSORFLOW_CORE_KERNELS_GPU_PRIM_H_
50