has anyone using mac with intel been able to use tensorflow with their GPU?
Posted by: nicola.cecere @ Nov. 9, 2022, 11:37 a.m.Hi. I have a mac pro i7 with amd GPU and was having the same problem. For example, in the ExerciseSession5/Autoencoder, i was only getting the CPU as a device detected by tensorflow.
I followed some guides online, building different environments with conda. The following commands are a merge of some of them and were the only way that worked out for me.
I'd like to point out that i'm not a python expert and that i was just relying on common sense (solving one problem at a time as they showed up) not to ruin my pc ahah. Most probably this is sub-optimal.
conda create -n amd_gpu python=3.8.8
conda activate amd_gpu
SYSTEM_VERSION_COMPAT=0 pip install tensorflow-macos tensorflow-metal
SYSTEM_VERSION_COMPAT=0 pip install ipykernel
conda install -c anaconda matplotlib
conda install -c anaconda seaborn
pip install scipy --upgrade
pip install numpy --upgrade
With this setup i can use the notebook i specified earlier. It probably will give you this:
I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA
However, i found online this on a forum: "MacOS with AMD GPU here. I am using tensorflow for metal as soon as it was launched, with GPU acceleration. Sometimes I get the same message (Could not identify NUMA node of platform GPU ID 0, defaulting to 0. Your kernel may not have been built with NUMA support.). But, it still uses the GPU. You can check that by opening Activity Monitor, then pressing Cmd + 3 and Cmd + 4, which shows you GPU and CPU usage."
I checked with system monitor and the GPU actually works!
It is a fragile solution. I will explore it more, but surely more people working on it is better than just myself. Hope this can help you.
Posted by: xegoniccolo @ Nov. 10, 2022, 4:04 p.m.