Using Tensorflow GPUs on M1
## Install Xcode
xcode-select --install
## Install miniforge
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh
chmod +x Miniforge3-MacOSX-arm64.sh sh Miniforge3-MacOSX-arm64.sh source ~/miniforge3/bin/activate## Create Env
conda create -n tf python==3.9 -y
conda activate tf
## Install Tensorflow
conda install -c apple tensorflow-deps
pip install tensorflow-macos
pip install tensorflow-metal
## Check
>>> import tensorflow as tf
>>> tf.__version__
'2.6.0'
>>> tf.config.list_physical_devices()
[PhysicalDevice(name='/physical_device:CPU:0', device_type='CPU'), PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]
댓글
댓글 쓰기