[Beignet] Optional features and OpenCL 2.0 support.

Zhigang Gong zhigang.gong at linux.intel.com
Thu Jul 17 17:53:55 PDT 2014


On Thu, Jul 17, 2014 at 03:54:04PM -0400, Yichao Yu wrote:
> On Thu, Jul 17, 2014 at 11:50 AM, Zhigang Gong
> <zhigang.gong at linux.intel.com> wrote:
> > Hi,
> >
> > 2.0 support will be a relatively long tern task and I would like
> > to defer its discussion to a proper time frame in the future.
> 
> I C.
> 
> >
> > As to the "double" support, although IVB introduces double data type,
> > the support is not really complete. You may notice there is a unit
> > test which is to check double precision. And it fails on IVB but success
> > on HSW. And besides the precision issue, you can refer the IVB or HSW
> > ISA spec, the math extension instruction lacks support of math which
> > means we need to do those double builtin math function at software level
> > completely which is really slow and is not a tiny effort. So the conclusion
> > of double support is that it may make no sense on IVB platform due to
> > precision issue. And it needs some effort on HSW platform to fix the
> > math extension gap.
> 
> I am actually using a Haswell CPU and my main application only need
> linear algebra so it would still benefit from fp64 support on Haswell.
> Is there any soft math function libraries that can be borrowed here?
> (glibc? libclc?)
Right, we already use some of them for the float version math function.
We will not implement "double" support from scratch, even though it's
not an easy task. Given the fact that the major using scenario is image
processing currently which we think single float should be good enough.
And you know we don't have too much resources. We have to prioritize
things. "Double" support is in a relatively low priority now.

To support pure linear algebra is not hard, but if we want to enable the
cl_khr_fp64, we have to provide all the builtin double functions as well.

Anyway, thanks for bringing up this discussion.

To the beignet users in this list, if you have strong requirement of
double support on HSW, please let us know the details. And we may adjust
priority according the feedback from you. Thanks.

> 
> >
> > On Thu, Jul 17, 2014 at 09:23:12AM -0400, Yichao Yu wrote:
> >> Hi,
> >>
> >> I've recently noticed that 64bit floating point numbers are not
> >> supported by beignet but according to a post I have found[1], the GPU
> >> in IvyBridge chip does support fp64. Is this currently limited by the
> >> driver or is there any issue with the hardware as well? Also, I guess
> >> the compiler error message should be changed as well. The beignet
> >> compiler still complain about not having the corresonding #progma
> >> statement when double type is used while fp64 is already a optional
> >> feature rather than an extension for OpenCL 1.2 (yeah I know that the
> >> feature is not supported now but that error message is still wrong and
> >> misleading). The error message when using double (with the #progma
> >> statement) is also quite confusing as well (it talks about overloading
> >> functions not available...)
> > The weird error message may due to we haven't provide those "double"
> > version builtin function's prototype. Anyway, if you check the extension
> > string you can find out that beignet doesn't cl_khr_fp64. So beignet
> > doesn't provide those prototype seems not a big issue, as the application
> > should check whether the platform has cl_khr_fp64 extension and then
> > choose different kernel to use. What do you think?
> 
> I totally agree. I just think it is a little bit confusing. Especially
> the error message without "enabling fp64 extension" seems to suggest
> that it is supported. The current implementation is definately fine in
> terms of standard compatibility.
> 
> >
> >>
> >> Since it has been ~1yr after the OpenCL 2.0 release with a lot of
> >> interesting new features, it would be nice to know whether/when it
> >> will be supported by beignet, especially since AMD is planing for
> >> supporting it in Q4 2014. While features like dynamic parallelism
> >> might need new hardware, should it be possible to support sth like svm
> >> with existing hardware.
> >>
> >> Just to be clear, the OpenCL 2.0 part is by no mean a feature
> >> request/bug report (on the other hand, it would be nice to see fp64
> >> support if the hardware does have the capability). Since beignet is an
> >> opensource project, I just think this might be the right place to ask
> >> about the capability of the hardware as well as future plan (after
> >> OpenCL 1.2 support).
> >>
> >> Yichao Yu
> >>
> >> [1] http://www.realworldtech.com/ivy-bridge-gpu/5/
> >> _______________________________________________
> >> Beignet mailing list
> >> Beignet at lists.freedesktop.org
> >> http://lists.freedesktop.org/mailman/listinfo/beignet
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list