File tree 9 files changed +75
-22
lines changed
libcudacxx/include/cuda/std
thrust/thrust/system/cuda/detail
9 files changed +75
-22
lines changed Original file line number Diff line number Diff line change 35
35
#include < c2h/vector.h>
36
36
37
37
#if THRUST_DEVICE_SYSTEM == THRUST_DEVICE_SYSTEM_CUDA
38
- # include < cub/util_type.cuh> // for <cuda_fp8.h>
38
+ # if defined(_CCCL_HAS_NVFP16)
39
+ # include < cuda_fp16.h>
40
+ # endif // _CCCL_HAS_NVFP16
41
+
42
+ # if defined(_CCCL_HAS_NVBF16)
43
+ _CCCL_DIAG_PUSH
44
+ _CCCL_DIAG_SUPPRESS_CLANG (" -Wunused-function" )
45
+ # include < cuda_bf16.h>
46
+ _CCCL_DIAG_POP
47
+
48
+ # if _CCCL_CUDACC_AT_LEAST(11, 8)
49
+ // cuda_fp8.h resets default for C4127, so we have to guard the inclusion
50
+ _CCCL_DIAG_PUSH
51
+ # include < cuda_fp8.h>
52
+ _CCCL_DIAG_POP
53
+ # endif // _CCCL_CUDACC_AT_LEAST(11, 8)
54
+ # endif // _CCCL_HAS_NVBF16
55
+
39
56
# if defined(__CUDA_FP8_TYPES_EXIST__)
40
57
namespace std
41
58
{
Original file line number Diff line number Diff line change 37
37
# pragma system_header
38
38
#endif // no system header
39
39
40
+ #include < cub/detail/type_traits.cuh> // implicit_prom_t
41
+ #include < cub/util_type.cuh> // CUB_IS_INT128_ENABLED
42
+
40
43
#include < cuda/cmath> // cuda::std::ceil_div
41
44
#include < cuda/std/bit> // std::has_single_bit
42
45
#include < cuda/std/climits> // CHAR_BIT
43
46
#include < cuda/std/cstdint> // uint64_t
44
47
#include < cuda/std/limits> // numeric_limits
45
48
#include < cuda/std/type_traits> // std::is_integral
46
49
47
- #include " cub/detail/type_traits.cuh" // implicit_prom_t
48
- #include " cub/util_type.cuh" // CUB_IS_INT128_ENABLED
49
-
50
50
#if defined(CCCL_ENABLE_DEVICE_ASSERTIONS)
51
51
_CCCL_NV_DIAG_SUPPRESS (186 ) // pointless comparison of unsigned integer with zero
52
52
#endif // CCCL_ENABLE_DEVICE_ASSERTIONS
Original file line number Diff line number Diff line change 56
56
#include < cuda/std/type_traits> // cuda::std::common_type
57
57
#include < cuda/std/utility> // cuda::std::forward
58
58
59
+ #if defined(_CCCL_HAS_NVFP16)
60
+ # include < cuda_fp16.h>
61
+ #endif // _CCCL_HAS_NVFP16
62
+
63
+ #if defined(_CCCL_HAS_NVBF16)
64
+ _CCCL_DIAG_PUSH
65
+ _CCCL_DIAG_SUPPRESS_CLANG (" -Wunused-function" )
66
+ # include < cuda_bf16.h>
67
+ _CCCL_DIAG_POP
68
+ #endif // _CCCL_HAS_NVFP16
69
+
59
70
CUB_NAMESPACE_BEGIN
60
71
61
72
// TODO(bgruber): deprecate in C++17 with a note: "replace by decltype(cuda::std::not_fn(EqualityOp{}))"
Original file line number Diff line number Diff line change 54
54
#include < cuda/std/cstdint> // uint16_t
55
55
#include < cuda/std/functional> // cuda::std::plus
56
56
57
+ #if defined(_CCCL_HAS_NVFP16)
58
+ # include < cuda_fp16.h>
59
+ #endif // _CCCL_HAS_NVFP16
60
+
61
+ #if defined(_CCCL_HAS_NVBF16)
62
+ _CCCL_DIAG_PUSH
63
+ _CCCL_DIAG_SUPPRESS_CLANG (" -Wunused-function" )
64
+ # include < cuda_bf16.h>
65
+ _CCCL_DIAG_POP
66
+ #endif // _CCCL_HAS_NVFP16
67
+
57
68
CUB_NAMESPACE_BEGIN
58
69
59
70
// ! @rst
Original file line number Diff line number Diff line change 50
50
#include < cuda/std/limits>
51
51
#include < cuda/std/type_traits>
52
52
53
+ #if defined(_CCCL_HAS_NVFP16)
54
+ # include < cuda_fp16.h>
55
+ #endif // _CCCL_HAS_NVFP16
56
+
53
57
#if defined(_CCCL_HAS_NVBF16)
58
+ _CCCL_DIAG_PUSH
59
+ _CCCL_DIAG_SUPPRESS_CLANG (" -Wunused-function" )
60
+ # include < cuda_bf16.h>
61
+ _CCCL_DIAG_POP
62
+
54
63
# if _CCCL_CUDACC_AT_LEAST(11, 8)
55
64
// cuda_fp8.h resets default for C4127, so we have to guard the inclusion
56
65
_CCCL_DIAG_PUSH
Original file line number Diff line number Diff line change 39
39
# endif
40
40
#endif // !_CCCL_HAS_NVBF16
41
41
42
- #if defined(_CCCL_HAS_NVFP16 )
43
- # include <cuda_fp16.h>
44
- #endif // _CCCL_HAS_NVFP16
45
-
46
- #if defined(_CCCL_HAS_NVBF16 )
47
- _CCCL_DIAG_PUSH
48
- _CCCL_DIAG_SUPPRESS_CLANG ("- Wunused - function ")
49
- # include <cuda_bf16.h>
50
- _CCCL_DIAG_POP
51
- #endif // _CCCL_HAS_NVFP16
52
-
53
42
#endif // __CCCL_EXTENDED_FLOATING_POINT_H
Original file line number Diff line number Diff line change 22
22
23
23
#include < cuda/std/__type_traits/integral_constant.h>
24
24
25
+ #if defined(_LIBCUDACXX_HAS_NVFP16)
26
+ # include < cuda_fp16.h>
27
+ #endif // _LIBCUDACXX_HAS_NVFP16
28
+
29
+ #if defined(_LIBCUDACXX_HAS_NVBF16)
30
+ _CCCL_DIAG_PUSH
31
+ _CCCL_DIAG_SUPPRESS_CLANG (" -Wunused-function" )
32
+ # include < cuda_bf16.h>
33
+ _CCCL_DIAG_POP
34
+ #endif // _LIBCUDACXX_HAS_NVBF16
35
+
25
36
_LIBCUDACXX_BEGIN_NAMESPACE_STD
26
37
27
38
template <class _Tp >
@@ -39,8 +50,6 @@ _CCCL_INLINE_VAR constexpr bool __is_extended_floating_point_v
39
50
#endif // !_CCCL_NO_VARIABLE_TEMPLATES
40
51
41
52
#if defined(_LIBCUDACXX_HAS_NVFP16)
42
- # include < cuda_fp16.h>
43
-
44
53
template <>
45
54
struct __is_extended_floating_point <__half> : true_type
46
55
{};
@@ -52,11 +61,6 @@ _CCCL_INLINE_VAR constexpr bool __is_extended_floating_point_v<__half> = true;
52
61
#endif // _LIBCUDACXX_HAS_NVFP16
53
62
54
63
#if defined(_LIBCUDACXX_HAS_NVBF16)
55
- _CCCL_DIAG_PUSH
56
- _CCCL_DIAG_SUPPRESS_CLANG (" -Wunused-function" )
57
- # include < cuda_bf16.h>
58
- _CCCL_DIAG_POP
59
-
60
64
template <>
61
65
struct __is_extended_floating_point <__nv_bfloat16> : true_type
62
66
{};
Original file line number Diff line number Diff line change 28
28
#ifdef _LIBCUDACXX_HAS_NVFP16
29
29
# include < cuda_fp16.h>
30
30
#endif // _LIBCUDACXX_HAS_NVFP16
31
+
31
32
#ifdef _LIBCUDACXX_HAS_NVBF16
32
33
_CCCL_DIAG_PUSH
33
34
_CCCL_DIAG_SUPPRESS_CLANG (" -Wunused-function" )
Original file line number Diff line number Diff line change 60
60
61
61
# include < cstdint>
62
62
63
+ # if defined(_CCCL_HAS_NVFP16)
64
+ # include < cuda_fp16.h>
65
+ # endif // _CCCL_HAS_NVFP16
66
+
67
+ # if defined(_CCCL_HAS_NVBF16)
68
+ _CCCL_DIAG_PUSH
69
+ _CCCL_DIAG_SUPPRESS_CLANG (" -Wunused-function" )
70
+ # include < cuda_bf16.h>
71
+ _CCCL_DIAG_POP
72
+ # endif // _CCCL_HAS_NVBF16
73
+
63
74
THRUST_NAMESPACE_BEGIN
64
75
namespace cuda_cub
65
76
{
You can’t perform that action at this time.
0 commit comments