浏览代码

Remove mmap related output calc logic

Daniel Hiltgen 10 月之前
父节点
当前提交
17df6520c8
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      llm/memory.go

+ 1 - 2
llm/memory.go

@@ -197,8 +197,7 @@ func EstimateGPULayers(gpus []gpu.GpuInfo, ggml *GGML, projectors []string, opts
 	}
 
 	// Determine if we need to consider output then find where it fits
-	if ((gpus[0].Library == "metal" && opts.UseMMap) || (gpus[0].Library != "metal" || !opts.UseMMap)) &&
-		memoryLayerOutput > 0 && (opts.NumGPU < 0 || layerCount < opts.NumGPU) {
+	if memoryLayerOutput > 0 && (opts.NumGPU < 0 || layerCount < opts.NumGPU) {
 		for j := len(gpusWithSpace); j > 0; j-- {
 			g := gpusWithSpace[layerCount%j]
 			used := gpuAllocations[g.i] + max(graphPartialOffload, graphFullOffload)