[PR #667] [CLOSED] Use build tags to generate accelerated binaries for CUDA and ROCm on … #72579

Closed
opened 2026-05-05 04:07:29 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/667
Author: @65a
Created: 10/1/2023
Status: Closed

Base: mainHead: main


📄 Description

…Linux. The binary will detect and use the accelerated runtimes embedded in it. The build tags rocm or cuda must be specified to both go generate and go build. ROCm builds should have both ROCM_PATH set (and the ROCM SDK present) as well as CLBlast installed (for GGML) and CLBlast_DIR set in the environment to the CLBlast cmake directory (likely /usr/include/cmake/CLBlast). Build tags are also used to switch VRAM detection between cuda and rocm implementations.

It's recommended to also set AMDGPU_TARGETS and GPU_TARGETS when building to ensure card coverage, an example might be AMDGPU_TARGETS='gfx900;gfx906;gfx1030;gfx1100' GPU_TARGETS='gfx900;gfx906;gfx1030;gfx1100'


🔄 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/667 **Author:** [@65a](https://github.com/65a) **Created:** 10/1/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📄 Description …Linux. The binary will detect and use the accelerated runtimes embedded in it. The build tags rocm or cuda must be specified to both go generate and go build. ROCm builds should have both ROCM_PATH set (and the ROCM SDK present) as well as CLBlast installed (for GGML) and CLBlast_DIR set in the environment to the CLBlast cmake directory (likely /usr/include/cmake/CLBlast). Build tags are also used to switch VRAM detection between cuda and rocm implementations. It's recommended to also set AMDGPU_TARGETS and GPU_TARGETS when building to ensure card coverage, an example might be `AMDGPU_TARGETS='gfx900;gfx906;gfx1030;gfx1100' GPU_TARGETS='gfx900;gfx906;gfx1030;gfx1100'` --- <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-05-05 04:07:29 -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#72579