Metal Compute Report Card on OS X

Here is the results of using Metal Compute kernels as a replacement for OpenCL in the app Fractal Architect 4.

(We have released versions of this app running on OpenCL since 2011.)



Metal ================================

Intel Iris Pro GOOD:

+ Intel HD 5000 Fast Kernel compile times 5 secs

Great render performance 9 to 12X faster than CPU rendering

BAD:

Repeatable GPU Hangs on about 10% of fractals. (Not random behavior - only affects specific fractals)

Believe Metal math lib is causing GPU panic if a NaN value is encountered. (They should be propagated.)

OpenCL drivers have no problems with this.

GPU Hangs are the bomb. Entire Mac acts like it has frozen for about 10 secs until GPU resets.


Intel HD 4000 BAD: Very slow kernel compiles - succeeds but takes 2 min 57 seconds.

So-so render performance 1.4X faster than CPU rendering

AMD BAD: Kernel compile failure at 2 min 20 secs.


Nvidia 650M GOOD: Kernel compiles in 16 secs

BAD: Garbage Output


We quarantine the devices where Metal does not work. (So users dont have a bad experience)



OpenCL Issues in El Capitan GM =======================


AMD POOR: Render performance down 45% from Yosemite 10.10.5 (as measured with fractal used many times for reporting render performance).

GOOD: Faster kernel compiles than in 10.10


Nvidia 650M BAD: Crashes inside OpenCL driver on El Cap. Had been very robust and good performance since 10.7 in earlier versions of OS X


Intel Iris BAD: Kernel compile failure at 2 min 20 secs. 10.11, 10.10 and 10.9 have the same behavior.

Intel HD Notice how for the same GPUs, Metal compiles very quickly.

This clearly shows its not the kernels - its the compiler at fault.



====================

Summary: From an app useability and stability perspective for GPU compute, El Capitan gets a FAIL.

====================


It is very clear that for Metal Compute and OpenCL to become robust platforms, commercial apps like Fractal Architect 4 are essential for

demonstrating the health of both Metal and OpenCL on all supported GPU types.

Just like a system test suite, the app is a great easy way to evaluate a Metal and/or OpenCL implementation for specific GPUs.


Testing Metal/OpenCL GPU compute using the free Fractal Architect 4 app (version 4.2 and later)

=======================================================

Version 4.2 has a free playground for testing GPU rendering peformance.

You can also turn off the Quarantine of defective Metal/OpenCL instance there, so that you can easily reproduce all of the issues noted above.


HowTo ======

1) Download the app from the Mac App Store and open it.

2) Click the Free GPU Trial button found in the upper left hand corner of the app's main window.

3) There are 4 sets of 4 fractals to use for test renders. For now just pick the first one.

4) Select the CPU device row in the top table. Then click the Render Selected button under one of the fractal thumbnails.

5) Select either the OpenCL or Metal tabs, Select the GPU device row in the top table. Then click the Render Selected button under one of the fractal thumbnails.


If all is well you will see the two rendered fractals in their own image windows and see the performance metrics and GPU/CPU rendering speed ratios.


6) Testing Quarantined GPUs. Click the Enforce Quarantine checkbox to disable the quarantine. You will now see the quarantined GPUs in the table.

Repeat step 5 with a quarantined GPU. You will now experience one of the issues noted above.


Experiencing a GPU hang. =========

1) IF your Mac has an Intel Iris GPU, click the Metal tab and select the Intel GPU device. (They are not quarantined.)

2) Pick either the 3rd or 4th fractal thumbnail in the first set of 4 fractals. Render it. Note how the entire Mac freezes for about 10 seconds.

Check the Console app to see the GPU hang details.


The actual Metal and OpenCL kernels' source code can be found here:

~/Library/Containers/com.centcom.Fractal-Architect4/Data/Library/Application\ Support/FractalArchitect3/VariationSets

Associated Bug Reports:

22814320 El Cap GM Metal can't compile kernels for AMD GPUs

22814306 Metal Compute GPU Hang on Intel devices

22391491 El Cap OpenCL runtime crash on Nvidia GT 650M

21277788 Intel GPU OpenCL Compiler can't compile kernels


These bug reports all have uploaded command line apps and a complete tutorial on how to use those test apps to easily reproduce the bugs

(as an alternative to using the released app from the Mac App Store)

Update: added CUDA rendering support in app. Works great in El Cap. Unfortunately app sandboxing breaks CUDA use...

Metal Compute Report Card on OS X
 
 
Q