Skip to content

Instantly share code, notes, and snippets.

@lazyoracle
Created December 28, 2021 00:33
Show Gist options
  • Save lazyoracle/5c12bcf848243561d4556955f90fc547 to your computer and use it in GitHub Desktop.
Save lazyoracle/5c12bcf848243561d4556955f90fc547 to your computer and use it in GitHub Desktop.
Setting up tensorflow with GPU support on Apple Silicon
# install miniforge for arm64
# https://github.com/conda-forge/miniforge
name: tensorflow
channels:
- apple
- conda-forge
dependencies:
- ipykernel=6.6
- jupyter=1.0
- matplotlib=3.5
- notebook=6.4
- python=3.8
- scikit-learn=1.0
- scipy=1.7
- setuptools=60.1
- tensorflow=2.6
- tensorflow-deps=2.6
- pip:
- tensorflow-metal==0.3
@lazyoracle
Copy link
Author

lazyoracle commented Dec 28, 2021

M1 Built-in GPU support for Tensorflow is extremely rudimentary at this point and can cause serious performance degradation when compared to using Tensorflow in CPU-only mode on Apple silicon. Comment out tensorflow-deps and tensorflow-metal in the above list to get the CPU only version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment