OpenCL on Apple M1

that mod works before it keeping crashing when trying to render thanks :blush:

Great guide Staars thank you for posting. That is exactly what I did except for No 5. I’m actually skeptical No 4 is necessary as I tried it both ways and it worked for both!

The guide certainly works on the X86 build for me and when run under Rosetta 2 on M1 Max GPU rendering works.

I had a really good attempt at getting the ARM native version to build and ultimately failed but I got close. All of those errors Steve-Hanff are from the ARM build as I saw them on that build.

I managed to get the ARM Darwin Libs to download and set the CMake arch to arm64 and it gets so far into the build but still fails. I only tried building using an i9 Intel chip which definitely can compile for ARM.

There is a bug in 3.1 (even the daily X86 and ARM builds) where you can’t select anything reliably in the viewport. If I spot the viewport object selection bug being fixed in the 3.1 master I’ll re-compile again but hopefully by then the Metal patches will have also landed in the daily anyway.

3 Likes

Just followed the entire thread on the blenderArtists forum! The work you guys have done is amazing! Thanks for getting some numbers out so I do some preliminary testing on my current system and benchmark against it :wink: (GTX 1660 Super, Ryzen 5 3600, 32GB RAM).
Will post my results here shortly :slight_smile:

I’m back.
GTX 1660 Super, BMW27.
Blender 3.0.
40s

For further feedback on Metal, let’s use this new topic:

3 Likes

According to Apple, the M1 has the fastest integrated graphics in a personal computer. Graphics performance tests have suggested the M1 chip offers performance that exceeds the GeForce GTX 1050 Ti and Radeon RX 560. It also earned an OpenCL score of 19305, similar to the Radeon RX 560X and Radeon Pro WX 4100.

Is anyone still using Open CL? Apple doesn’t even keep this API current. I mean Blender doesn’t even support Open CL anymore.

It’s better to use Metal benchmarks to compare against cards that also support Metal. Since most people are using Macs to run programs that are Metal compliant and slowly native ARM, like Blender.

Metal score for the M1 Max scores are around 69000 which put it in the same league as the desktop
RX 5700XT
Radeon VII
Pro Vegas 56

1 Like

Sorry for being completely off topic and restarting this thread but I have been flailing around in a foreign area for a while, hoping someone who understands OpenCL, GPU details can help.

@Staars Wondering if you could point me in the right direction to get OpenCL working for my M1 MacBook?

I am trying to do what you did above except for darktable, which will likely never get a Metal port from Apple. Thx for any help.

I can not really help here that much.
What I did was basically to revert all commits, that deactivated OpenCL for Cycles in MacOS. This was relatively easy, as all the needed code had been there before. I did not add anything new nor a single line of OpenCL specific code.

You may succeed by digging in the code and find the places, where OpenCL is selectively turned off for for MacOS in the functions you want to checkout.

But I do not recommend to spend much time with it. It is very well possible to not even beat the CPU-only variant and every MacOS update may break it.
(BTW to be off topic too: I see massive performance losses in the Ventura betas in Cycles on my Vega56. Let‘s hope there is still a lot of debug code in it.)