this patch guards all missed half float functions based on the availabiltiy of the OpenCL extension cl_khr_fp16.
I think the extension is for all half https://www.khronos.org/registry/OpenCL/sdk/1.2/docs/man/xhtml/cl_khr_fp16.html
This extension adds support for half scalar and vector types as built-in types that can be used for arithmetic operations, conversions, etc. An application that wants to use half and halfn types will need to include the directive shown above.
These built-ins are part of the core specification, which doesn't allow using half data type directly, but user can declare a pointer to half data type and use built-ins like vload_half/vstore_half converting half data type to float data type.
cl_khr_fp16 enables regular uses of half data types as well as built-ins returning half data type instead of float - vload/vstore.