Comments (3)
Thank you! I had done that already, and the GPU still did not show up as an available backend. However once I started running something, I managed to confirm the GPU is working because I can see the GPU being used from Activity Monitor.
It's probably prudent to note for future viewers that this is the case, and that TF behaves exactly like it would be using CPU only, even while GPU is in fact being used. I suspect once this is merged into the main branch the behaviour will improve.
I'm getting basically zero performance benefit by using GPU over CPU, but there's already an issue to track that: #7.
from tensorflow_macos.
Did you manage to get this working? I'm having the same issue with my Macbook Pro. The graphics card is AMD Radeon R9 M370X.
from tensorflow_macos.
Did you manage to get this working? I'm having the same issue with my Macbook Pro. The graphics card is AMD Radeon R9 M370X.
Hi nehbit, yes I did. It turns out that MLCompute will sort of automatically choose the best device for your specific setting. And if you read way down the README file, they mention that you can hard-code which device (CPU or GPU) will be used. So I hard-coded the GPU and it worked. The ways you can do this follow below in both python and R are below:
# python
import tensorflow as tf
from tensorflow.python.compiler.mlcompute import mlcompute
mlcompute.set_mlc_device(device_name = 'gpu')
# your amazing neural network model follows...
# R
reticulate::use_virtualenv(virtualenv = "~/tensorflow_macos_venv/", required = TRUE)
library(keras)
mlcompute <- reticulate::import("tensorflow.python.compiler.mlcompute")
mlcompute$set_mlc_device(device_name = "gpu")
# your amazing neural network model follows...
from tensorflow_macos.
Related Issues (20)
- Using `model.set_weights()` yields incorrect behavior when MLC is enabled HOT 2
- Kernel is dying when I run the tensorflow.keras.models.Sequential.Fit() on Apple M1 HOT 2
- Apple M1 TensorFlow HOT 6
- Can't use SpectralNormalization wrapper layer.
- When can get new version basic on tf release version HOT 1
- Initialization issues and model.predict doesn't work HOT 6
- Error while running keras.sequential HOT 2
- Tensorflow with gpu HOT 2
- issues while doing model.fit HOT 1
- Apple M1: process finished with exit code 132 (interrupted by signal 4: sigill) HOT 8
- Transformer hugginface BERT model not working HOT 3
- installer script fail
- ImportError: dlopen( ... _pywrap_tensorflow_internal.so: mach-o, but wrong architecture HOT 2
- Request for comment: re: future of TF development on macOS. HOT 9
- `model.fit` makes the kernel crash when passing a `class_weight`
- op type not registered `NormalizeUTF8` initializing BERT HOT 1
- TransposeMLCBytes nullptr error during training process HOT 1
- TensorFlow Addons
- Error retrieving python version, or python executable /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 not version 3.8. Please specify a Python 3.8 executable with the --python option.
- Check failed: outputs_[index].tensor == nullptr
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorflow_macos.