[PR #4067] [MERGED] Add CUDA Driver API for GPU discovery #16641

Closed
opened 2026-04-16 05:37:59 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/4067
Author: @dhiltgen
Created: 4/30/2024
Status: Merged
Merged: 5/6/2024
Merged by: @dhiltgen

Base: mainHead: cudart


📝 Commits (1)

  • 089daae Add CUDA Driver API for GPU discovery

📊 Changes

5 files changed (+342 additions, -5 deletions)

View changed files

📝 gpu/gpu.go (+64 -2)
📝 gpu/gpu_info.h (+1 -0)
📝 gpu/gpu_info_cudart.h (+3 -3)
gpu/gpu_info_nvcuda.c (+203 -0)
gpu/gpu_info_nvcuda.h (+71 -0)

📄 Description

We're seeing some corner cases with cudart which might be resolved by switching to the driver API which comes bundled with the driver package.

I've verified this works on Windows, linux x86 host and container, and linux arm (jetson)

Fixes #4008


🔄 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/4067 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 4/30/2024 **Status:** ✅ Merged **Merged:** 5/6/2024 **Merged by:** [@dhiltgen](https://github.com/dhiltgen) **Base:** `main` ← **Head:** `cudart` --- ### 📝 Commits (1) - [`089daae`](https://github.com/ollama/ollama/commit/089daaeabcc6f05ee5ad171dd123b66d3572efaa) Add CUDA Driver API for GPU discovery ### 📊 Changes **5 files changed** (+342 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `gpu/gpu.go` (+64 -2) 📝 `gpu/gpu_info.h` (+1 -0) 📝 `gpu/gpu_info_cudart.h` (+3 -3) ➕ `gpu/gpu_info_nvcuda.c` (+203 -0) ➕ `gpu/gpu_info_nvcuda.h` (+71 -0) </details> ### 📄 Description We're seeing some corner cases with cudart which might be resolved by switching to the driver API which comes bundled with the driver package. I've verified this works on Windows, linux x86 host and container, and linux arm (jetson) Fixes #4008 --- <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-16 05:37:59 -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#16641