-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[CUDA] Remove obsolete GPU-side __constexpr_* wrappers. #139164
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
Conversation
@llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: Artem Belevich (Artem-B) ChangesFull diff: https://github.com/llvm/llvm-project/pull/139164.diff 1 Files Affected:
diff --git a/clang/lib/Headers/cuda_wrappers/cmath b/clang/lib/Headers/cuda_wrappers/cmath
index 7deca678bf252..3e8820a173087 100644
--- a/clang/lib/Headers/cuda_wrappers/cmath
+++ b/clang/lib/Headers/cuda_wrappers/cmath
@@ -63,9 +63,9 @@ __constexpr_fmax(long double __x, long double __y) _NOEXCEPT {
template <class _Tp, class _Up, __enable_if_t<is_arithmetic<_Tp>::value && is_arithmetic<_Up>::value, int> = 0>
__attribute__((device))
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename __promote<_Tp, _Up>::type
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __promote_t<_Tp, _Up>
__constexpr_fmax(_Tp __x, _Up __y) _NOEXCEPT {
- using __result_type = typename __promote<_Tp, _Up>::type;
+ using __result_type = __promote_t<_Tp, _Up>;
return std::__constexpr_fmax(static_cast<__result_type>(__x), static_cast<__result_type>(__y));
}
#endif // _LIBCPP_STD_VER < 14
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now this checks for libc++
less than 14. Is that still relevant following that change?
@jhuber6 @ldionne One concern I have for this change is that it will break folks who will use older libc++ with the new Clang + wrapper headers. Is older libc++ expected to work with non-matching clang version? If the expectation is that libc++ and clang are from the same version, then adapting the wrappers to match the current libc++ is sufficient, and there's no need to provide extra tweaks for backward compatibility. I guess I can mitigate it to some degree by keeping the old variant of the change with |
That's a very good point. Looks like those |
libc++ no longer has them, so there's nothing to wrap.
No wrappers -- no problems. :-) |
No description provided.