Apple – Are you going to fix OpenCL & Metal Compute in El Capitan?

I received this email from an angry customer:

“I have purchased FA2, FA3d, and FA4+gpu Module” 

“All programs rendered ok on the gpu’s ,  now this El Capitan has arrived  and none of the FA’s render on GPU  anymore .”

“They all render on the CPU ok, but the slow speed  defeats the  object of paying “

“So whats the score , do we have to wait for apple to update their drivers? “

“My Gpu  amd ati radeon hd 6770m – 2011 27inch imac”

At this point, both OpenCL and Metal Compute shaders are unusable for most GPUs incorporated in Mac products on El Capitan.

Back in Mountain Lion, the OpenCL drivers worked on EVERY GPU model shipped with Macs.

Does Apple test OpenCL/Metal with real world applications?

It is very, very easy with Fractal Architect 4.

  1. Download the free app.
  2.  Click the GPU Trial button to open the GPU Trial window.
  3. Turn off the Enforce Quarantine, pick a GPU, then click the button under a fractal to render it.

Is this the new status quo – advertise big new features at WWDC like Metal Compute Shaders on OS X only to find them unusable when released??

Please consider that the OpenCL compiler for all Intel GPUs was unable by this app since Mavericks (due to compile issues as reported in a bug report to Apple 2 years ago).

Metal Compute shaders have no problem compiling the app’s kernels for Intel GPUs but do cause GPU hangs – never seen before on OpenCL with Nvidia/AMD GPUs. We believe these hangs are caused by debug asserts in Apple’s Metal math library when NaN values are encountered.

I have recently successfully implemented CUDA rendering for the app for Nvidia GPUs on El Capitan, but of course CUDA is not available to customers on the Mac App store. (Important because the OpenCL + Metal drivers are now broken in El Capitan)

CUDA drivers are meticulously maintained by Nvidia and are the closest thing we have to Reference GPU compute API. And they work very well on OS X.

Neither the developer nor customers have any idea if these bugs will ever be addressed. We are all totally in the dark.

When the OpenCL/Metal drivers work, they deliver huge performance increases.

We have released multiple versions of Fractal Architect using OpenCL on the Mac App Store since 2011. Today we offer rendering on OpenCL, Metal, and CUDA (but not on Mac App store).

FA4 version 4.20 released

Changes:.

  1. Metal rendering support for Intel Iris and Intel HD GPUs on OS X El Capitan.
  2. Metal rendering does not work for all fractals.
  3. Metal rendering not supported for AMD and Nvidia GPUs at this time.
  4. Added Gpu Compatibility Report to GPU Trial Window
  5. Removed color matching code not compatible with OS X El Capitan
  6. Removed color out-of-gamut check and soft proofing from Preview window not compatible with OS X El Capitan
  7. GPU Trial window now has Enforce Quarantine checkbox.
    Turning it off allows you to do trial renders on quarantined GPUs.
    Alert shown when you turn off the quarantine.

Metal rendering can cause GPU hangs for certain fractals (about 10% of them). GPU hangs cause your Mac to freeze for about 10 seconds (while the GPU restarts).

Normally, we would not have released this enhancement with the potential GPU hang issue, EXCEPT that on Intel GPUs the render speed performance is really good.

For those of you on Macbook Airs, we are getting 9 to 12X faster renders. You will experience GPU hangs with some fractals, but you always have the option of rendering those on the CPU — slower but robust.

Because of this GPU hang issue, Metal rendering is ONLY used in the app where you render a single fractal at a time – Preview window, Render to file, Quicklook.

Note: Intel HD 4000 (an older GPU) Metal rendering does not work on El Captitan 10.11, but it does work on 10.11.1 Beta. Its a slow GPU, so the performance is only 40% faster than on CPU.

OpenCl Rendering On OS X El Capitan

Lets be frank. Apple’s OpenCL drivers are in terrible shape in El Capitan.

On a 2015 Macbook Pro with AMD Radeon M9 370X GPU, renders are 45% slower than Yosemite 10.10.5. Metal is no alternative as its compilers can’t handle the app’s kernels on AMD GPUs.

On a 2012 Retina Macbook Pro with Nvidia 650M GT GPU, the OpenCL driver crashes the app in a function named LaunchGrid. In earlier OS X versions 10.7 through 10.10, the OpenCL drivers on this Mac were rock solid. Also Metal does not work for this GPU either.

OpenCL on Intel GPUs have never been able to compile the app’s kernels (except during Mavericks 10.9 Beta).  Metal does work on recent Intel GPUs, but a persistent GPU hang issue caused by that implementation, is a serius critical issue.

I apologize to my customers. I have no control over the quality of Apple’s OpenCL and Metal drivers.

 

Metal Rendering On OS X El Capitan

Version 4.2.0 of Fractal Architect 4 adds GPU rendering support for Metal on OS X El Capitan.

Lets be honest about the state of Metal Compute on Mac OS X in the initial release of El Capitan OS X. There are a lot of critical issues on all of the GPU platforms, AMD, Nvidia, and Intel. Only the Intel platform is stable enough to support this app’s flame fractal rendering algorithm. But it has significant issues too.

Render Performance using Metal on OS X El Capitan GM

(Mips is Millions of Iterations per Second an internal app measure, that is directly related to render performance)

2013 Macbook Air using Intel HD 5000 GPU

CPU: 10.01 Mips
GPU: 87.60 Mips     8.75X faster than  using  CPU

2015 Macbook Pro with Intel Iris Pro

CPU:  25.68 Mips
GPU: 124.09 Mips   3.42X faster than using CPU

The 2015 Macbook Pro also has a AMD Radeon R9 M370X GPU. Here are the rendering speeds for it on OpenCL:

Yosemite 10.10.5      AMD GPU:        157.83 Mips
El Capitan 10.11 GM   AMD GPU:          87.92 Mips

Note that the OpenCL driver performance went down 45% from Yosemite to El Capitan – NOT good!

Important Note: We are experiencing GPU hangs with some fractals  using Metal Compute.  GPU Hangs are the bomb. Entire Mac acts like it has frozen for about 10 secs until GPU resets. This behavior is unique to Metal Compute.

Metal Compute Stability seen in testing

GPU Family Test Results
Intel Iris Pro GOOD:
+ Intel HD 5000   Performance 9 to 12X faster than CPU
BAD:
  GPU Hangs on about 10% of fractals
  OpenCL drivers have no problems with this
Intel HD 4000 BAD: Very slow kernel compiles
GOOD: Performance 1.4X faster than CPU
AMD BAD: Kernel compile failure at 2 min 20 secs
Nvidia 650M GOOD: Kernel compiles in 5 secs
BAD: Garbage Output