Could not identify NUMA node of platform GPU ID 0, defaulting to 0. Your kernel may not have been built with NUMA support.

Device: MacBook Pro 16 M1 Max, 64GB running MacOS 12.0.1.

I tried setting up GPU Accelerated TensorFlow on my Mac using the following steps:

  1. Setup: XCode CLI / Homebrew/ Miniforge
  2. Conda Env: Python 3.9.5
  3. conda install -c apple tensorflow-deps
  4. python -m pip install tensorflow-macos
  5. python -m pip install tensorflow-metal
  6. brew install libjpeg
  7. conda install -y matplotlib jupyterlab
  8. In Jupyter Lab, I try to execute this code:
from tensorflow.keras import layers
from tensorflow.keras import models
model = models.Sequential()
model.add(layers.Conv2D(32, (3, 3), activation='relu', input_shape=(28, 28, 1)))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Conv2D(64, (3, 3), activation='relu'))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Conv2D(64, (3, 3), activation='relu'))
model.add(layers.Flatten())
model.add(layers.Dense(64, activation='relu'))
model.add(layers.Dense(10, activation='softmax'))
model.summary()

The code executes, but I get this warning, indicating no GPU Acceleration can be used as it defaults to a 0MB GPU. Error:

Metal device set to: Apple M1 Max
2021-10-27 08:23:32.872480: 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-27 08:23:32.872707: 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: <undefined>)

Anyone has any idea how to fix this? I came across a bunch of posts around here related to the same issue but with no solid fix. I created a new question as I found the other questions less descriptive of the issue, and wanted to comprehensively depict it. Any fix would be of much help.

  • Metal device set to: Apple M1

    systemMemory: 16.00 GB maxCacheSize: 5.33 GB

    2021-12-13 19:59:56.135942: 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-12-13 19:59:56.136049: I tensorflow/core/common_runtime/pluggåable_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: )

Add a Comment

Replies

Having the same issue here, on macbook pro m1 16gb & monterey

It was working with me on Miniforg3 env, after moving to the other environment (Anaconda3) to do some work of torch and back again to my arm64 environment it shows the same message and didn't work, I made the below steps and it back to work again.

  1. I uninstalled the tensorflow from all environments.
  2. Uninstalled tensorflow-metal and tensorflow-deps
  3. Restart the device.
  4. Reinstalled the packages again.

Thanks.

Changing from v0.4.0 to v.0.1.1 worked for me

pip uninstall tensorflow-me
pip install tensorflow-metal==0.1.1
  • Did you mean 'pip uninstall tensorflow-metal'?

    Also, do we need to uninstall it before installing a specific version?

Add a Comment

I tried : pip install tensorflow-metal==0.1.1 but it cause different problem... :(

Init Plugin

2022-05-15 14:00:41.859860: F tensorflow/c/c_api_experimental.cc:739] Non-OK-status: tensorflow::RegisterPluggableDevicePlugin(lib_handle->lib_handle) status: FAILED_PRECONDITION: 'host_callback' field in SP_StreamExecutor must be set.

zsh: abort      python

Try adding the following:

import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
Post not yet marked as solved Up vote reply of a0dh Down vote reply of a0dh

Same error here when I do scheduling learning rate, jupyterlab dies

Changing the version of tensorflow-metal didn't help. It made my jupyter kernel restart. This is why I use pytorch. It works.

I'm having the same issue, and, sometimes my training just suddenly stops in a random epoch. So now, in order to work, I have to use the parameter with tf.device('cpu:0'), to force CPU use instead of GPU. The worse part is that apple seems like it don't care about fixing that stuffs.

Apple Silicon is UMA, Unified Memory Architecture. This annoying message is just telling you that you are running on Apple Silicon. So ignore it.

Why can't this be marked as solved so the answer can appear at the top? The M1 is a UMA device -- not a NUMA. A central point of this SOC is its unified memory. This message just says that Tensorflow recognizes that it's not a non-unified memory architecture system. Then it chooses the appropriate UMA algorithms. How does this forum help if answers are buried in noise? Stack Overflow does a better job.