Show the GPU-backed setting only if it is available
Signed-off-by: Dorin Geman <dorin.geman@docker.com>
This commit is contained in:
parent
eb0dba0cc8
commit
75f963a112
|
|
@ -0,0 +1,7 @@
|
|||
//go:build !windows
|
||||
|
||||
package llamacpp
|
||||
|
||||
import "context"
|
||||
|
||||
func CanUseGPU(context.Context, string) (bool, error) { return false, nil }
|
||||
|
|
@ -55,3 +55,7 @@ func hasCUDA11CapableGPU(ctx context.Context, nvGPUInfoBin string) (bool, error)
|
|||
}
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func CanUseGPU(ctx context.Context, nvGPUInfoBin string) (bool, error) {
|
||||
return hasCUDA11CapableGPU(ctx, nvGPUInfoBin)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue