2018 15" MacBook Pr...

2018 15" MacBook Pro RP555X + 2x Aorus Gaming Box 1080 @32Gbps + MacOS 10.13.6 + DrEGPU  


Active Member
Joined: 5 months ago
Posts: 6
March 15, 2019 6:47 pm  

Topic title = 2018 15" MacBook Pro RP555X + 2x Aorus Gaming Box 1080 @32Gbps + MacOS 10.13.6 +DrEGPU

System specs
-MacBook Pro 15 inch 2018, i7-8850 6-core, 32GB Ram, 4TB SSD
-iGpu Intel UHD Graphics 630
-dGpu AMD Radeon Pro 555X
-External Monitor: various, but mainly an old Acer
-Mac OSX 10.13.6

eGPU hardware
-Aorus Gaming Box 1080
-Aorus Gaming Box 1080
-nVidia GTX 1080

Hardware pictures



You can see the eGPU's are working hard and each core is being used (the unlabeled window with the bars). 
The second GPU is behind the laptop. 
Please excuse the mess!

Installation steps

I followed the steps for installing and running purge-wrangler:

With the laptop OFF, I plugged each eGPU on each side of the laptop, ie 1 on the left and 1 on the right.

I plugged a single monitor into one them via a DVI-DP adapter.
I started up the laptop and then ran purge-wrangler to install drivers and enable nvidia GPUs. 
I went to settings -->  energy saver and flipped off and then back on the "automatics graphics switching"
The laptop screen will look scrambled for a few seconds, and you can login shortly thereafter.


*Unfortunately, PyTorch does not come with GPU support for MacOS so you have to compile from source. 
*Also, unfortunately, you need Xcode versions that Apple doesn't let you download and install anymore for free. 

Install Xcode 9.4.1     <--- you may have to cough up $99 to be a paid developer to get this, or your university/work may already have site license.
Install the Command Line Tools (CLT) for Xcode 9.4.1     <--- same thing for the CLT. You might have to pay to be an paid Apple Developer

Install CUDA for MacOS (v10.1)

Install cuDNN (v7.5)

Install Anaconda 3

Open a MacOS terminal window.
type: nano .bash_profile     <--- Make it so you don't have to export PATHs every time
Copy and paste the following:     <--- change info in [brackets] to be specific for your system (without the brackets!)
export PATH=/usr/local/bin:$PATH
export PATH=/Developer/NVIDIA/CUDA-[10.1]/bin${PATH:+:${PATH}}
export DYLD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-[10.1]/lib\
X <--- remove this X                ${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
export CUDA_HOME=/[wherever cuDNN installed to, for example mine is /users/dregpu/cuda

Install PyTorch:
cd [wherever you want to install pytorch. mine is /users/dregpu. the install script will create another sub-directory called pytorch] export CMAKE_PREFIX_PATH=/anaconda3 <--- or wherever you installed anaconda
git clone --recursive [email protected]:pytorch/pytorch.git
cd pytorch
pip install cmake
MACOSX_DEPLOYMENT_TARGET=10.13 CC=clang CXX=clang++ python setup.py install [takes a long time!] pip install torchvision

You now have PyTorch working with multiple GPU support! Well, sort of... (see below)


On a dataset with 40,000 JPGs, it takes about 4-5 minutes per epoch using AlexNet
It took 5.5 hours to go through through it with VGG19


You get lots and lots of warnings during pytorch compile, but it shouldn't give you errors and stop.
The 2x eGPU setup is obviously much, much faster than just using the CPU. 
You can plug in peripherals into the gaming boxes and it doesn't seem to wreck things. I plugged an external SSD.
Plugging stuff into the free TB3 ports seem to lock up the system and require a hard reboot. 
I think some of the warnings during pytorch compile are relevant. Whenever I start up my script and it engages the GPUs, the laptop screen goes blank and the user interface seems to go slowly. It's as if the system is using the hardworking eGPU's to drive display.
I didn't do anything like try to disable the Radeon.
According to a post (can't find the link again) trying to compile PyTorch from source on linux, the pytorch installer script doesn't include some header files necessary for gcc.
I might try to recompile again according to this: https://docs.nvidia.com/cuda/cuda-installation-guide-mac-os-x/index.html
Cuda 10.1 is supposedly compatible with Xcode 10, so maybe that paid apple developer account isn't necessary after all!

DO NOT UPGRADE TO MOJAVE (10.14)!!! It will deactivate the nVidia drivers, so no more eGPU support!

This topic was modified 1 week ago

MBP 2018 15 inch + 2X Aorus gaming box 1080 in BootCamp and MacOS 10.13.6
Dell XPS 13 9350 + Aorus gaming box 2070

theitsage liked