Hi Nanhai, I'm a developer for AMD working on an Open Source OpenCL implementation for our GPUs. I am very familiar with a number of the active Open Source OpenCL projects, and I have a few comments: > It is not really true to say that the code is duplicated. > Have you done a survey of all the current OpenCL related Open Source projects, because it really looks like several parts of Beignet duplicate functionality that exists in one or more Open Source projects: OpenCL API Implemtation: clover (http://www.mesa3d.com) pocl (http://pocl.sourceforge.net/) OpenCL Builtin Library: pocl libclc (http://libclc.llvm.org/) OpenCL Test Suite: piglit (http://cgit.freedesktop.org/piglit) IvyBridge Compiler intel mesa driver ?? > Beignet maps OpenCL into GPGPU pipeline of IvyBridge+ hardware. > So this is real GPGPU other than mimic GPGPU with 3D functions. The Gallium compute interface has separate state setup and dispatch for compute, so there is no need to mimic anything with 3D functions. > > GPGPU different with 3D pipeline a lot on IvyBridge+. > Both the pipeline setting and run time are totally different than that in 3D driver. > The GPU thread spawn model, thread communication model, memory model are also totally different. The 3D and compute pipelines are different on radeon hardware too, and the gallium interface is designed for hardware like this. > > Also the binary representation is different. > Ben choose LLVM scalar IR for many reasons(you can find the > decision make reason in the document), that means IR backend are different. Clover passes LLVM scalar IR to the drivers. If you had a gallium compute driver for ivy bridge you could tell clover to give you LLVM IR targeted for NVPTX (which appears to be what you are currently generating from clang) and you would get the exact same IR that use for Beignet. > > For GPGPU programming, I don't see a lot benefit to introduce state tracker. > There is not so many states to track. > I think pretty much any OpenCL implementation is a "state tracker", even if it is not called that explicitly. You're right there is not much state for OpenCL, but I think the amount of overhead added by clover is really minimal. > The project is already a functional OpenCL implementation on IvyBridge at this point. > > 1. Most of the language features are supported. > 2. Most of built-in functions are supported. > 3. Global, Local memory, thread barriers are supported. > 3. OpenGL to OpenCL texture sharing are supported. > > We have already implement something like CSS filters with this driver, > and we see performance gain than OpenGL filters. It sounds like a lot of progress has been made. Are there any popular OpenCL applications that work with Beignet? I would be really disappointed to see yet another Open Source OpenCL implementation, and I would encourage you to take another look at clover or pocl and see if it would be possible to merge the Beignet code into one of those projects. I think it would be really easy to merge this code into a gallium driver, because you could drop in your compiler backend completely unchanged and there are really not very many gallium API functions that need to be implemented. I would also encourage you to take a look at the piglit OpenCL framework for tests. The framework is very good and has a lot of convenient helpers that make it easy to write tests, including a scripting language for writing kernel tests. If you have any questions about any of this, please let me know. I am happy to help and look forward to being able to collaborate with your team as I already do with your terrific Open Source graphics team. Thanks, Tom Stellard