How to run the whole program on GPU

May be some help here:

Some interesting (to me) tidbits…

To find out which devices your operations and tensors are assigned to, put tf.debugging.set_log_device_placement(True) as the first statement of your program.

If you would like a particular operation to run on a device of your choice instead of what’s automatically selected for you, you can use with tf.device to create a device context, and all the operations within that context will run on the same designated device.

Let us know?

PS: notice some of have run into this before and to the best of my knowledge not resolved it, at least on the Apple ARM64 / M1 p,atform:

Thus may also be informative:

Software requirements

The following NVIDIA® software must be installed on your system:

From this page https://www.tensorflow.org/install/gpu