[PATCH] D155982: Partially revert "clang/HIP: Remove __llvm_amdgcn_* wrapper hacks"
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 21 11:36:07 PDT 2023
yaxunl added inline comments.
================
Comment at: clang/lib/Headers/__clang_hip_libdevice_declares.h:319
+// relevant.
+__device__ inline _Float16 __llvm_amdgcn_rcp_f16(_Float16 x) {
+ return ((_Float16)1.0f) / x;
----------------
arsenm wrote:
> arsenm wrote:
> > yaxunl wrote:
> > > Can we add the deprecated attribute to urge people not to use them?
> > I initially added those, but thought it was a bit aggressive to put in always included headers. Is there an established practice for deprecating builtin header functions?
> Is there a hip header version macro I could guard this on?
> I initially added those, but thought it was a bit aggressive to put in always included headers. Is there an established practice for deprecating builtin header functions?
I saw it used by libstdc++ headers and pthread headers to deprecate APIs.
I think it is common practice to use deprecate attibute.
We'd also better mention it in clang release note and give a timeline to remove it, e.g. next clang major release.
================
Comment at: clang/lib/Headers/__clang_hip_libdevice_declares.h:319
+// relevant.
+__device__ inline _Float16 __llvm_amdgcn_rcp_f16(_Float16 x) {
+ return ((_Float16)1.0f) / x;
----------------
yaxunl wrote:
> arsenm wrote:
> > arsenm wrote:
> > > yaxunl wrote:
> > > > Can we add the deprecated attribute to urge people not to use them?
> > > I initially added those, but thought it was a bit aggressive to put in always included headers. Is there an established practice for deprecating builtin header functions?
> > Is there a hip header version macro I could guard this on?
> > I initially added those, but thought it was a bit aggressive to put in always included headers. Is there an established practice for deprecating builtin header functions?
>
> I saw it used by libstdc++ headers and pthread headers to deprecate APIs.
>
> I think it is common practice to use deprecate attibute.
>
> We'd also better mention it in clang release note and give a timeline to remove it, e.g. next clang major release.
> Is there a hip header version macro I could guard this on?
Yes like https://github.com/llvm/llvm-project/blob/main/clang/lib/Headers/__clang_hip_runtime_wrapper.h#L80
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155982/new/
https://reviews.llvm.org/D155982
More information about the cfe-commits
mailing list