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

Closed
opened 2026-04-23 00:05:46 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/11234
Author: @jakehlee
Created: 6/29/2025
Status: Closed

Base: mainHead: main


📝 Commits (2)

  • a6e6f46 ggml: log when cuda is skipped
  • 3d81b94 HIP_VISIBLE_DEVICES and ROCR_VISIBLE_DEVICES can be empty strings

📊 Changes

1 file changed (+5 additions, -1 deletions)

View changed files

📝 ml/backend/ggml/ggml/src/ggml-backend-reg.cpp (+5 -1)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/11234 **Author:** [@jakehlee](https://github.com/jakehlee) **Created:** 6/29/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`a6e6f46`](https://github.com/ollama/ollama/commit/a6e6f4661d977dac1be15a91f091db5d537e6cb4) ggml: log when cuda is skipped - [`3d81b94`](https://github.com/ollama/ollama/commit/3d81b945211cd7430cdb4af8d05134f94ac8399d) HIP_VISIBLE_DEVICES and ROCR_VISIBLE_DEVICES can be empty strings ### 📊 Changes **1 file changed** (+5 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `ml/backend/ggml/ggml/src/ggml-backend-reg.cpp` (+5 -1) </details> ### 📄 Description 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-23 00:05:46 -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#39362