[PR #11234] ggml: fix cuda when ROCR_VISIBLE_DEVICES is set but empty #13489

Closed
opened 2026-04-13 00:28:38 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/ollama/ollama/pull/11234

State: closed
Merged: No


After discussion in #11220, it was identified that certain configurations (in this case with Slurm, a common HPC scheduler) may set both CUDA_VISIBLE_DEVICES and ROCR_VISIBLE_DEVICES, even for nvidia GPUs.

Adding a log message when the cuda backend is skipped would help others debugging this issue.

Additionally, the current logic checks whether ROCR_VISIBLE_DEVICES and HIP_VISIBLE_DEVICES are both unset. It should allow these variables to be set but empty.

Closes #11220

**Original Pull Request:** https://github.com/ollama/ollama/pull/11234 **State:** closed **Merged:** No --- After discussion in #11220, it was identified that certain configurations (in this case with Slurm, a common HPC scheduler) may set both `CUDA_VISIBLE_DEVICES` and `ROCR_VISIBLE_DEVICES`, even for nvidia GPUs. Adding a log message when the cuda backend is skipped would help others debugging this issue. Additionally, the current logic checks whether `ROCR_VISIBLE_DEVICES` and `HIP_VISIBLE_DEVICES` are both unset. It should allow these variables to be set but empty. Closes #11220
GiteaMirror added the pull-request label 2026-04-13 00:28:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#13489