# No CUDA-capable device is detected

**URL:** <https://discuss.huggingface.co/t/no-cuda-capable-device-is-detected/21892>\
**Category:** Beginners\
**Created:** [August 21, 2022, 10:35pm UTC](https://discuss.huggingface.co/t/no-cuda-capable-device-is-detected/21892 "2022-08-21T22:35:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rshrott](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@rshrott](https://discuss.huggingface.co/u/rshrott)\
**Post date:** [August 21, 2022, 10:35pm UTC](https://discuss.huggingface.co/t/no-cuda-capable-device-is-detected/21892/1 "2022-08-21T22:35:09Z")

</div>

I am running bloom with transformers with WSL2 using Ubuntu. Installed CUDA according to documentation and am able to train other AI/ML models which utilize CUDA. Why am I getting this error?

from transformers import pipeline

name = “bigscience/bloom-350m”  
text = “Hello my name is”  
max\_new\_tokens = 20

pipe = pipeline(model=name, model\_kwargs= {“device\_map”: “auto”, “load\_in\_8bit”: True}, max\_new\_tokens=20)

RuntimeError: Failed to import transformers.models.bloom.modeling\_bloom because of the following error (look up to see its traceback):  
CUDA exception! Error code: no CUDA-capable device is detected
