[PATCH] D46501: [OpenCL] Guard all half float usage based on cl_khr_fp16 extension

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 23 03:53:14 PDT 2018

Anastasia added a comment.

In https://reviews.llvm.org/D46501#1089777, @yaxunl wrote:

> Only halfn type requires cl_khr_fp16. These functions do not use halfn type, therefore cl_khr_fp16 is not required.

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.

  rC Clang


More information about the cfe-commits mailing list