Enabling gpu in m1

I installed tensorlfow in m1 Mac. when I am trying the enable gpu in Jupiter notebook is not working.

Just type the following code:

from tensorflow.python.compiler.mlcompute import mlcompute; 
mlcompute.set_mlc_device(device_name='gpu')
Enabling gpu in m1
 
 
Q