gpu_darwin.go 385 B

12345678910111213141516171819
  1. //go:build darwin
  2. package llm
  3. import (
  4. "github.com/jmorganca/ollama/api"
  5. )
  6. // CheckVRAM returns the free VRAM in bytes on Linux machines with NVIDIA GPUs
  7. func CheckVRAM() (int64, error) {
  8. // TODO - assume metal, and return free memory?
  9. return 0, errNvidiaSMI
  10. }
  11. func NumGPU(numLayer, fileSizeBytes int64, opts api.Options) int {
  12. // default to enable metal on macOS
  13. return 1
  14. }