Blender 2.9 CUDA on Mac

Hardware Overview:

Model Name: Mac Pro
Model Identifier: MacPro5,1
Processor Name: 6-Core Intel Xeon
Processor Speed: 3,46 GHz
Number of Processors: 2
Total Number of Cores: 12
L2 Cache (per Core): 256 KB
L3 Cache (per Processor): 12 MB
Memory: 64 GB
Boot ROM Version: 144.0.0.0.0
SMC Version (system): 1.39f11
SMC Version (processor tray): 1.39f11
Serial Number (system): C07K509CF4MH
Serial Number (processor tray): J530400F5BH8C
Hardware UUID: 55920A08-00B8-5BC9-A355-62973637A5FD

System Software Overview:

System Version: macOS 10.13.6 (17G14019)
Kernel Version: Darwin 17.7.0
Boot Volume: MACPRO
Boot Mode: Normal
Computer Name: MACPRO
User Name: Hdalio (hdalio)
Secure Virtual Memory: Enabled
System Integrity Protection: Disabled
Time since boot: 4 days 9:47

If you just want to use GPU for renders, then you should consider using a cloud system, eg AWS EC2 P2 instances. It’s pretty easy to setup, and also pretty inexpensive. I budget 8-12 usd per minute of animation (24 fps) for something that takes the 1050 Ti in my mac 10-20 min per frame to render; and the actual render time on the cloud depends on how many instances are running in parallel, which is perfect for meeting tight deadlines. Alternatively if you already bought an expensive GPU, you can put it in a “cheap” linux box and get a cheaper GPU to support the editing / live preview using Eevee (that’s what I did initially, but now for any serious rendering I use AWS, just use the linux box for testing new code or setup that will end up on the cloud machines).

What is your GPU model?

GPUS:

Nvidia GTX Titan XP (Pascal)

Nvidia Geforce GTX 1080 TI

Ok I’ve made a binary with 2.93.0 alpha with CUDA 6.1 support (ie matching the Titan XP (wow!) and the 1080).

Note for the compilation: 2.93 uses python3.9, which in turns uses “__isPlatformVersionAtLeast”, a post-10.13 symbol, so I had to implement that from scratch. I tried a few scenes with moderate complexity and nothing crashed so I’m thinking it’s all good, but that + the software is alpha state, so save often just in case.

File blender.2.93.0_alpha.dmg (248 mb) is at: https://drive.google.com/file/d/1JqyP9L9YKXQmbhFxLWdPs8xAQozIzwYo/view?usp=sharing

2 Likes

I am very grateful Hugo, Thank you very much!!
I copy the Blender File to Aplications?
and the other files?

Screen Shot 2021-02-16 at 08.24.27

Pleasure! I think you only need the Blender folder/app, but I put the rest of the stuff just in case…
Let me know if it is running!

Hugo, copy of blender replaces the file, opened everything ok, but it does not appear in the cuda in the System part, do I need to reset some preferences or files from the old version?

1 Like

It’s in the Add-ons section, way down at the Cycles options: there’s a CUDA tab, in which you should see (and activate) the graphic cards.

2 Likes

I am very grateful for helping me to succeed Hugo!
It’s working successfully !!!

2 Likes

Hey Hugo, could you go into a bit more detail on this?

I managed to get a 2.93 Alpha build before, but now when I try to update & build again, I’m getting this error:

Configuring Blender in “/Users/joeyvfx/blender-git/build_darwin” …
– Detected OS X 10.14 and Xcode 10.1 at /Applications/Xcode.app
– OSX_SYSROOT_PREFIX: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform
– Detected OSX_SYSROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
CMake Error at build_files/cmake/platform/platform_apple.cmake:160 (message):
Python executable missing:
/Users/joeydeutsch/blender-git/blender/…/lib/darwin/python/bin/python3.7m
Call Stack (most recent call first):
CMakeLists.txt:917 (include)

Does the python version have anything to do with this? I’d love to know what you did to get that working. Thanks!

It’s because CMakeCache.txt has old variables/paths. Delete the file and start over.

The python3.9 lib is imported by cmake update (lib/darwin/python/lib/libpython3.9.a)… hopefully deleting CMakeCache.txt will work for you, but it didn’t for me… Instead I added the file blender/intern/ghost/intern/GHOST_missingSymbolsCocoa.mm, and put the following code in it:

#import <Cocoa/Cocoa.h>

#include <cstdlib>
using std::size_t;

bool isPlatformVersionAtLeast(size_t major, size_t minor = 0, size_t patch = 0 ) {
   const NSOperatingSystemVersion version = {
       .majorVersion = static_cast<NSInteger>(major),
       .minorVersion = static_cast<NSInteger>(minor),
       .patchVersion = static_cast<NSInteger>(patch),
   };
   // isOperatingSystemAtLeastVersion vs isOSVersionAtLeast
   return [[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:version];
}

extern "C" {
  bool __isPlatformVersionAtLeast(size_t major, size_t minor = 0, size_t patch = 0) {
    return isPlatformVersionAtLeast(major, minor, patch);
  }
}

Then I added a conditional compile of the new file in the blender/intern/ghost/CMakeLists.txt (around line 410):

if(APPLE)
  list(APPEND SRC
    intern/GHOST_SystemPathsCocoa.h
    intern/GHOST_SystemPathsCocoa.mm
    if(WITH_OLDOSX)
      intern/GHOST_missingSymbolsCocoa.mm
    endif()
  )

And added WITH_OLDOSX in the build command.
By the way can someone explain to me how to create a new extern lib that does get linked? I could get the code compiled and put in a lib as an extern section, but just not get the linker to pick it up during the final link.

Thank you Hugo, I managed to build it successfully with your instructions!
Although I installed cmake from a downloaded .dmg + manually add to paths because brew through me an error on this one, and after a few trials it started a potent brew of errors.
The git clone https://git.blender.org/blender.git brought me the 3.0.0 Alpha branch but it worked.
Enabling OptiX denoiser crashed my computer and we’ll probably never get the 7.x SDK on mac to build with OptiX… I have a GTX 1060, and Optix denoiser works on Linux… :slight_smile:

Hi Hugo, how are you?
Can you tell me if this new Blender version 2.93 is possible to compile for GPUs?

Hello everyone. I have finally moved to Blender 2.9x from 2.7x and read about the CUDA issue and found this intriguing thread.

First, Hugo, thank you for taking this on. Wow. What a gift to the community.
2nd. Most of this thread is a foreign language to me. I’ve never compiled anything so attempting to do this task is a bit daunting and honestly, not where my passions lie. Also, one of the links on the webpage that is referenced further up this page is broken about doing something with “Hugo’s Method.”

What are the chances of getting a copy of blender with the Hugo’s coding fix for CUDA that is already compiled and ready to use? Is it possible, and if it is, what would feel reciprocal to whomever would be willing to provide it?

I am running mid 2010 Mac Pro tower with a 12gb Nvidia TITAN board. So sad to see it’s lonely and idle green glow through the grate.

Thoughts?

Thank you.

Thank you for the nice comments! Have you tried the 2.93_alpha build that’s on the google drive? That is a good step forward to see if your machine can run with the binaries I can produce, and if so, then I can look at getting a producing a 2.93 binary from the current branch.

Hello, kind user!! You’ve got my first message on the devtalk site.

Might be possible that you re-upload the file you lovely uploaded months ago?
I’ve been searching the through the web and THIS is the only solution I could found (In the world probably??). <3 ■■■■■■■ love you, Hugo.

Hi Hugo How Are You?

Sorry to bother you with this, but do you still have the compiled version you made for me?
I did a format on mac and I can’t find it!

Thanks!

Hello thank You for providing a compiled version of Blender 2.93 with Cuda but the google drive account does not offer this file anymore, can anybody upload this again or even compile a LTS version, I would be very happy still using cycles on nvidia hardware @Sierra on mac

thanks to community

PS I was reading : HUGO | TECH | 3D & Animation

but I am either a programmer nor understanding how to compile with homebrew or Xcode

thanks for help