Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unify implementation of [[deprecated]] attribute #2934

Open
wants to merge 67 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
de3dd2c
unify deprecated implementation
davebayer Nov 22, 2024
8f4b38a
fix invalid `#elif`
davebayer Nov 22, 2024
509e951
fix cub
davebayer Nov 22, 2024
5e47ce8
fix thrust
davebayer Nov 22, 2024
dff5032
fix swapped impls in cub
davebayer Nov 22, 2024
97d1e62
prefer compiler specific ways of defining deprecation
davebayer Nov 23, 2024
8ca4fea
use c++ attribute if available and supported
davebayer Nov 24, 2024
dfef0f7
fix check if the attribute is available
davebayer Nov 24, 2024
7867e6d
add check if the compiler offers the deprecated cpp attribute
davebayer Nov 24, 2024
79d0647
Update libcudacxx/include/cuda/std/__cccl/attributes.h
bernhardmgruber Nov 25, 2024
2794f0c
`_CCCL_DEPRECATED` must precede `_LIBCUDACXX_HIDE_FROM_ABI`
davebayer Nov 25, 2024
0702aa2
add `_CCCL_DEPRECATED_TYPE_ALIAS`
davebayer Nov 25, 2024
ebeee4c
add `CUB_DEPRECATED_TYPE_ALIAS`
davebayer Nov 25, 2024
0abadda
further restrictions to allowing deprecated type aliases
davebayer Nov 25, 2024
6949d88
add `THRUST_DEPRECATED_TYPE_ALIAS`
davebayer Nov 25, 2024
fee1594
implement deprecation for libcu++
davebayer Nov 25, 2024
8affb0a
[pre-commit.ci] auto code formatting
pre-commit-ci[bot] Nov 25, 2024
9f15b6e
Reorganize PTX tests to match generator (#2930)
bernhardmgruber Nov 22, 2024
08cbab6
Reorganize PTX docs to match generator (#2929)
bernhardmgruber Nov 22, 2024
11ed1c0
Improve build instructions for libcu++ (#2881)
miscco Nov 22, 2024
cc11592
Reorganize PTX headers to match generator (#2925)
bernhardmgruber Nov 22, 2024
05de1b3
implement C++26 `std::span`'s constructor from `std::initializer_list…
davebayer Nov 22, 2024
8c8bc6d
Add tuple protocol to `cuda::std::complex` from C++26 (#2882)
davebayer Nov 22, 2024
9e44aa8
Add missing qualifier for cuda namespace (#2940)
bernhardmgruber Nov 23, 2024
4d8553a
Try to fix a clang warning: (#2941)
bernhardmgruber Nov 23, 2024
f95246d
minor consistency improvements in concepts macros (#2928)
ericniebler Nov 24, 2024
ccefb7b
Drop some of the mdspan fold implementation (#2949)
miscco Nov 25, 2024
4a9c339
[STF] Implement CUDASTF_DOT_TIMING for the ctx.cuda_kernel construct …
caugonnet Nov 25, 2024
dbf27a4
Avoid potential null dereference in `annotated_ptr` (#2951)
miscco Nov 25, 2024
6fac809
make compiler version comparison utility generic (#2952)
davebayer Nov 25, 2024
2c50c2b
Add SM100 descriptor to target (#2954)
miscco Nov 25, 2024
10661de
Regenerate `cuda::ptx` headers/docs and run format (#2937)
bernhardmgruber Nov 25, 2024
0c35ba7
Regenerate PTX test (#2953)
bernhardmgruber Nov 25, 2024
629e27e
Do not include extended floating point headers if they are not needed…
miscco Nov 25, 2024
767a10c
[CUDAX] Add copy_bytes and fill_bytes overloads for mdspan (#2932)
pciolkosz Nov 25, 2024
8acf343
add a `_CCCL_NO_CONCEPTS` config macro (#2945)
ericniebler Nov 25, 2024
59d6cca
remove definition of macro that is no longer used (#2957)
ericniebler Nov 26, 2024
88686f6
Avoid symbol clashes with libc++ (#2955)
miscco Nov 26, 2024
73a3c47
Add more CUB transform benchmarks (#2906)
bernhardmgruber Nov 26, 2024
b921cdb
Start reworking our math functions (#2749)
miscco Nov 26, 2024
ef5fc67
Drop memory resources in libcu++ (#2860)
miscco Nov 26, 2024
503e665
`std::dims` (#2961)
fbusato Nov 26, 2024
05a73d6
Fix merge conflict from moving resources up a namespace (#2965)
miscco Nov 26, 2024
40aea78
[CUDAX] Add a way to combine thread hierarchies (#2746)
pciolkosz Nov 26, 2024
f119895
Require approval to run CI on draft PRs. (#2969)
bdice Nov 27, 2024
f645bf5
fix thread-reduce performance regression (#2944)
fbusato Nov 27, 2024
144d6eb
add a `__type_switch` utility and use it the ptx generator (#2946)
ericniebler Nov 27, 2024
d168599
replace use of old `_CONCEPT_FRAGMENT` macro in cudax (#2973)
ericniebler Nov 27, 2024
e5268b2
remove vestigal uses of the old `DOXYGEN_SHOULD_SKIP_THIS` macro (#2978)
ericniebler Nov 28, 2024
fd0595d
Fix proclaim_copyable_arguments for lambdas (#2833)
bernhardmgruber Nov 28, 2024
e4b7886
Forward declare half types in cuda::ptx (#2981)
ahendriksen Nov 28, 2024
e82cfdb
Fix tuning benchmark for `cub::DeviceTransform` (#2970)
bernhardmgruber Nov 28, 2024
5ba25f6
fix old gcc version check (#2989)
davebayer Nov 29, 2024
b9f61d9
Fix a typo in thrust/binary_search.h (#2980) (#2992)
hzhangxyz Nov 30, 2024
7cfdbf0
Enable assertions for CCCL users in CMake Debug builds (#2986)
bernhardmgruber Nov 30, 2024
25a2827
Fix CMake warning for FindPythonInterp (#2982)
bernhardmgruber Nov 30, 2024
a50250b
Further clarify host compiler support (#2991)
bernhardmgruber Nov 30, 2024
85ca56d
Drop _CCCL_ELSE_IF_CONSTEXPR (#2966)
bernhardmgruber Nov 30, 2024
3009523
implement C++26 `std::ignore` (#2922)
davebayer Nov 30, 2024
a2aa971
make the upper limit on TMP loop unrolling configurable (#2971)
ericniebler Dec 1, 2024
8bf11ca
Update docs with recent features (#2994)
davebayer Dec 1, 2024
298c7d6
Restore thrust single config options. (#2977)
alliepiper Dec 2, 2024
47163ab
Document tuning DB comparison scripts (#2968)
bernhardmgruber Dec 2, 2024
edf83cb
Build CUB and Thrust tests with assertions (#2987)
bernhardmgruber Dec 2, 2024
02e9ba9
Merge branch 'main' into impl_cccl_deprecated
davebayer Dec 2, 2024
21bd7b9
fix disabled deprecated attribute for CUDACC and NVRTC
davebayer Dec 2, 2024
52cc014
fix docs compilation
davebayer Dec 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ AttributeMacros: [
'_CCCL_NODISCARD_FRIEND',
'_CCCL_NODISCARD',
'_CCCL_NORETURN',
'_CCCL_DEPRECATED',
'_CCCL_DEPRECATED_BECAUSE',
'_CCCL_TYPE_VISIBILITY_DEFAULT',
'_CCCL_VISIBILITY_HIDDEN',
'CUB_RUNTIME_FUNCTION',
Expand Down
16 changes: 2 additions & 14 deletions cub/cub/util_deprecated.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,9 @@
#ifdef CUB_IGNORE_DEPRECATED_API
# define CUB_DEPRECATED
# define CUB_DEPRECATED_BECAUSE(MSG)
#elif _CCCL_STD_VER >= 2014
# define CUB_DEPRECATED [[deprecated]]
# define CUB_DEPRECATED_BECAUSE(MSG) [[deprecated(MSG)]]
#elif _CCCL_COMPILER(MSVC)
# define CUB_DEPRECATED __declspec(deprecated)
# define CUB_DEPRECATED_BECAUSE(MSG) __declspec(deprecated(MSG))
#elif _CCCL_COMPILER(CLANG)
# define CUB_DEPRECATED __attribute__((deprecated))
# define CUB_DEPRECATED_BECAUSE(MSG) __attribute__((deprecated(MSG)))
#elif _CCCL_COMPILER(GCC)
# define CUB_DEPRECATED __attribute__((deprecated))
# define CUB_DEPRECATED_BECAUSE(MSG) __attribute__((deprecated(MSG)))
#else
# define CUB_DEPRECATED
# define CUB_DEPRECATED_BECAUSE(MSG)
# define CUB_DEPRECATED _CCCL_DEPRECATED
# define CUB_DEPRECATED_BECAUSE(MSG) _CCCL_DEPRECATED_BECAUSE(MSG)
#endif

#define CUB_DETAIL_RUNTIME_DEBUG_SYNC_IS_NOT_SUPPORTED \
Expand Down
15 changes: 15 additions & 0 deletions libcudacxx/include/cuda/std/__cccl/attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,19 @@
# define _CCCL_RESTRICT __restrict__
#endif // ^^^ !_CCCL_COMPILER(MSVC) ^^^

// prefer compiler specific way of defining deprecated because of compiler bugs in old GCC and Clang
#if _CCCL_COMPILER(MSVC)
# define _CCCL_DEPRECATED __declspec(deprecated)
# define _CCCL_DEPRECATED_BECAUSE(_MSG) __declspec(deprecated(_MSG))
#elif _CCCL_COMPILER(GCC) || _CCCL_COMPILER(CLANG) || _CCCL_COMPILER(NVHPC) || _CCCL_COMPILER(ICC)
# define _CCCL_DEPRECATED __attribute__((__deprecated__))
# define _CCCL_DEPRECATED_BECAUSE(_MSG) __attribute__((__deprecated__(_MSG)))
#elif _CCCL_STD_VER >= 2014
# define _CCCL_DEPRECATED [[deprecated]]
# define _CCCL_DEPRECATED_BECAUSE(_MSG) [[deprecated(_MSG)]]
bernhardmgruber marked this conversation as resolved.
Show resolved Hide resolved
#else
# define _CCCL_DEPRECATED
# define _CCCL_DEPRECATED_BECAUSE(_MSG)
#endif

#endif // __CCCL_ATTRIBUTES_H
Original file line number Diff line number Diff line change
Expand Up @@ -630,13 +630,7 @@ typedef unsigned int char32_t;
// by defining _LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS.
// NVCC 11.1 and 11.2 are broken with the deprecated attribute, so disable it
# if !defined(_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS) && _CCCL_CUDACC_AT_LEAST(11, 3)
# if _CCCL_HAS_ATTRIBUTE(deprecated)
# define _LIBCUDACXX_DEPRECATED __attribute__((deprecated))
# elif _CCCL_STD_VER > 2011
# define _LIBCUDACXX_DEPRECATED [[deprecated]]
# else
# define _LIBCUDACXX_DEPRECATED
# endif
# define _LIBCUDACXX_DEPRECATED _CCCL_DEPRECATED
# else
# define _LIBCUDACXX_DEPRECATED
# endif
Expand Down
16 changes: 2 additions & 14 deletions thrust/thrust/detail/config/deprecated.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,7 @@
#ifdef THRUST_IGNORE_DEPRECATED_API
# define THRUST_DEPRECATED
# define THRUST_DEPRECATED_BECAUSE(MSG)
#elif _CCCL_STD_VER >= 2014
# define THRUST_DEPRECATED [[deprecated]]
# define THRUST_DEPRECATED_BECAUSE(MSG) [[deprecated(MSG)]]
#elif _CCCL_COMPILER(MSVC)
# define THRUST_DEPRECATED __declspec(deprecated)
# define THRUST_DEPRECATED_BECAUSE(MSG) __declspec(deprecated(MSG))
#elif _CCCL_COMPILER(CLANG)
# define THRUST_DEPRECATED __attribute__((deprecated))
# define THRUST_DEPRECATED_BECAUSE(MSG) __attribute__((deprecated(MSG)))
#elif _CCCL_COMPILER(GCC)
# define THRUST_DEPRECATED __attribute__((deprecated))
# define THRUST_DEPRECATED_BECAUSE(MSG) __attribute__((deprecated(MSG)))
#else
# define THRUST_DEPRECATED
# define THRUST_DEPRECATED_BECAUSE(MSG)
# define THRUST_DEPRECATED _CCCL_DEPRECATED
# define THRUST_DEPRECATED_BECAUSE(MSG) _CCCL_DEPRECATED_BECAUSE(MSG)
#endif