[cfe-dev] [RFC] OpenCL: allow half type as kernel argument type when cl_khr_fp16 is enabled

Liu, Yaxun (Sam) via cfe-dev cfe-dev at lists.llvm.org
Thu Sep 15 11:27:53 PDT 2016


We have two patches related to half. One for diagnosing store to half pointer, the other for allowing half type kernel argument. I will create two reviews.

Thanks.

Sam

From: Liu, Yaxun (Sam)
Sent: Thursday, September 15, 2016 2:21 PM
To: 'Bader, Alexey' <alexey.bader at intel.com>; cfe-dev (cfe-dev at lists.llvm.org) <cfe-dev at lists.llvm.org>; 'anastasia.stulova at arm.com' <anastasia.stulova at arm.com>
Cc: Sumner, Brian <Brian.Sumner at amd.com>; Mekhanoshin, Stanislav <Stanislav.Mekhanoshin at amd.com>; Haustov, Nikolay <Nikolay.Haustov at amd.com>
Subject: RE: [RFC] OpenCL: allow half type as kernel argument type when cl_khr_fp16 is enabled

It does not depend on OpenCL version.

Sam

From: Bader, Alexey [mailto:alexey.bader at intel.com]
Sent: Thursday, September 15, 2016 2:17 PM
To: Liu, Yaxun (Sam) <Yaxun.Liu at amd.com<mailto:Yaxun.Liu at amd.com>>; cfe-dev (cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>) <cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>>; 'anastasia.stulova at arm.com' <anastasia.stulova at arm.com<mailto:anastasia.stulova at arm.com>>
Subject: RE: [RFC] OpenCL: allow half type as kernel argument type when cl_khr_fp16 is enabled

Hi Sam,

I would greatly appreciate if you could contribute your patch.
Is your fix specific to OpenCL C language version?

Thanks,
Alexey

From: Liu, Yaxun (Sam) [mailto:Yaxun.Liu at amd.com]
Sent: Thursday, September 15, 2016 7:46 PM
To: cfe-dev (cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>) <cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>>; 'anastasia.stulova at arm.com' <anastasia.stulova at arm.com<mailto:anastasia.stulova at arm.com>>; Bader, Alexey <alexey.bader at intel.com<mailto:alexey.bader at intel.com>>
Subject: [RFC] OpenCL: allow half type as kernel argument type when cl_khr_fp16 is enabled

Currently Clang does not allow half type as kernel argument type even when cl_khr_fp16 is enabled, which does not make sense since when cl_khr_fp16 is enabled, half type is a valid type for function argument and it has platform independent size.

We have a patch to allow half type as kernel argument when cl_khr_fp16 is enabled. I am wondering if I can upstream it.

Thanks.

Sam

--------------------------------------------------------------------
Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park,
17 Krylatskaya Str., Bldg 4, Moscow 121614,
Russian Federation

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160915/2d4b71e8/attachment.html>


More information about the cfe-dev mailing list