Post Reply 

How do I enable OpenCL GPGPU in GEGL?

May 24, 2012, 15:05
Post: #1
How do I enable OpenCL GPGPU in GEGL?
One of the features I was most interested in with the 2.8 release was the addition of GEGL to GIMP. I've always been a fan of OpenCL and it's capabilities, but today, while fixing a picture of me and my wife, I tried using a GEGL operation (C2G), and it was glacially slow. At first, I thought it was just the massive resolution of the picture, but when I looked at task manager, GIMP was using exactly 25 percent of my quad-core CPU. When I set affinity to just one core, sure enough, it flat-lined that core at 100 percent. My only conclusion is that OpenCL, for some reason, isn't enabled and GEGL is falling back on CPU rendering on one core. I know I have all of the drivers installed, because I use OpenCL all the time in Luxrender, but I can't seem to find any help online. The "use GEGL" check-box *is* enabled under 'colors' (even though I don't konw why it would be there instead of under 'tools'). Either way, help would be appreciated. Thanks in advance.
Find all posts by this user
Quote this message in a reply
May 24, 2012, 20:58
Post: #2
RE: How do I enable OpenCL GPGPU in GEGL?
I think you have been misinformed about GIMP 2.8 and GEGL. What's in 2.8 is the same as 2.6 - an experimental implementation, and yes, C2G is extremely slow.

The development work has now moved onto changing GIMP to use GEGL (see 2012-04-17 news on http://www.gimp.org/ ) and there are Google Summer of Code projects involved: https://plus.google.com/u/0/116634837115...VWCSzkjPWj
Find all posts by this user
Quote this message in a reply
May 29, 2012, 13:08 (This post was last modified: May 29, 2012 13:09 by kringel.)
Post: #3
RE: How do I enable OpenCL GPGPU in GEGL?
(May 24, 2012 15:05)ashinms Wrote:  (...) My only conclusion is that OpenCL, for some reason, isn't enabled and GEGL is falling back on CPU rendering on one core. (...)

True! Starting with GIMP 2.8 you can start GIMP from the command line with the environmental variable GEGL_USE_OPENCL=yes

So on Linux command line for example: GEGL_USE_OPENCL=yes gimp-2.8 &

1.) Make sure you start GIMP with this option enabled.
2.) first, open a picture file
3.) then, in the menubar >View >Use GEGL
4.) and, again in the menubar >Colors >Use GEGL
(3. and 4. must be repeated everytime you open any new image file)
5.) of course, your graphics card an driver must have working support for OpenCL

Please see http://gimp.org/ news-entry from 2012-04-08:
Quote:GEGL and babl updated, GIMP 2.8rc1 released - We released new versions of GEGL and babl, quickly followed by the first release candidate of GIMP 2.8.

GEGL 0.2.0 has some major improvements and breaks API/ABI compatibility with earlier versions for some very good reasons.

Perhaps the most exciting change in GEGL is an initial support for GPU-side rendering and processing via OpenCL. Hardware acceleration makes it possible to leverage many operations to GPUs which can dramatically improve performance.

The foundation for this feature was laid by Jerson Michael Perpetua as the primary objective of his GSoC2009 project. The second part of the project was done by Victor Oliveira during GSoC2011. Victor was also sponsored by AMD to finish the project this winter, with help from GEGL team, Zhang Peixuan and his team from Multicore Ware. Currently you need to run GEGL_USE_OPENCL=yes to use this.

Two new essential operations were contributed to GEGL. Mikael Magnusson implemented perspective transformation, and Jan Rüegg submitted a global matting operation that would be required for a GEGL-based foreground selection tool.

Since this version GEGL also supports internationalization. The final patches for that were delivered by Michael Muré. Translations into German, French, Polish, Russian, Slovenian and Spanish languages are available, and we expect more to follow. Users of GIMP 2.8 will see this in the experimental GEGL operation tool.

The changes in GIMP 2.8rc1 since 2.7.5 are mostly not user-visible. We merely updated the code to work with newer versions of GEGL and babl, fixed GFig rendering issues and used all the translation updates we got to the point. There is still time to review your translations and submit updates, although probably not too much of it.

Please use the Downloads section to fetch source code of GIMP 2.8rc1 and visit gegl.org for source code of GEGL and babl. Let us know if you run into serious regressions that haven't been reported yet.
Find all posts by this user
Quote this message in a reply
Jun 5, 2012, 03:51
Post: #4
RE: How do I enable OpenCL GPGPU in GEGL?
See also: "GIMP 2.8 RC 1 arrives with GPU acceleration", http://www.h-online.com/open/news/item/G...rom-mobi=1
and "GIMP 2.8 RC 1 includes OpenCL acceleration", http://www.nvnews.net/vbulletin/showthread.php?t=178056
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [FIX] Enable Pressure Sensitivity in 2.8 BnBGobo99 1 2,508 Mar 20, 2013 19:19
Last Post: Tapokr

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS