Blender 2.9 CUDA on Mac

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