Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Tensorflow with gpu #268

Open
Anusha1408 opened this issue May 20, 2021 · 2 comments
Open

Tensorflow with gpu #268

Anusha1408 opened this issue May 20, 2021 · 2 comments

Comments

@Anusha1408
Copy link

Can anyone tell how to use tensorflow with gpu on mac m1 ?

Is there a GPU available:
[]
Is the Tensor on GPU #0:
False

@bksaini078
Copy link

I don't know if i got the question right but , you can try this

from tensorflow.python.framework.ops import disable_eager_execution
disable_eager_execution()

from tensorflow.python.compiler.mlcompute import mlcompute
mlcompute.set_mlc_device(device_name='gpu')# this can be 'any','cpu','gpu'

@IAINATTWATER
Copy link

@bksaini078 That's what I use and it appears to work. Activity monitor shows the GPU well used for the Python38 process.FashionMNIST was 30% faster for the sample I produced.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants