Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update instructions for Apple Silicon #479

Merged
merged 4 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Description
- Added ONNX support for Python 3.10
- Added support for Python 3.11
- Added support for SmartSim with Torch on Apple Silicon
- Updated install instructions for Apple Silicon


Detailed Notes
Expand All @@ -49,6 +50,7 @@ Detailed Notes
- SmartSim can now be built and used on platforms using Apple Silicon
(ARM64). Currently, only the PyTorch backend is supported. Note that libtorch
will be downloaded from a CrayLabs github repo. (SmartSim-PR465_)
- Separate install instructions are now provided for Mac OSX on x64 vs ARM64 (SmartSim-PR478_)

.. _SmartSim-PR446: https://github.com/CrayLabs/SmartSim/pull/446
.. _SmartSim-PR448: https://github.com/CrayLabs/SmartSim/pull/448
Expand All @@ -57,6 +59,7 @@ Detailed Notes
.. _SmartSim-PR461: https://github.com/CrayLabs/SmartSim/pull/461
.. _SmartSim-PR465: https://github.com/CrayLabs/SmartSim/pull/465
.. _SmartSim-PR472: https://github.com/CrayLabs/SmartSim/pull/472
.. _SmartSim-PR478: https://github.com/CrayLabs/SmartSim/pull/478


0.6.0
Expand Down
63 changes: 51 additions & 12 deletions doc/installation_instructions/basic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The machine-learning backends have additional requirements in order to
use GPUs for inference

- `CUDA Toolkit 11 (tested with 11.8) <https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html>`_
- `cuDNN 8 (tested with 8.2.1 and 8.4.0) <https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#download>`_
- `cuDNN 8 (tested with 8.9.1) <https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#download>`_
- OS: Linux
- GPU: Nvidia

Expand All @@ -63,7 +63,7 @@ Supported Versions
- GPU
- Python Versions
* - MacOS
- x86_64
- x86_64, aarch64
- Not supported
- 3.8 - 3.11
* - Linux
Expand All @@ -74,8 +74,9 @@ Supported Versions

.. note::

Windows is not supported and there are currently no plans
to support Windows.
Users have succesfully run SmartSim on Windows using Windows Subsystem for Linux
with Nvidia support. Generally, users should follow the Linux instructions here,
however we make no guarantee or offer of support.


Native support for various machine learning libraries and their
Expand All @@ -87,6 +88,11 @@ versions is dictated by our dependency on RedisAI_ 1.2.7.
| 1.2.7 (default) | 2.0.1 | 2.13.1 | 1.16.3 |
+------------------+----------+-------------+---------------+

.. warning::

On Apple Silicon, only the PyTorch backend is supported for now. Please contact us
if you need support for other backends

TensorFlow_ 2.0 and Keras_ are supported through `graph freezing`_.

ScikitLearn_ and Spark_ models are supported by SmartSim as well
Expand All @@ -105,7 +111,7 @@ default due to issues with glibc on a variety of Linux platforms).
------------------------------------------------------------

MacOS-only
==========
============

We recommend users and contributors install brew_ for managing installed
packages. For contributors, the following brew packages can be helpful:
Expand Down Expand Up @@ -270,9 +276,25 @@ Install SmartSim from Source

First, clone SmartSim.

.. code-block:: bash
.. tabs::

.. tab:: Linux

.. code-block:: bash

git clone https://github.com/CrayLabs/SmartSim smartsim

.. tab:: MacOS (Intel x64)

.. code-block:: bash

git clone https://github.com/CrayLabs/SmartSim smartsim

.. tab:: MacOS (Apple Silicon)

git clone https://github.com/CrayLabs/SmartSim smartsim
.. code-block:: bash

git clone --config core.autocrlf=true https://github.com/CrayLabs/SmartSim smartsim
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I may have also beeen forced to ensure that non-mac gcc came before mac version in path. must verify...


And then install SmartSim with pip in *editable* mode. This way, SmartSim is
installed in your virtual environment and available on `sys.path`, but the
Expand All @@ -286,12 +308,29 @@ source remains at the site of the clone instead of in site-packages.

Use the now installed ``smart`` cli to install the machine learning runtimes.

.. code-block:: bash
.. tabs::

.. tab:: Linux

.. code-block:: bash

# run one of the following
smart build --device cpu --onnx # install with cpu-only support
smart build --device gpu --onnx # install with both cpu and gpu support


.. tab:: MacOS (Intel x64)

.. code-block:: bash

smart build --device cpu --onnx # install all backends (PT, TF, ONNX) on gpu


.. tab:: MacOS (Apple Silicon)

.. code-block:: bash

# run one of the following
smart build -v --device cpu # verbose install cpu
smart build -v --device gpu # verbose install gpu
smart build -v --device gpu --onnx # install all backends (PT, TF, ONNX) on gpu
smart build --device cpu --no_tf # Only install PyTorch (TF/ONNX unsupported)


Build the SmartRedis library
Expand Down
Loading