Model keeps freezing and cannot train on Apple M1 Pro chip.

I followed the instruction by apple to install the latest tensorflow-metal and tensorflow-macos. and then test the performance of GPU with the tensorflow MINIST example: https://www.tensorflow.org/datasets/keras_example

notice that I cannot use CPU only as mlcompute module cannot be found. don't know why.

so basically I cannot train any model now.

the output of MINIST example: Metal device set to Apple M1 Pro 2021-10-31 00:13:03.147040: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: SSE4.2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2021-10-31 00:13:03.147896: I tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.cc:305] Could not identify NUMA node of platform GPU ID 0, defaulting to 0. Your kernel may not have been built with NUMA support. 2021-10-31 00:13:03.148505: I tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.cc:271] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 0 MB memory) -> physical PluggableDevice (device: 0, name: METAL, pci bus id: ) Epoch 1/6

and that's it, it just keeps freezing.

Extremely appreciate if someone can help me to address these issues.

OS version: 12.01

tensorflow: 2.6.0

tensorflow-deps: 2.6.0 

tensorflow-macos: 2.6.0

tensorflow-metal: 0.2.0

conda: 4.10.3

Python 3.8.12

I ran example code on jupyter notebook

Which version of macOS are you running?

Hi,

Could you provide a sample code that can be used to reproduce the issue?

I found the sample code in another thread, looking into it.

any news on this issue?

Model keeps freezing and cannot train on Apple M1 Pro chip.
 
 
Q