# 5090 RTX fail to initialize in pytorch

**URL:** <https://discuss.pytorch.org/t/5090-rtx-fail-to-initialize-in-pytorch/219985>\
**Category:** Uncategorized\
**Created:** [May 13, 2025, 11:31am UTC](https://discuss.pytorch.org/t/5090-rtx-fail-to-initialize-in-pytorch/219985 "2025-05-13T11:31:15Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![skaae](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/s/7c8e57/32.png) [@skaae](https://discuss.pytorch.org/u/skaae)\
**Post date:** [May 14, 2025, 8:32am UTC](https://discuss.pytorch.org/t/5090-rtx-fail-to-initialize-in-pytorch/219985/7 "2025-05-14T08:32:59Z")

</div>

Thank you for the reply.

I tried setting CUDA\_VISIBLE\_DEVICES to both 0 and 0,1,3,4 and I still get

```auto
 CUDA_VISIBLE_DEVICES=0; python -c 'import torch; torch.cuda.is_available()'
/home/ansible/.venv/lib/python3.12/site-packages/torch/cuda/ __init__.py:181: UserWarning: CUDA initialization: CUDA driver initialization failed, you might not have a CUDA gpu. (Triggered internally at /pytorch/c10/cuda/CUDAFunctions.cpp:109.)
  return torch._C._cuda_getDeviceCount() > 0

```

Since that is working for you I probably messed up some of the cables.  
I hope I can ask a few questions about your setup :)?

- What kind of risercards did you use? We used [MCIO PCIe gen5 Device Adapter x8/x16 – c-payne.com](https://c-payne.com/products/mcio-pcie-gen5-device-adapter-x8-x16) and with the lowest numbered MCIO port going into the MCIO connector closets to the power connector on the riser card.

- Did you change any bios settings or flashed the bios? I changed 3 settings in bios:

---

_[View the full topic](https://discuss.pytorch.org/t/5090-rtx-fail-to-initialize-in-pytorch/219985)._
