accelerator_none.go 429 B

123456789101112131415161718192021
  1. //go:build !rocm && !cuda
  2. package llm
  3. import (
  4. "errors"
  5. )
  6. var (
  7. errNoAccel = errors.New("no accelerator support in this binary")
  8. )
  9. // acceleratedRunner returns the runner for this accelerator given the provided buildPath string.
  10. func acceleratedRunner(buildPath string) []ModelRunner {
  11. return make([]ModelRunner, 0, 1)
  12. }
  13. // CheckVRAM is a stub with no accelerator.
  14. func CheckVRAM() (int64, error) {
  15. return 0, errNoGPU
  16. }