gpuinfo: Make building without cgo possible on Linux

Signed-off-by: Piotr Stankiewicz <piotr.stankiewicz@docker.com>
This commit is contained in:
Piotr Stankiewicz 2025-07-24 11:03:35 +02:00 committed by Piotr
parent fc9b2a7171
commit 43b96fc9a8
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,5 @@
//go:build linux && cgo
package gpuinfo
/*

View File

@ -0,0 +1,10 @@
//go:build linux && !cgo
package gpuinfo
import "errors"
// getVRAMSize returns total system GPU memory in bytes
func getVRAMSize(_ string) (uint64, error) {
return 0, errors.New("unimplemented without cgo")
}