From 8185534793e00fc6247d0c234dc0c7665b13eff1 Mon Sep 17 00:00:00 2001 From: 9cb14c1ec0 <9cb14c1ec0@sendmeemail.xyz> Date: Fri, 31 Jan 2025 07:58:53 -0500 Subject: [PATCH] Add support for AMD iGPUs --- discover/amd_linux.go | 4 ++-- discover/gpu.go | 2 +- go.mod | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/discover/amd_linux.go b/discover/amd_linux.go index ecf91056d87..93c330ad1ed 100644 --- a/discover/amd_linux.go +++ b/discover/amd_linux.go @@ -10,7 +10,6 @@ import ( "os" "path/filepath" "regexp" - "slices" "sort" "strconv" "strings" @@ -373,7 +372,8 @@ func AMDGetGPUInfo() ([]RocmGPUInfo, error) { slog.Debug("rocm supported GPUs", "types", supported) } gfx := gpuInfo.Compute - if !slices.Contains[[]string, string](supported, gfx) { + //if !slices.Contains[[]string, string](supported, gfx) { + if false { reason := fmt.Sprintf("amdgpu is not supported (supported types:%s)", supported) slog.Warn(reason, "gpu_type", gfx, "gpu", gpuInfo.ID, "library", libDir) unsupportedGPUs = append(unsupportedGPUs, UnsupportedGPUInfo{ diff --git a/discover/gpu.go b/discover/gpu.go index 1b6a3f07534..29cfe5ce412 100644 --- a/discover/gpu.go +++ b/discover/gpu.go @@ -82,7 +82,7 @@ var ( var RocmComputeMajorMin = "9" // TODO find a better way to detect iGPU instead of minimum memory -const IGPUMemLimit = 1 * format.GibiByte // 512G is what they typically report, so anything less than 1G must be iGPU +const IGPUMemLimit = 457 * format.MebiByte // 512G is what they typically report, so anything less than 1G must be iGPU // Note: gpuMutex must already be held func initCudaHandles() *cudaHandles { diff --git a/go.mod b/go.mod index 1a1fdb408b4..d2e5462a71d 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/ollama/ollama -go 1.23.4 +go 1.23 require ( github.com/containerd/console v1.0.3