Jump to content
  • Announcements

    • Allan

      Forum Rules   04/13/2018

      Hello folks! As some things are being fixed, we'll keep you updated. Per hour the Forum Rules don't have a dedicated "Tab", so here is the place that we have our Rules back. New Users Lounge > [READ] - InsanelyMac Forum Rules - The InsanelyMac Staff Team. 
cmf

OpenCL fix for non-GF100/GF110 cards (aka CC/SM 2.1+)

140 posts in this topic

Recommended Posts

@cmf,

I did the edits to the GeForceGLDriver and

libclh.dylib. From you description, it sounds like I DO NOT need to do the

echo

"export CL_ENABLE_SM2_DEVICE=1"

>>

~/.

profile, correct?

 

Also, are you getting even remotely the same benchmarks as you did in 10.7.2?

I've done all the correct manual edits to AGPM.kext, NVDAGF100Hal, and GeForceGLDriver, but after the update to 10.7.3, my score dropped from 45.22 to 35.67. My Luxmark 1.0 Score dropped from 7115 to 4550. Also, with LuxMark 2.0, it does not show my clock speed (it actually shows 0 MHz), and I get a whopping 133 score for the Room Scene.

 

I know it's comparing apples and oranges (or Apples & Windows), but my GTX 570 HD gets a 55.70 Cinebench score in Win 7 x64. 45 wasn't great, but it was at least in the ballpark. 35 is barely above half of the Windows score.

Share this post


Link to post
Share on other sites

@cmf,

I did the edits to the GeForceGLDriver and

libclh.dylib. From you description, it sounds like I DO NOT need to do the

echo

"export CL_ENABLE_SM2_DEVICE=1"

>>

~/.

profile, correct?

yep, not necessary for now.

 

Also, are you getting even remotely the same benchmarks as you did in 10.7.2?

I've done all the correct manual edits to AGPM.kext, NVDAGF100Hal, and GeForceGLDriver, but after the update to 10.7.3, my score dropped from 45.22 to 35.67. My Luxmark 1.0 Score dropped from 7115 to 4550. Also, with LuxMark 2.0, it does not show my clock speed (it actually shows 0 MHz), and I get a whopping 133 score for the Room Scene.

 

I know it's comparing apples and oranges (or Apples & Windows), but my GTX 570 HD gets a 55.70 Cinebench score in Win 7 x64. 45 wasn't great, but it was at least in the ballpark. 35 is barely above half of the Windows score.

uhm, hard to say, at least for the opencl part. i'd say it's about the same and depending on what you're doing apples opencl implementation can be faster or slower than nvidias implementation.

for the opengl part, well, opengl performance on os x has always sucked and nvidias opengl drivers on windows/linux/... are far superior (including shader compiler optimizations at which apple should actually be good at ...).

and concerning benchmarks: they are not everything. things can easily go wrong on both sides. and i'd like to think that apple has better tests/indicators than some benchmark to tell if their implementations performance has dropped by 50% or whatever.

 

and correct clock speed (+cache sizes) display has sadly never worked for fermi gpus on 10.7.

Share this post


Link to post
Share on other sites

@cmf,

 

Thanks very much for the explanation. SO basically the echo command sets a user configuration file which I ran anyhow even though I did all the necessary hex edits for 10.7.3. SHould I remove that lined of script from the the user profile since its not needed or use leave things alone?

 

Thanks for your great thread!!!!

Share this post


Link to post
Share on other sites

@cmf,

 

Thanks very much for the explanation. SO basically the echo command sets a user configuration file which I ran anyhow even though I did all the necessary hex edits for 10.7.3. SHould I remove that lined of script from the the user profile since its not needed or use leave things alone?

 

Thanks for your great thread!!!!

it doesn't hurt you if you keep it in and it might be beneficial (for a while) when 10.7.4 comes along ;)

Share this post


Link to post
Share on other sites

small 10.8 update (with a disclaimer that i haven't tested anything of this yet):

apple did in fact shuffle some code around and the GeForceGLDriver code that had to be patched to get opencl working is now located in libclh.dylib. however, it seems like the patch is _not_ required any more (as does the other libclh.dylib patch, although it would still be valid), b/c either opencl is fully supported on fermi gpus now (most likely) or they moved the check someplace else that i haven't found yet.

 

some other interesting tidbits (for which i should probably start a new and highly speculative thread ;)):

* there are some references to opengl 4 and opengl es 2 support (since i couldn't test it on my hackintosh yet, i'm not sure if an opengl 4 context can be created ... i however failed to create an opengl 3.3 context on my oldish mbp, which could either mean opengl 3.3 won't be supported at all or apple is still working on it - hoping for the latter and full opengl 4.0+ support of course)

* there are some very interesting kepler related functions/strings in libclh and geforcegldriver (which could mean three things: 1) those are simply remains of nvidias driver code, 2) apple is heavily testing kepler gpus, but nothing is certain yet, 3) next-gen mbps will indeed have a kepler gpu ;)))

* gl drivers are based on R295 which is the most current nvidia driver version for windows/linux/etc. (hoping for better performance and stability)

* opencl version is still 1.1

Share this post


Link to post
Share on other sites

patch /System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/GeForceGLDriver does not work for ML DP3.

any ideas?

Share this post


Link to post
Share on other sites

patch /System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/GeForceGLDriver does not work for ML DP3.

any ideas?

GeForceGLDriver doesn't need to be patched with 10.8 any more.

libclh.dylib however does (if you don't have gf100/gf110 card) and the fix mentioned in the first post still works.

 

 

and ftr: dp3 and dp3 update 1 were kinda borked. dp3 update 2 seems to have fixed everything and works really nice so far :)

 

edit: interestingly, the size of libclh.dylib has increased by 2 mb in dp3. since there is no opencl 1.2 support for nvidia cards yet, i'm guessing kepler support (there are lots of kepler functions in there ...).

Share this post


Link to post
Share on other sites

@cmf,

 

 

Do we need to hex patch the GeoForceGLDriver binary file after 10.7.4 update? I see you do not need to do it for 10.8 is why I ask.

 

If we do not need to Hex edit it for 10.7.4 should we still run the script below?

 

 

 

echo "export CL_ENABLE_SM2_DEVICE=1" >> ~/.profile

 

 

I do understand we still need to patch libclh.dylib as noted in your first post that was edited recently making notes for 10.7.4 and 10.8.

Share this post


Link to post
Share on other sites

Do we need to hex patch the GeoForceGLDriver binary file after 10.7.4 update? I see you do not need to do it for 10.8 is why I ask.

yes, the 10.7.2/10.7.3 fix still works.

 

If we do not need to Hex edit it for 10.7.4 should we still run the script below?

 

 

 

echo "export CL_ENABLE_SM2_DEVICE=1" >> ~/.profile

not necessarily. as long as the GeForceGLDriver binary fix is working, you don't need it.

Share this post


Link to post
Share on other sites

just installed 10.8 dp4 and opencl now works ootb on non-gf100/gf110 cards, so this fix is no longer required :)

Share this post


Link to post
Share on other sites

I have Quadro 4000 MAC card on Lion 10.7.4. I installed the new nvidia driver(Retail_270.00.00f06.dmg), and I can't enable openCL.

I modified GeForceGLDriver and libclh.dylib. After restart I get slow motion in system.

 

I modified these files in apple driver, and everything was good, I could use OpenCL, but now with nvidia, it isn't working.

(In the new nvidia driver I didn't find in info.plist of NVDAGF100Hal.kext the IOPCIPrimaryMatch)

 

Any idea?

Thx

Share this post


Link to post
Share on other sites

just installed 10.8 dp4 and opencl now works ootb on non-gf100/gf110 cards, so this fix is no longer required :)

I had to patch to get OceanWave working on my 460 GTX.

Share this post


Link to post
Share on other sites

Riley Freeman: Which files did you patch? i could only patch the libclh.dylib file. in GeForceGLDriver i couldn't find the right hex-code. So for me (quadro 5000) opencl is still not working :(

Share this post


Link to post
Share on other sites

Here it is. http://ge.tt/5RPfQGJ/v/0?c

 

It's the whole GeForceGLDriver.bundle just in case you didn't keep a backup of the original file before editing. The libclh.dylib is patched.

 

I also included the script I use to patch the file. I just double-click it and it puts a backup copy of libclh.dylib on my desktop and then patches the original file.

Share this post


Link to post
Share on other sites

confirm !

 

not required in DP4

my 460m gtx is rinning perfectly no freeze

Share this post


Link to post
Share on other sites

That's just wrong...re-read the text and watch for "ML" "mountain lion" "ML GM" etc. ;)

 

From the Netkas site:

 

Enabling OpenCL on 10.7.5/mbp2012 drivers and ML GM

 

July 11th 2012 Posted to Apple,Lion,Mountain Lion,Nvidia

 

10.7.5/mbp2012 drivers run opencl on Fermi just fine out of box, no more need to enable it binpatching, but..

If you have a card with more than 2 gb of video memory, opencl suddenly gets disabled, wtf?

Here is why: (warning, assembler skills needed for the pic)

H7DPd.png

basicaly, if your video ram amount > 2GB by at least 1 byte, then you are screwed.

Funny Apple, they decided to control it themselves instead of putting check in the nvidia driver.

But, we can just disable the check and enjoy. End Quote!

 

Exactly what I said. This is a patch to enable cards that COULD normally have OpenCL support, but don't Because they have memory greater than 2GB. This is not a generic OpenCL patch.

Share this post


Link to post
Share on other sites

"This is patch only applies to video cards using the MBP2012 drivers to see cards with more than 2GB RAM."

 

MPB2012 drivers != Mountain Lion

 

but let's stop this stupid argument....

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.

×