GPU-accelerated Deep Learning on Mac with Intel, AMD, and NVIDIA

Oct 27, 2017 | By: Choong Ng

Last week we announced the release of PlaidML, an open source software framework designed to enable deep learning on every device. Our goal with PlaidML is to make deep learning accessible by supporting the most popular hardware and software already in the hands of developers, researchers, and students. Last week’s release supported Python 2.7 on Linux. We received immediate requests for Mac and Python 3, today we’re pleased to announce preliminary support for both.

Installing PlaidML with Keras on a Mac is as simple as pip install plaidml-keras, but we’ve added something extra:

PlaidML block diagram
plaidvision running on a Mid 2013 MacBook Air with Intel HD 5000 graphics. That sure is a can opener.

We’ve updated plaidvision with support for macOS and Mac built-in webcams. To try this out you’ll need a computer listed on Apple’s compatibility list as having OpenCL 1.2 support (most machines 2011 and later). The actual installation only takes a moment:

# Setting up a virtualenv to keep things tidy (this step is optional)
virtualenv env
. env/bin/activate

# Install and configure PlaidML, Keras, and the integration
pip install plaidml-keras
plaidml-setup

# Check out plaidvision and install additional Python packages
git clone https://github.com/plaidml/plaidvision.git
cd plaidvision
pip install -r requirements.txt

# Start plaidvision
python ./plaidvision.py mobilenet

A special thanks to GitHub user Juanlu001, our first open source contributor, for taking the lead on Python 3 support. If you find a problem we’d appreciate a note in our GitHub issue tracker. There is a lot more to do, and we appreciate hearing any feedback, bugs, or performance data. To get in touch:

© 2017 Vertex.AI