Nvidia Egpu For Mac

  



With High Sierra, Apple has finally given native eGPU support to Macs and MacBooks. If you’re not familiar, eGPU is short for an external GPU (graphics processing unit) and refers to the ability for a computer (usually a laptop) to be able to use a GPU or graphics card in an external housing as if it was built into the computer. Using an NVIDIA eGPU with OSX Installation Instructions Connecting the eGPU. Do not connect the eGPU to your Macbook until instructed. Update to macOS High Sierra, version 10.13.5 Do this by Apple About This Mac Software Update. Apple uses AMD GPU’s and doesn’t support nVidia. Some people have gotten eGPU’s to work with Mac and Tensorflow, and have written helpful posts to share what seems to be a bit of a painful but. An eGPU is one of the better ways to boost your Mac’s performance. It improves one of Mac’s traditionally weak areas, and eGPU support in apps has been growing over the years. Most big-name apps will see an increase in performance once you hook up an eGPU.

  1. Nvidia Egpu For Mac Windows 10
  2. Nvidia Egpu For Macbook Pro 16

AMD XConnect/Nvidia Optimus provides internal display loopback acceleration through the Intel iGPU with a Radeon/GeForce eGPU. In a Mac that has an AMD discrete graphics card and no functional iGPU, you would need Windows 10 1803 or newer. Win10 1803+ provides manual graphics switching per app/game through Graphics Settings.

To use an eGPU, a Mac with an Intel processor is required.

An eGPU can give your Mac additional graphics performance for professional apps, 3D gaming, VR content creation, and more.

eGPUs are supported by any Mac with an Intel processor and Thunderbolt 3 ports1 running macOS High Sierra 10.13.4 or later. Learn how to update the software on your Mac.

An eGPU lets you do all this on your Mac:

  • Accelerate apps that use Metal, OpenGL, and OpenCL
  • Connect additional external monitors and displays
  • Use virtual reality headsets plugged into the eGPU
  • Charge your MacBook Pro while using the eGPU
  • Use an eGPU with your MacBook Pro while its built-in display is closed
  • Connect an eGPU while a user is logged in
  • Connect more than one eGPU using the multiple Thunderbolt 3 (USB-C) ports on your Mac2
  • Use the menu bar item to safely disconnect the eGPU
  • View the activity levels of built-in and external GPUs (Open Activity Monitor, then choose Window > GPU History.)

eGPU support in apps

eGPU support in macOS High Sierra 10.13.4 and later is designed to accelerate Metal, OpenGL, and OpenCL apps that benefit from a powerful eGPU. Not all apps support eGPU acceleration; check with the app's developer to learn more.3

In general, an eGPU can accelerate performance in these types of apps:

  • Pro apps designed to utilize multiple GPUs
  • 3D games, when an external monitor is attached directly to the eGPU
  • VR apps, when the VR headset is attached directly to the eGPU
  • Pro apps and 3D games that accelerate the built-in display of iMac, iMac Pro, MacBook Air, and MacBook Pro (This capability must be enabled by the app's developer.)

You can configure applications to use an eGPU with one of the following methods.

Use the Prefer External GPU option

Starting with macOS Mojave 10.14, you can turn on Prefer External GPU in a specific app's Get Info panel in the Finder. This option lets the eGPU accelerate apps on any display connected to the Mac—including displays built in to iMac, iMac Pro, MacBook Air, and MacBook Pro:

  1. Quit the app if it's open.
  2. Select the app in the Finder. Most apps are in your Applications folder. If you open the app from an alias or launcher, Control-click the app's icon and choose Show Original from the pop-up menu. Then select the original app.
  3. Press Command-I to show the app's info window.
  4. Select the checkbox next to Prefer External GPU.
  5. Open the app to use it with the eGPU.

You won't see this option if an eGPU isn't connected, if your Mac isn't running macOS Mojave or later, or if the app self-manages its GPU selection. Some apps, such as Final Cut Pro, directly choose which graphics processors are used and will ignore the Prefer External GPU checkbox.

Set an external eGPU-connected display as the primary display

If you have an external display connected to your eGPU, you can choose it as the primary display for all apps. Since apps default to the GPU associated with the primary display, this option works with a variety of apps:

  1. Quit any open apps that you want the eGPU to accelerate on the primary display.
  2. Choose Apple menu  > System Preferences. Select Displays, then select the Arrangement tab.
  3. Drag the white menu bar to the box that represents the display that's attached to the eGPU.
  4. Open the apps that you want to use with the eGPU.

If you disconnect the eGPU, your Mac defaults back to the internal graphics processors that drives the built-in display. When the eGPU is re-attached, it automatically sets the external display as the primary display.

About macOS GPU drivers

Mac hardware and GPU software drivers have always been deeply integrated into the system. This design fuels the visually rich and graphical macOS experience as well as many deeper platform compute and graphics features. These include accelerating the user interface, providing support for advanced display features, rendering 3D graphics for pro software and games, processing photos and videos, driving powerful GPU compute features, and accelerating machine learning tasks. This deep integration also enables optimal battery life while providing for greater system performance and stability.

Apple develops, integrates, and supports macOS GPU drivers to ensure there are consistent GPU capabilities across all Mac products, including rich APIs like Metal, Core Animation, Core Image, and Core ML. In order to deliver the best possible customer experience, GPU drivers need to be engineered, integrated, tested, and delivered with each version of macOS. Aftermarket GPU drivers delivered by third parties are not compatible with macOS.

The GPU drivers delivered with macOS are also designed to enable a high quality, high performance experience when using an eGPU, as described in the list of recommended eGPU chassis and graphics card configurations below. Because of this deep system integration, only graphics cards that use the same GPU architecture as those built into Mac products are supported in macOS.

Supported eGPU configurations

It's important to use an eGPU with a recommended graphics card and Thunderbolt 3 chassis. If you use an eGPU to also charge your MacBook Pro, the eGPU's chassis needs to provide enough power to run the graphics card and charge the computer. Check with the manufacturer of the chassis to find out if it provides enough power for your MacBook Pro.

Recommended graphics cards, along with chassis that can power them sufficiently, are listed below.

Thunderbolt 3 all-in-one eGPU products

These products contain a powerful built-in GPU and supply sufficient power to charge your MacBook Pro.

Recommended Thunderbolt 3 all-in-one eGPUs:

  • Blackmagic eGPU and Blackmagic eGPU Pro4
  • Gigabyte RX 580 Gaming Box4
  • Sonnet Radeon RX 570 eGFX Breakaway Puck
  • Sonnet Radeon RX 560 eGFX Breakaway Puck5

AMD Radeon RX 470, RX 480, RX 570, RX 580, and Radeon Pro WX 7100

These graphics cards are based on the AMD Polaris architecture. Recommended graphics cards include the Sapphire Pulse series and the AMD WX series.

Recommended Thunderbolt 3 chassis for these graphics cards:

  • OWC Mercury Helios FX4
  • PowerColor Devil Box
  • Sapphire Gear Box
  • Sonnet eGFX Breakaway Box 350W
  • Sonnet eGFX Breakaway Box 550W4
  • Sonnet eGFX Breakaway Box 650W4
  • Razer Core X4
  • PowerColor Game Station4
  • HP Omen4
  • Akitio Node6

AMD Radeon RX Vega 56

These graphics cards are based on the AMD Vega 56 architecture. Recommended graphics cards include the Sapphire Vega 56.

Recommended Thunderbolt 3 chassis for these graphics cards:

  • OWC Mercury Helios FX4
  • PowerColor Devil Box
  • Sonnet eGFX Breakaway Box 550W4
  • Sonnet eGFX Breakaway Box 650W4
  • Razer Core X4
  • PowerColor Game Station4

AMD Radeon RX Vega 64, Vega Frontier Edition Air, and Radeon Pro WX 9100

Nvidia Egpu For Mac

These graphics cards are based on the AMD Vega 64 architecture. Recommended graphics cards include the Sapphire Vega 64, AMD Frontier Edition air-cooled, and AMD Radeon Pro WX 9100.

Recommended Thunderbolt 3 chassis for these graphics cards:

  • Sonnet eGFX Breakaway Box 650W4
  • Razer Core X4

AMD Radeon RX 5700, 5700 XT, and 5700 XT 50th Anniversary

If you've installed macOS Catalina 10.15.1 or later, you can use these graphics cards that are based on the AMD Navi RDNA architecture. Recommended graphics cards include the AMD Radeon RX 5700, AMD Radeon RX 5700 XT, and AMD Radeon RX 5700 XT 50th Anniversary.

Recommended Thunderbolt 3 chassis for these graphics cards:

  • Sonnet eGFX Breakaway Box 650W4
  • Razer Core X4
Nvidia egpu for mac os

Learn more

  • Learn how to choose your GPU in Final Cut Pro 10.4.7 or later.
  • To ensure the best eGPU performance, use the Thunderbolt 3 cable that came with your eGPU or an Apple Thunderbolt 3 (USB-C) cable. Also make sure that the cable is connected directly to a Thunderbolt 3 port on your Mac, not daisy-chained through another Thunderbolt device or hub.
  • If you have questions about Thunderbolt 3 chassis or graphics cards, or about third-party app support and compatibility, contact the hardware or software provider.
  • Software developers can learn more about programming their apps to take advantage of macOS eGPU support.

1. If you have a Mac mini (2018) with FileVault turned on, make sure to connect your primary display directly to Mac mini during startup. After you log in and see the macOS Desktop, you can unplug the display from Mac mini and connect it to your eGPU.

2. If you're using a 13-inch MacBook Pro from 2016 or 2017, always plug eGPUs and other high-performance devices into the left-hand ports for maximum data throughput.

3. macOS High Sierra 10.13.4 and later don't support eGPUs in Windows using Boot Camp or when your Mac is in macOS Recovery or installing system updates.

4. These chassis provide at least 85 watts of charging power, making them ideal for use with 15-inch MacBook Pro models.

5. Playback of HDCP-protected content from iTunes and some streaming services is not supported on displays attached to Radeon 560-based eGPUs. You can play this content on the built-in display on MacBook Pro, MacBook Air, and iMac.

6. If you use Akitio Node with a Mac notebook, you might need to connect your Mac to its power adapter to ensure proper charging.

[Updated on 2018.11.14] I finally made my GTX1070 working with my MBP for Pytorch and fast.ai. Below are the steps:

Environment

  • MacBook Pro (15-inch, 2016) with touch bar
  • OSX version: 10.13.6 (Mojave may not work yet as of now)
  • eGPU: Razer Core X + GTX 1070 (MSI)

Steps 1: Install Nvidia Web Driver

10.13.6 + 17G65

Follow this if your system is 10.13.6 17G65 (* you can check this number by clicking 'version 10.13.6' in 'About this Mac'* ). If it is 17G3025 or later, jump to the next section '10.13.5 + 17G3025'

Use this great tool macOS-eGPU to install Nvidia web driver. Just follow the guide and install by '> macos-egpu'.

Although it also provide the options to let you install CUDA, DO NOT use it. Because it will automatically install the latest version, which seems not working for Pytorch yet. So just install the NVIDIA web driver.

After the installation, my web driver version is: 387.10.10.10.40.105. Make sure you have this version if your OSX version is 10.13.6 + 17G65.

10.13.6 + 17G3025 [Added on 2018.11.14]

There comes a new security patch in High Sierra 10.13.6 17G3025 (* you can check this number by clicking 'version 10.13.6' in 'About this Mac'* ) in the beginning of November. The macOs-eGPU has not been updated for this new OSX build yet (as of today 2018.11.14). So I would suggest to use another tool instead: purge-wrangle. It is the same or better (personal opinion), just follow the guide and select 'Enable NVIDIA eGPUs'.

After the installation, the web driver version will be: 387.10.10.10.40.108.

10.13.6 + 17G5019 [Added on 2019.02.27]

Same as before, just use purge-wrangle to apply the patch. If you already patched the system with purge-wrangle before, simply upgrade the Nvidea web driver. After the restart, purge-wrangle will prompt you to re-patch the system. Easy as a pie.

After the installation, the web driver version will be: 387.10.10.10.40.118.

Verify

If it is installed successfully, once you plug in your eGPU, you shall see your GTX 1070 in 'About This Mac -> System Report... -> Graphics/Displays' and 'Activity Monitor -> Window -> GPU History'. Or you can simply plug an external monitor to eGPU to see if it works.

NOTE: It doesn't support eGPU hot unplug yet. So it is suggested to 'reboot and unplug the moment the eGPU power shuts down'. (If it is not done properly, kernel panic will happen). But my Razer Core X will not shut down the power during the restart. The fan of the Razer Core X keeps spinning and probably because the GPU temperature is low the fan on GTX 1070 doesn't spin at all. So for me, there is no way to tell the right moment from the eGPU. But with some experiment, I found it seems safe to unplug at the moment that the keyboard backlight turns off during the restart.

Step 2: Install CUDA driver, toolkit

Pytorch works with CUDA 9.2. It doesn't support the latest CUDA 10.0 yet. So I downloaded the installation image from Nvidia. It includes CUDA driver, toolkit and samples. Just install all of them. We will need samples later on. CUDA Toolkit 9.2 has a patch, install the patch as well. You can download the patch from the same place as listed above.

Nvidia Egpu For Mac Windows 10

Follow the installation guide here

Make sure the deviceQuery and bandwidthTest from samples work after installation.

After the installation, my CUDA driver version is: ** 396.148 **. You can get this information with the command '> macos-egpu -C'.

Step 3: Install CUDNN

Get into this page to download the installation image (require registration). 'https://developer.nvidia.com/rdp/cudnn-archive' -> click 'cuDNN v7.1.4 Library for OSX'.

Make sure to use cuDNN v7.1.4.

Follow this guide for the installation.

Step 4: Compile and install Pytorch

Nvidia Egpu For Macbook Pro 16

I followed this guide. It mostly correct as for me, but not all... So I would like to write down the steps that works for me.

Mac mini egpu nvidia
  • Create conda enviroment
  • With ptc active (> source activate ptc)
  • After the above step, unset CMAKE_PREFIX_PATH or simply open a new terminal and activate ptc. This is very important. Becuase we are going to compile pytorch, with CMAKE_PREFIX_PATH, it will cause problem (and it did cause problem for me).

  • Get the PyTorch source

  • Switch to v0.4.1 and initial submodules
  • Before we go ahead to start compiling, make sure we have everything correctly:
    • The following are my enviornment variables in ~/.bash_profile. CUDA_HOME and CUDA_NVCC_EXECUTABLE may not be needed. It was there because I tried to compile tensorflow previously. The last PATH (PATH=/usr/local/cuda/bin:$PATH) may be removed as well. But to be safe, you can keep the same as mine.
    • clang version, it shall be something like below after step 2.
  • Build and install Pytorch. It will take a while (like 30 minutes to an hour). Just be patient.
  • After it is done, verify it with '> pip list'. You should see 'torch' with version '0.5.0a0+a24163a'. And with eGPU connected, you can also do. Make sure is_available() returns True.

Step 5: Install fastai

This will install torchvision-nightly for you, which is needed by fastai.

Double check pip list and make sure Pillow is installed correctly and there is no both 'Pillow' and 'pillow'.

With torchvision-nightly, installed, we can verify that pytorch is installed correctly. Download pytorch examples and compare time required with and without cuda.

There are couple of packages shall be installed for fastai as well.

Maybe there are more, and maybe the best way is to install it from fastai repo. But these works for me.

Let's test.

Nvidia

In Jupyter notebook, open courses/dl1/lesson1.ipynb. Run the first few code blocks, especially those imports and see if there is any error. If any error about missing packages, just pip install them.

Then you can go ahead with the lesson, test and enjoy your eGPU!

BTW, You can open 'GPU History' from 'Activity Monitor' and monitor your eGPU's load while testing.

If this gist helped you, please leave a star ;-) I will be very happy to see that it helped.

Final Note

Be ** VERY VERY CAREFULE ** about installing OSX security patches / updates.

I installed the latest update for High Sierra, which updated the macOS build to 17G3025 (still version 10.13.6). Then macos-egpu doesn't support this new build and it won't recognize the egpu anymore. Luckily I found purge-wrangler which saved my life. And I like the way it is designed and explained.

Every macOS update rewrites kernel extensions (including security updates). This means that all patches installed using purge-wrangler.sh are reset. With V5.0.0 or later, the system will notify you if this has happened, and allow you to re-patch immediately.

I recommend to have a time machine backup before every system updates. Because it seems there is always a gap between the OSX system updates is released and the corresponding nvidia web driver is released. If you apply the system update before the new web driver is available, you will end up with nowhere... If you still want to use the system, you have to either rollback your system with time machine or use Web-Driver-Toolkit as suggested here to patch the NVDAStartup (I just read this post but didn't try it by myself.)