No announcement yet.

Gallium3D OpenCL (clover) reached an important milestone

  • Filter
  • Time
  • Show
Clear All
new posts

  • Gallium3D OpenCL (clover) reached an important milestone

    A Google Summer of Code participant is working on clover (, and apparently he reached a quite important milestone yesterday:

    Hello, Today is a big day for Clover : we can finally use it to execute native kernels on the processor, in a command queue, asynchronously, and multiple one can be executed in parallel. A native k…

    It is now possible to execute native kernels on the CPU. This should mean that all important OpenCL pieces (Contexts, Command queues, Buffer objects, Mutexes, Threads etc.) are implemented somehow - except the LLVM compiler. It should now be possible to write an OpenCL application, compile it using GCC and have it run multiple compute kernels in parallel on the CPU.

    GPU execution won't be possible until the whole LLVM chain is in place, but with the current stack it should already be possible to get some existing C/C++ OpenCL applications working on the CPU and test the stack further.

  • #2

    Yes, it's quite a milestone, but it doesn't mean that applications will work. The API for native kernels is way simpler than the one for normal kernels (that can also be executed on the CPU), and applications must ask for native kernels.

    The difference between native kernels and normal kernels is that the normal ones are fed with OpenCL C code that is compiled, and then executed. Native ones are a direct call to a C or C++ function, like shown in the example on my blog.

    Very little applications use native kernels, they prefer to use normal ones that can be executed on the GPU or on the CPU. If they don't need GPU acceleration, they use OpenMP, not native OpenCL kernels. When these kernels will be implemented, applications will finally begin to work, but it will take some time.

    But you are right about the fact that it's a big milestone : its shows that thousands of lines of code work, all the context, devices, memory objects, the abstraction layer, and the command queues full of mutexes and threads. Clover is about 3400 SLOC long, and I'm happy to say that all these lines are finally useful .

    Thanks for reporting my progress on this website .


    • #3
      Michael must put this on the first page

      congratulations and keep up the good work


      • #4
        This is really *great* news!
        Keep up the good work!!

        *Thank you*,


        • #5
          Congratulations steckdenis,

          I'm going to follow your blog & progress.
          Keep up the good work

          Rafael Campos
          o0 Methrl 0o


          • #6
            Hello, Another Clover milestone was hit today ! During my holidays (from July 4 to July 15), I worked on the OpenCL C compiler based on Clang that is used in Clover to compile OpenCL programs. I al…

            Michael i think this is news worthy ???


            • #7
              Yep, that looks seriously news-worthy. Seems like a true "it's alive !!" milestone.
              Test signature


              • #8
                I think it's hard for us to know when our own work is newsworthy or not. If he thought it could use news or testing at this point in time, he'd undoubtedly have contacted someone.


                • #9
                  Clover is now API complete according to the git logs


                  • #10

                    Thanks for watching the git logs . The latest commit adds test cases for the last functions not already covered. It also fixes some small bugs in CommandQueue to make it working the expected way when there are markers.

                    So yes, Clover is in a very good shape and begins to be usable by real applications, or will be so in the near future (there are for the moment no built-in OpenCL C functions, so only useless kernels can be run). I post my progress on my blog (, very technical) and let Michael decide if a news is interesting enough to be posted on Phoronix.

                    The next days will see the implementation of barrier(), the hardiest built-in function needing a bit of refactoring. Then the image built-ins and mathematical ones will follow until the end of the Google Summer of Code program. I will post when Clover will be able to launch Darktable, but I don't know if I still have a lot of work to do or only a little bit.