Comments (18)
When I encountered this I had run the Livebook before I had set the XLA_TARGET
, so XLA was already compiled with only CPU support. Even after adding the XLA_TARGET
and ensuring I had CUDA and cuDNN installed properly I would get 14:30:19.336 [info] TfrtCpuClient created.
.
I solved this by deleting the xla
and mix
folders in ~/.cache
, as I couldn't see a clean way to run mix deps.clean xla --build
in Livebook.
from bumblebee.
@jonatanklosko there is an env var called MIX_INSTALL_FORCE, we can set it to "true" before we evaluate.
from bumblebee.
What if you set cuda explicitly in your config?
config: [
nx: [
default_backend: EXLA.Backend,
default_defn_options: [compiler: EXLA, client: :cuda]
]
],
system_env: [
XLA_TARGET: "cuda"
]
from bumblebee.
You can also run: EXLA.Client.get_supported_platforms()
and see if CUDA is listed. If it isn't, for some reason XLA is not identifying your GPU device.
from bumblebee.
And additionally EXLA.Client.default_name()
to get the name of the default one.
from bumblebee.
@jonatanklosko we should consider the XLA_TARGET
in the cache key, right?
from bumblebee.
@zolrath Yes, that is what must have happened to me as well. I did get CUDA at first, and then could not switch back to it no matter what I tried. Thanks everyone for your help, and thanks @seanmor5 and @josevalim for an amazing project!
from bumblebee.
@josevalim ohh I've just realised that setting the env var and restarting runtime is not enough (unless the env var is set in Mix.install options). That's because we changed XLA to look at the initial XLA_TARGET
, rather than every time it compiles. So in a mix project that would require mix deps.clean xla --build
and for mix install force: true
.
from bumblebee.
Do you remember why we did such change?
from bumblebee.
Actually what I was remembering is XLA_BUILD
(elixir-nx/nx#845 (comment)). The issue with XLA_TARGET
is that we compile dependencies only once, specifically exla
.
Inside the exla
project if you call mix compile
with a different XLA_BUILD
it will pick up the new version, but if you call mix compile
in a project that depends on exla
, it wouldn't pick up the change, since exla
doesn't recompile.
from bumblebee.
But it works if we pass it to Mix.install/2 or force build, right?
maybe we should have an option to “force build” from Livebook UI? Maybe a drop down on the “Reconnect and setup”?
from bumblebee.
I'm able to use cuda now, shall I close it?
from bumblebee.
We will close it @xrd as soon as we figure out how to improve the user experience :)
from bumblebee.
Actually, one way to improve this would be to add:
system_env: %{"XLA_TARGET" => System.get_env("XLA_TARGET")}
this will enforce system differences to be picked up.
from bumblebee.
@josevalim yeah this works, my concern is that once someone sets the env var, they won't remember or bother to always add it to the notebooks. Then someone else using those notebooks may run into similar issue and it is not obvious that's how they could fix it.
from bumblebee.
So I guess the best option is some UI to force installation the next install?
from bumblebee.
That could be useful in other cases too. Would we modify the code on the fly to include force: true
?
from bumblebee.
Moved to Livebook backlog: livebook-dev/livebook#1579
from bumblebee.
Related Issues (20)
- `TextEmbedding` crashes when both Mean Pooling and `compile` opts is specified HOT 2
- Featurizer different from python? HOT 10
- Weird behaviour with progress status. HOT 2
- Error when using TinyLlama HOT 2
- Confidences/probabilities for Whisper results
- Parameter persistence with sharding support HOT 4
- Tied word embeddings HOT 2
- [Documentation] Image struct is not correct in Livebook Examples HOT 2
- Token Classification error in Livebook HOT 1
- Running Whisper using bf16 fails HOT 1
- Bumblebee error when serving Mistral LLM with latest 0.5.0 release HOT 1
- Unknown error serving Llama 2 derivative model HOT 2
- Llama 2 derivative model errors expecting top_k to be provided HOT 2
- CUDA 12.2 support HOT 3
- Huggingface repository not found - `bert-base-google-bert` HOT 1
- Add support for "google/gemma-7b-it" HOT 1
- Just download a model from HuggingFace? HOT 5
- Support Mixtral HOT 4
- llama3 requires 2 eos_token_id's HOT 1
- Error loading gpt3.5 tokenizer HOT 4
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 bumblebee.