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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to