[clang] [AMDGPU][Clang] Support for type inferring extended image builtins for AMDGPU (PR #164358)
Juan Manuel Martinez CaamaƱo via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 31 02:46:58 PDT 2025
jmmartinez wrote:
> I'm not sure about the new added `e`. It is very confusing.
>
> > It's ok for me. I wish we didn't have to add the `e` case, but I do not see an easy way out.
>
> Even with the OpenCL `cl_khr_fp16` extension, the FP16 is still just a storage class?
With the `cl_khr_fp16` extension `half` behaves the same as `_Float16` AFAIK. Without `cl_khr_fp16` the only way that I know to operate with `half` is to load/store it using `vload_half/vstore_half` which returns/takes a `float`.
The case that bugs me is the case where the builtins return or take an FP16 value (value and not a pointer).
Without `cl_khr_fp16` those builtins become unusable (declaring `half f()` or even a local `half v;` doesn't compile in OpenCL without `cl_khr_fp16`). But at the same time, does it make sense to use builtins taking/returning half without `cl_khr_fp16`?
https://github.com/llvm/llvm-project/pull/164358
More information about the cfe-commits
mailing list