OpenCL & Mac Lion OS X

Preview 3 of Lion OS X features OpenCL 1.1 and Graphics acceleration for Fermi Cards.
There is a way to fix OpenCL for Lion OS X. Start developing for Lion OS X you might be surprised if what you coded for Snow Leopard has incompatibilities with Lion OS X.

Cheers,
Alexander.

Doesn’t wonder me. Snow Leopard OpenCL is incompatible to the standard in a number of places.

Well now you have the opportunity to code using the new features of OpenCL 1.1. Also the fact that Lion OS X has started supporting Fermi means many things.

Worth mentioning books for OpenCL :

Heterogeneous Computing with OpenCL

OpenCL Programming Guide

For the last book I am certain it covers material for OpenCL 1.1.

Cheers,

Alexander.

Thanks, I am already coding for 1.1. It’s just annoying to have to use all the workarounds to also keep the code running on the Snow Leopard based Laptop. Therefore I am actually really looking forward to the official release of Lion. :)

And for me time to buy a magic track pad. :-)

Now that I see oclDeviceQuery

I am getting this info :

CL_DRIVER_VERSION: CLH 1.0

CL_DEVICE_VERSION: OpenCL 1.1

CL_DEVICE_OPENCL_C_VERSION: OpenCL C 1.1

I will run some tests to test OpenCL 1.1 when I find time to deal with downloading and installing Xcode.

Cheers,

Alexander.

One of the most interesting things I observed is that for instance the OpenCL application qjulia (Apple’s raytracing of a 4D quaternion) gives a static 95fps opposed to 40 fps in Snow Leopard. This means that a lot of optimization has been done. Lion OS X is going to provide a lot of exciting surprises…

Also ATI should really provide with an SDK for Apple. Even OCLinfo does not work…believe it or not it fails on program.build(device) for the CPU and the GPU. Something does not go well on the wrapper. Anyway by avoiding the execution of the Kernel the info output is that OpenCL 1.1 is supported.

When you say Lion supports graphics acceleration for Fermi Cards, do you know if they are also now supporting Fermi cards as OpenCL devices?

I specifically bought a NVIDIA Quadro 4000 from Apple for my Mac Pro and have been frustrated that OS 10.6 OpenCL does not support it.

Thanks.

Yes you need to do some hacking though, I think that the need to have OpenCL for Fermi cards justify me pointing at this site :

http://netkas.org/?p=794

HexEdit as it instructs and you will have OpenCL on your Quadro. Save the bundle before you alter it just in case.

Edit : People who have background in GPGPU should already realize that the term GPGPU is shifting to heterogenous device computing. OpenCL offers this transition. However it is nice having a CUDA enabled device since many software companies, academia institutes, have already invested on CUDA. Mac OS X for me is the definite system for OpenCL. Firstly it is guaranteed that your program will run on all systems having Mac OS X. Secondly it is Unix based which is a huge plus. Thirdly Apple creates the Framework meaning that there is a uniform way to code on all the devices it supports. In Windows and Linux you should have the drivers of a specific vendor.

Anyone experience with OpenCL + NVIDIA on the final version of Lion?

Regards,
Markus

PS: Not yet decided when to upgrade on my private machine, will take a while until I get it for my office machine, but very curious!

Does NVIDIA Visual Profiler work in Lion? I can’t get it to work in Snow Leopard, and I think it’s because of Apple’s implementation of OpenCL; maybe in Lion it’s possible to profile OpenCL programs…

OpenCL works with Lion vs SL a bit faster. For my 9600 GT its not much diff, only a few like OceanWave run significant faster.

The faster the gpu the more benefit by newer Lion OPenCL Framework/Driver.

LUXMARK, an well known OpenCL raytraycing benchmark (AMD uses it itself for tests / benchmarks) is available in an V2.0 version.

Also the resuts database was updated (LUXMARK can submit results).

LUXMARK

DL: Mac OS X 64 Bit: LUXMARK V2 OS X

Results DB (you can also use new searcg funktion to select OS , GPU type, for narrowing shown results)

LUXMARK V2 results DB

You will find real Macs and, if GPU TYPE is Fermi (GTX 4/5xx) hackintoshs ;) Fermi gpu users need, as someone told already an patch (few bytes hex) to get OpenCL run.

Because no AMD 7xxx GPU possible (even for Hackintoshs) , fastest OpenCL GPus are Nvidia Fermi at this time.

Some results i collected : Luxmark V2 , gpu only, default Scene SALA (medium)

AMD 7970 (Win!) = 1800

Nvidia GTX 580 (“MSI Ligtning”) = 1230

Nvidia GTX 560 = 620

MacPro AMD Radeon 5870 Mac = 588

AMD Radeon HIS 6870 OS X 10.7.2 = 484

MacPro AMD Radeon 5770 Mac = 306

AMD Sapphire 6850 = 351

AMD Radeon 5770 = 315

AMD Radeon 4850 = 224

Nvidia GTS 240 *2 = 191

AMD Radeon 4830, OS X 10.7.2 = 151

iMac AMD Radeon 6750M = 151

Geforce 9800GT 512 MB = 78

9600 GT , OS X 10.7.3 = 77

Hi,

I am just starting with OpenCL and Nvidia. I apologize for this rookie question. I am trying to get nvvp Visual profiler working with OpenCL on Mac OSX Lion. I am using the Nvidia include files and libraries in Developer/GPU computing/OpenCL. I have used g++ and clang. I can compile and run code from a terminal with a make file. But I cannot profile the code in nvvp. The message is that there is no timeline. It compiles and runs in the nvvp console window, but the analysis window says no timeline.

I notice when I attempt to profile the oclBlackScholes that I get WARNING: “Nvidia OpenCL platform not found - defaulting to first platform.”

I can profile the CUDA samples provided by Nvidia without a problem, but none of the OpenCL examples. Bandwidth test is the simplest example of something that works under CUDA but not the oclBandwidthTest version in the samples.

I am sure this is something simple but I don’t get it. I can’t find any explanation of how to do this on web nor blog.

Thanks for any help you can provide.

Regards

You cannot profile OpenCL programs on OSX since nvvp needs the program to be linked against NVIDIA’s OpenCL implementation, which is not available for OSX. If you look at the drivers installation package, there is no OpenCL library in there. Hope that helps.

Hi, for my knowledge there is an OpenGL + OpenCL debugger (profiler?) for OS X:.

http://www.gremedy.com/?sdk

Screenshoots:
http://www.gremedy.com/screenshotsCL.php

Its free - i dont know if also the latest version is free.
The bad - its not supporting OS X 10.7 already. (10.5 -10.6)

Hello all,
I am a newbie to openCL and I am trying to work it in lion OS. I remember reading somewhere that lion OS comes with openCL already installed under /Developer/GPU Computing/openCL. But I don’t find that folder in my machine!
Am I supposed to install the openCL SDK separately? If so, where can I download it from?
Any help would be greatly appreciated.
Thanks.